Newer
Older
\setcounter{errorcontextlines}{100}
\RequirePackage{ifdraft}
\newcommand*\ks@location{Berlin}
\newcommand*\ks@kalType{KK}
\newcommand*\ks@layout{-0000}
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{kalibrierschein}
[2019/02/15 v0.3b Dokumentenklasse (RN/PTB)]
\DeclareOption{BS}{\def\ks@location{Braunschweig}}
\DeclareOption{BLN}{\def\ks@location{Berlin}}
\DeclareOption{KK}{\edef\ks@kalType{\CurrentOption}}
\DeclareOption{IK}{\edef\ks@kalType{\CurrentOption}}
\DeclareOption{2015}{\edef\ks@layout{-\CurrentOption}}
\DeclareOption{german}{\def\ks@langs{english,main=ngerman}}
\DeclareOption{ngerman}{\def\ks@langs{english,main=ngerman}}
\DeclareOption{de}{\def\ks@langs{english,main=ngerman}}
\DeclareOption{english}{\def\ks@langs{ngerman,main=english}}
\DeclareOption{en}{\def\ks@langs{ngerman,main=english}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
\ProcessOptions\relax
\PassOptionsToPackage{paper=a4,pagesize,twoside=false,headinclude}{typearea}
% Wegen bug in fontspec v2.4a
\LoadClass[%
,fontsize=11pt
,headings=small
,numbers=enddot
,parskip=half
]{scrartcl}
%\RequirePackage{showframe}
\RequirePackage[\ks@langs]{babel}
\RequirePackage[autostyle=true,german=guillemets,maxlevel=3]{csquotes}%
\IfLanguageName{ngerman}{%
\newcommand*\ks@draftName{Entwurf}%
\AtEndOfClass{\shorthandon{"}}
\defineshorthand{"`}{\openautoquote}
\defineshorthand{"'}{\closeautoquote}
}{%
\newcommand*\ks@draftName{Draft}%
\MakeAutoQuote{»}{«}
\AtEndOfClass{%
\@ifpackageloaded{inputenc}{}{%
\catcode`\»=\active
\catcode`\«=\active
}%
}
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
\def\huge{\@setfontsize\huge{20.26}{25.3}}
\def\large{\@setfontsize\large{12.17}{14.2}}
\def\tiny{\@setfontsize\tiny\@viipt\@viiipt}
\raggedbottom% ???
\RequirePackage{textcomp}
%%%\RequirePackage[standard-baselineskips]{cmbright}
%%%\RequirePackage[math]{iwona}
%%%\RequirePackage[math]{kurier}
%%%\RequirePackage{lxfonts}
% 1 %\RequirePackage{arevmath}
%\let\celsius=\relax \let\ohm=\relax
%\RequirePackage{gensymb}
%%%\RequirePackage[T1,small]{eulervm}
%%%\RequirePackage{ziffer}
\RequirePackage{tabularx}
\let\ks@TX@endtabularx=\TX@endtabularx
\newcommand*\origTabularx{%
\let\TX@endtabularx=\ks@TX@endtabularx
}
\RequirePackage{ltablex}\keepXColumns{}
\setcounter{LTchunksize}{100}
\PassOptionsToPackage{final}{graphicx}
\RequirePackage{eso-pic,graphicx,booktabs}
\RequirePackage{zref-totpages}
\newif\ifXeOrLua \XeOrLuafalse
\RequirePackage{ifxetex,ifluatex,ifpdf}
\ifxetex% XeTeX
\XeOrLuatrue
\else
\ifluatex% LuaTeX
\XeOrLuatrue
\else
\ifpdf% pdfTeX
\else% TeX+dvips
\fi
\fi
\fi
\typeout{#### XeLaTeX oder luaLaTeX}
%\RequirePackage[no-math]{fontspec}
\RequirePackage{unicode-math}
\setmainfont{texgyreheros}[
Ligatures=TeX,
Extension=.otf,
UprightFont=*-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
BoldItalicFont=*-bolditalic.otf]
\setsansfont{texgyreheros}[
Ligatures=TeX,
Extension=.otf,
UprightFont=*-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
BoldItalicFont=*-bolditalic.otf]
\setmathfont{Asana-Math.otf}[math-style=ISO,bold-style=ISO]% damit sind Einheiten kursiv
\setmathfont{texgyreheros-regular.otf}[range=\mathup,Scale=MatchLowercase]
\setmathfont{texgyreheros-italic.otf}[range=\mathit,Scale=MatchLowercase]
\setmathfont{texgyreheros-bold.otf}[range=\mathbfup,Scale=MatchLowercase]
\setmathfont{texgyreheros-bolditalic.otf}[range=\mathbfit,Scale=MatchLowercase]
\setmathfont{texgyreheros-regular.otf}[range=\mathsfup,Scale=MatchLowercase]
\setmathfont{texgyreheros-italic.otf}[range=\mathsfit,Scale=MatchLowercase]
\setmathfont{texgyreheros-bold.otf}[range=\mathbfsfup,Scale=MatchLowercase]
\setmathfont{texgyreheros-bolditalic.otf}[range=\mathbfsfit,Scale=MatchLowercase]
\setmathfont{texgyreheros-regular.otf}[range=\mathpunct]
\setmathfont{Asana-Math.otf}[range=\int]
% (Ulrike): )als letztes immer einen
% richtiger Mathfont, damit diverse Werte korrekt gesetzt werden.
\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
\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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
\iffalse
\AtBeginDocument{%
\RequirePackage[babel=once,german=guillemets]{csquotes}
\defineshorthand{"`}{\openautoquote}
\defineshorthand{"'}{\closeautoquote}
}
\fi
\RequirePackage[neverdecrease]{paralist}
\let\itemize\compactitem
\let\enditemize\endcompactitem
\let\enumerate\compactenum
\let\endenumerate\endcompactenum
\let\description\compactdesc
\let\enddescription\endcompactdesc
\pltopsep=\medskipamount
\plitemsep=\smallskipamount
\newcommand*\ks@PTB{Physikalisch-Technische Bundesanstalt}
\newcommand*\ks@BSuB{Braunschweig und Berlin}
\RequirePackage{picture}
\RequirePackage[manualmark]{scrpage2}
\let\@tempdimd=\@clnwd
\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{}
\newcommand*\ks@add[1]{%
\ks@tab\expandafter{\the\ks@tab#1}%
}
\newcommand*\ks@addTabLine[1]{%
\def\@tempc{}%
\@for\@tempa:=#1\do{%
\edef\@tempb{\noexpand\ks@tab\noexpand\expandafter{%
\the\noexpand\ks@tab\@tempc\@tempa}}%
\@tempb
\def\@tempc{\noexpand&}% \noexpand hier unnötig, aber ...
\newcommand*\ks@getColSpec[2]{%
\let#2=\@empty
\@for\@tempa:=#1\do{%
\ifx#2\@empty
%\def#2{l}%
\def#2{X}%
\newcommand*\ks@printDevicesTable[3]{% #1 = width, #2 = 1. offset, #3 = 2. offset
\ks@tab{}%
\ks@getColSpec{\ks@type}{\ks@colSpec}%
\edef\@tempa{\noexpand\begin{tabularx}{#1}[t]{@{}\ks@colSpec @{}}}%
\ks@tab\expandafter{\@tempa}%
\ks@addTabLine{\ks@manufacturer}%
\ks@addTabLine{\ks@type}%
\ks@add{\tabularnewline[#3]}%
\ks@addTabLine{\ks@serialNo}%
%%\ks@addCommaItems{\ks@serialNo}% ???
\ks@add{\end{tabularx}}%
\begingroup
\tabcolsep=1em %
\origTabularx
\the\ks@tab
\endgroup
}
\defpagestyle{headings}%
{% Kopf
%(OLL,OLD)% Linie
{\pagemark\hfill}% Gerade Seiten
{\hfill\pagemark}% Ungerade Seiten
{% Einseitig
}
%(\textwidth,.8pt)% Linie
}%
{% Fuss
%(OLL,OLD)% Linie
{}% Gerade Seiten
{}% Ungerade Seiten
{% Einseitig
\ks@foot
}
%(ULL,ULD)% Linie
}
\newcommand*\ks@foot{}
\input{\ks@kalType\ks@layout.clo}% Titelseiten- und Layout-Definition
\newcommand*\type[1]{\xdef\ks@type{\trim@spaces{#1}}}
\newcommand*\ks@manufacturer{Namen der Hersteller}
\newcommand*\manufacturer[1]{%
\xdef\ks@manufacturer{\trim@spaces{\detokenize{#1}}}%
}
\newcommand*\object[1]{\xdef\ks@object{\trim@spaces{#1}}}
\newcommand*\ks@applicant{%
\newcommand*\applicant[1]{\long\gdef\ks@applicant{#1}}
\newcommand*\ks@serialNo{XXX,YYY}
\newcommand*\serialNo[1]{%
\xdef\ks@serialNo{\trim@spaces{\detokenize{#1}}}%
\newcommand*\refNo[1]{\xdef\ks@refNo{\trim@spaces{#1}}}
\newcommand*\calibMark[1]{\xdef\ks@calibMark{\trim@spaces{#1}}}
\newcommand*\referenceMark[1]{\xdef\ks@referenceMark{\trim@spaces{#1}}}
\newcommand*\calibDate[1]{\xdef\ks@calibDate{\trim@spaces{#1}}}
\newcommand*\certificateDate[1]{\xdef\ks@certificateDate{\trim@spaces{#1}}}
\newcommand*\ks@byOrder{Peter Silie}
\newcommand*\byOrder[1]{\xdef\ks@byOrder{\trim@spaces{#1}}}
\newcommand*\ks@examiner{Ellen Bogen}
\newcommand*\examiner[1]{\xdef\ks@examiner{\trim@spaces{#1}}}
\newcommand*\ks@missingEntries{1}
\newcommand*\missingEntries[1]{\xdef\ks@missingEntries{\trim@spaces{#1}}}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\RequirePackage{siunitx-PTB}
\newcommand\resultTable[3][]{%
\@tempcntb=\numexpr(\@tempcnta-1)*2 %
\@tempdimc=\dimexpr (\textwidth - \@tempcntb\tabcolsep) / \@tempcnta %
\@tempcntb=\@tempcnta
\def\@tempa{}%
%%%\edef\@tempa{\@tempa S[table-column-width=\the\@tempdimc]}% ???
\repeat
\edef\@tempa{\noexpand\begin{longtable}{@{}\@tempa @{}}}%
\expandafter\ks@add\expandafter{\@tempa}%
\ks@add{\\\toprule}%
\ifx\relax#1\relax\else
\ks@add{\multicolumn{\the\@tempcntb}{@{}c@{}}{#1}\\\toprule}%
\ks@add{\bottomrule\end{longtable}}%
}
\newcommand*\printFirstPage{%
\thispagestyle{empty}%
\AddToShipoutPicture*{\ks@printFirstPage}%
\mbox{}\clearpage
\global\let\ks@printFirstPage\@empty
\global\let\printFirstPage\@empty
}
\newcommand*\printLastPage{%
\clearpage
\global\let\ks@foot=\ks@@foot
\ks@lastPage
}
\newcommand*\printResultTable{%
%\sisetup{table-format=1e+2,retain-zero-exponent,table-parse-only=false}%
\sisetup{retain-zero-exponent,%table-figures-exponent=1,%
table-number-alignment=center,
table-text-alignment=center,
table-format=1.6e+1,
table-align-exponent,
\the\ks@tab
\endgroup
}
\newcommand*\ks@applicant@table{%
\begingroup
\let\ks@tempa=\\%
\let\\=\relax
\ks@tab{}%
\expandafter\@tfor\expandafter\ks@tempb\expandafter
\expandafter\edef\expandafter\ks@tempb\expandafter{%
\expandafter\trim@spaces\expandafter{\ks@tempb}}%
\ifx\ks@tempb\@empty\else
\expandafter\ks@add\expandafter{\ks@tempb\tabularnewline[.3ex]}%
\fi
\let\\=\ks@tempa
\begin{tabular}[t]{@{}l@{}}%
\the\ks@tab
\end{tabular}%
\endgroup
}
\AtBeginDocument{
\ifdraft{
\AddToShipoutPictureBG{%
\AtTextCenter{%
\makebox(0,0)[c]{\resizebox{\textwidth}{!}{%
\rotatebox{54.7}{%
\textnormal{\textsf{\textbf{%
\color{lightgray}\ks@draftName}}}}}}%
}{%
\ifnum\number\ks@missingEntries>0 %
\AddToShipoutPictureBG{%
\AtTextCenter{%
\makebox(0,0)[c]{\resizebox{\textwidth}{!}{%
\rotatebox{54.7}{%
\textnormal{\textsf{\textbf{%
\color{lightgray}Fehler:~\ks@missingEntries}}}}}}%
}%
}%
\fi
}
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
}
\RequirePackage[
% factor=1500
% ,verbose=true
,final=true
% ,letterspace=100
,babel=true
]{microtype}
\emergencystretch=1em %
\pagestyle{headings}
\renewcommand\section{%
\@startsection{section}% name
{1}% level
{\z@}% indent
{-3ex \@plus -.5ex \@minus -.2ex}% beforeskip (abs.!)
{.6ex \@plus.2ex}% afterskip
{\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
\setlength{\parfillskip}{\z@ plus 1fil}\fi
\raggedsection\normalfont\sectfont\nobreak\size@section}%
}
\endinput
%%
%% End of file `kailbrierschein.cls'.
sudo cp $(kpsewhich --var-value TEXMFSYSVAR)/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
sudo fc-cache -fsv
mkluatexfontdb --force --verbose=-1 -vvv