From e6e73500cdbdd4b0117645906ff3f09abff288ec Mon Sep 17 00:00:00 2001 From: niepra01 <rolf.niepraschk@ptb.de> Date: Mon, 4 May 2015 14:30:09 +0200 Subject: [PATCH] SI- und num-Makro angepasst --- declaration/declaration.cls | 0 kalibrierschein/kalibrierschein.cls | 210 ++++++++++++++------------- versandauftrag/vl-versandauftrag.cls | 3 + 3 files changed, 110 insertions(+), 103 deletions(-) delete mode 100644 declaration/declaration.cls diff --git a/declaration/declaration.cls b/declaration/declaration.cls deleted file mode 100644 index e69de29..0000000 diff --git a/kalibrierschein/kalibrierschein.cls b/kalibrierschein/kalibrierschein.cls index 58f92c3..8e3aa16 100644 --- a/kalibrierschein/kalibrierschein.cls +++ b/kalibrierschein/kalibrierschein.cls @@ -6,7 +6,7 @@ \newcommand*\ks@langs{ngerman,main=english} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesClass{kalibrierschein} - [2015/04/30 v0.1v Dokumentenklasse (RN/PTB)] + [2015/05/04 v0.1w Dokumentenklasse (RN/PTB)] \DeclareOption{BS}{\def\ks@location{Braunschweig}} \DeclareOption{BLN}{\def\ks@location{Berlin}} \DeclareOption{KK}{\edef\ks@kalType{\CurrentOption}} @@ -85,13 +85,79 @@ \RequirePackage{eso-pic,graphicx,booktabs} \RequirePackage{zref-totpages} +\RequirePackage{amsmath} + +\newif\ifXeOrLua \XeOrLuafalse +\RequirePackage{ifxetex,ifluatex,ifpdf} + +\ifxetex% XeTeX + \XeOrLuatrue +\else + \ifluatex% LuaTeX + \XeOrLuatrue + \else + \ifpdf% pdfTeX + \else% TeX+dvips + \fi + \fi +\fi + +\ifXeOrLua% XeLaTeX oder luaLaTeX + +\typeout{############################ XeLaTeX oder luaLaTeX} + +\usepackage[no-math]{fontspec} +\usepackage{unicode-math} +%\setmathfont[math-style=ISO,bold-style=ISO]{Asana Math}% damit sind Einheiten kursiv +\setmathfont{Asana Math} +\setmainfont[Ligatures=TeX]{TeX Gyre Heros} +\setsansfont[Ligatures=TeX]{TeX Gyre Heros} +\setmathfont[range=\mathup,Scale=MatchLowercase]{TeXGyreHeros-Regular} +\setmathfont[range=\mathit,Scale=MatchLowercase]{TeXGyreHeros-Italic} +\setmathfont[range=\mathbfup,Scale=MatchLowercase]{TeXGyreHeros-Bold} +\setmathfont[range=\mathbfit,Scale=MatchLowercase]{TeXGyreHeros-BoldItalic} +\setmathfont[range=\mathsfup,Scale=MatchLowercase]{TeXGyreHeros-Regular} +\setmathfont[range=\mathsfit,Scale=MatchLowercase]{TeXGyreHeros-Italic} +\setmathfont[range=\mathbfsfup,Scale=MatchLowercase]{TeXGyreHeros-Bold} +\setmathfont[range=\mathbfsfit,Scale=MatchLowercase]{TeXGyreHeros-BoldItalic} +\setmathfont[range=\mathpunct]{TeXGyreHeros-Regular} + +\RequirePackage{newunicodechar} +\newunicodechar{^^^^202f}{\,}% 'NARROW NO-BREAK SPACE' (\u202F, 8239) +\newunicodechar{^^^^2009}{\,\hspace{0pt}}% 'THIN SPACE' +\newunicodechar{^^^^00ad}{\-}% 'SOFT HYPHEN' +\newunicodechar{^^^^2207}{{\setmathfont{Asana Math}^^^^2207}}% 'NABLA' + +%%% TODO: ^^^^ unschädlich machen für pdflatex + +\else + +\typeout{############################ pdfLaTeX} + +\RequirePackage{fix-cm}% ??? +\RequirePackage[T1]{fontenc} +\RequirePackage[utf8]{inputenc} +\DeclareUnicodeCharacter{202F}{\,} +\DeclareUnicodeCharacter{2009}{\,\hspace{0pt}} +\DeclareUnicodeCharacter{22C5}{\cdot} +\DeclareUnicodeCharacter{03B8}{\theta} +\RequirePackage[scale=1]{tgheros} +%%%\RequirePackage[scaled=1]{helvet} +\renewcommand*\familydefault{\sfdefault} +%%%\newcommand*\mathfamilydefault{\familydefault} +%%\newcommand*\math@sfdefault{\sfdefault} + +\RequirePackage{sfmath} + +\fi + %%%\RequirePackage{babel} -\RequirePackage{gensymb} %% ??? -\let\ks@celsius=\celsius -\let\celsius=\relax -\let\ohm=\relax -\RequirePackage{siunitx} -\let\celsius=\ks@celsius +%\RequirePackage{gensymb} %% ??? +%\let\ks@celsius=\celsius +%\let\celsius=\relax +%\let\ohm=\relax +%\RequirePackage{siunitx} +%\let\celsius=\ks@celsius \iffalse \AtBeginDocument{% @@ -121,6 +187,12 @@ \let\@tempdime=\@clnht \let\@tempdimf=\@dashdim +\newcommand*\ks@tempa{} +\newcommand*\ks@tempb{} +\newcommand*\ks@tempc{} +\newcommand*\ks@tempd{} +\newcommand*\ks@tempe{} + \newtoks\ks@tab \newcommand*\ks@colSpec{} @@ -236,6 +308,33 @@ \newcolumntype{C}{>{\centering\arraybackslash}X} +\RequirePackage{siunitx} +\let\ke@orig@SI=\SI +\renewcommand*\SI[2][]{% tolerant gegenüber "?" statt Zahl + \def\ks@tempa{#1}% + \edef\ks@tempb{\trim@spaces{#2}}% + \ks@SI@i +} +\newcommand*\ks@SI@i[2][]{ + \def\ks@tempc{?}% + \ifx\ks@tempb\ks@tempc + \ensuremath{\textbf{??}}\,\si[#1]{#2}% + \else + \edef\ks@tempe{\noexpand\ke@orig@SI[\ks@tempa]{\ks@tempb}[#1]{#2}}% + \ks@tempe + \fi +} +\let\ke@orig@num=\num +\renewcommand*\num[1]{% tolerant gegenüber "?" statt Zahl + \edef\ks@tempb{\trim@spaces{#1}}% + \def\ks@tempc{?}% + \ifx\ks@tempb\ks@tempc + \ensuremath{\textbf{??}}% + \else + \ke@orig@num{#1}% + \fi +} + %%%\AtBeginDocument{% \sisetup{% %%%,exponent-product = \ensuremath { \cdot } % wird per "locale" gesetzt @@ -255,6 +354,7 @@ %%%,output-close-uncertainty = ,separate-uncertainty = true ,bracket-numbers = true + ,per-mode=symbol }% %%%} @@ -326,10 +426,6 @@ \expandafter\ks@@shielded\expandafter{#1}% } -\RequirePackage{ifxetex,ifluatex} -\newif\ifXeOrLua \XeOrLuafalse -\ifxetex\XeOrLuatrue\else\ifluatex\XeOrLuatrue\fi\fi - \RequirePackage[ % factor=1500 % ,verbose=true @@ -338,98 +434,6 @@ ,babel=true ]{microtype} -\RequirePackage{amsmath} - -\ifXeOrLua% XeLaTeX oder luaLaTeX - -\typeout{############################ XeLaTeX oder luaLaTeX} - -\iffalse - -\RequirePackage[no-math]{fontspec} -\RequirePackage{hvmath-qhv} -\setmainfont{TeXGyreHeros} -\setmainfont[Ligatures=TeX]{TeXGyreHeros} -\setsansfont[Ligatures=TeX]{TeXGyreHeros} -\iffalse -\setmonofont[Scale=MatchLowercase]{Latin Modern Mono} -\else % wegen derzeitigem Problem (2014/06/25) -\setmonofont{Latin Modern Mono} -\fi - -\else - -\RequirePackage[no-math]{fontspec} -\setmainfont[Ligatures=TeX]{TeX Gyre Heros} -\setsansfont[Ligatures=TeX]{TeX Gyre Heros} -\RequirePackage{unicode-math} - - -%\setmathfont[math-style=ISO,bold-style=ISO]{XITS Math} -\setmathfont[math-style=ISO,bold-style=ISO]{Asana Math} -%\setmathfont[math-style=ISO,bold-style=ISO]{Latin Modern Math} -%\setmathfont[math-style=ISO,bold-style=ISO]{TeX Gyre Pagella Math} -%\setmathfont[math-style=ISO,bold-style=ISO]{TeX Gyre Termes Math} - -\iftrue % -\setmathfont[range=\mathup,Scale=MatchLowercase]{TeXGyreHeros-Regular} -\setmathfont[range=\mathit,Scale=MatchLowercase]{TeXGyreHeros-Italic} -\setmathfont[range=\mathbfup,Scale=MatchLowercase]{TeXGyreHeros-Bold} -\setmathfont[range=\mathbfit,Scale=MatchLowercase]{TeXGyreHeros-BoldItalic} -\setmathfont[range=\mathsfup,Scale=MatchLowercase]{TeXGyreHeros-Regular} -\setmathfont[range=\mathsfit,Scale=MatchLowercase]{TeXGyreHeros-Italic} -\setmathfont[range=\mathbfsfup,Scale=MatchLowercase]{TeXGyreHeros-Bold} -\setmathfont[range=\mathbfsfit,Scale=MatchLowercase]{TeXGyreHeros-BoldItalic} -\setmathfont[range=\mathpunct]{TeXGyreHeros-Regular} -\else -\setmathfont[range=\mathup]{TeXGyreHeros-Regular} -\setmathfont[range=\mathit]{TeXGyreHeros-Italic} -\setmathfont[range=\mathbfup]{TeXGyreHeros-Bold} -\setmathfont[range=\mathbfit]{TeXGyreHeros-BoldItalic} -\setmathfont[range=\mathsfup]{TeXGyreHeros-Regular} -\setmathfont[range=\mathsfit]{TeXGyreHeros-Italic} -\setmathfont[range=\mathbfsfup]{TeXGyreHeros-Bold} -\setmathfont[range=\mathbfsfit]{TeXGyreHeros-BoldItalic} -\setmathfont[range=\mathpunct]{TeXGyreHeros-Regular} -\fi - -\newcommand*\XXX[3]{% - \def\x{"5e"5e}% - %\edef\y{\detokenize\x\x#1#2} - \expandafter\newunicodechar\expandafter{\detokenize\x\x#1#2}{#3}% -} - -\RequirePackage{newunicodechar} -\newunicodechar{^^^^202f}{\,}% 'NARROW NO-BREAK SPACE' (\u202F, 8239) -\newunicodechar{^^^^2009}{\,\hspace{0pt}}% 'THIN SPACE' -\newunicodechar{^^^^00ad}{\-}% 'SOFT HYPHEN' -\newunicodechar{^^^^2207}{{\setmathfont{Asana Math}^^^^2207}}% 'NABLA' - -%%% TODO: ^^^^ unschädlich machen für pdflatex - -\fi - -\else - -\typeout{############################ pdfLaTeX} - -\RequirePackage{fix-cm}% ??? -\RequirePackage[T1]{fontenc} -\RequirePackage[utf8]{inputenc} -\DeclareUnicodeCharacter{202F}{\,} -\DeclareUnicodeCharacter{2009}{\,\hspace{0pt}} -\DeclareUnicodeCharacter{22C5}{\cdot} -\DeclareUnicodeCharacter{03B8}{\theta} -\RequirePackage[scale=1]{tgheros} -%%%\RequirePackage[scaled=1]{helvet} -\renewcommand*\familydefault{\sfdefault} -%%%\newcommand*\mathfamilydefault{\familydefault} -%%\newcommand*\math@sfdefault{\sfdefault} - -\RequirePackage{sfmath} - -\fi - \emergencystretch=1em % \pagestyle{headings} diff --git a/versandauftrag/vl-versandauftrag.cls b/versandauftrag/vl-versandauftrag.cls index 76c5cf9..6ded0c8 100644 --- a/versandauftrag/vl-versandauftrag.cls +++ b/versandauftrag/vl-versandauftrag.cls @@ -49,6 +49,9 @@ \let\vl@tempdima=\@ovxx \let\vl@tempdimb=\@ovyy \let\vl@tempdimc=\@ovdx +\let\vl@tempdimd=\@clnwd +\let\vl@tempdime=\@clnht +\let\vl@tempdimf=\@dashdim \newcommand\vl@tempa{} \newcommand*\vl@setboolean[3][false]{% #1=default (opt.), #2=if, #3=value -- GitLab