Skip to content
Snippets Groups Projects
Commit 45690659 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

mehr nac "siunitx-PTB.sty" ausgelagert

parent 95d1425c
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
\newcommand*\ks@langs{ngerman,main=english}
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{kalibrierschein}
[2015/12/10 v0.2b Dokumentenklasse (RN/PTB)]
[2017/12/01 v0.2c Dokumentenklasse (RN/PTB)]
\DeclareOption{BS}{\def\ks@location{Braunschweig}}
\DeclareOption{BLN}{\def\ks@location{Berlin}}
\DeclareOption{KK}{\edef\ks@kalType{\CurrentOption}}
......@@ -34,17 +34,13 @@
%\RequirePackage{showframe}
\RequirePackage[\ks@langs]{babel}
\RequirePackage{iflang}
\RequirePackage[autostyle=true,german=guillemets,maxlevel=3]{csquotes}%
\RequirePackage{iflang}
\IfLanguageName{ngerman}{%
\typeout{ngerman}
\AtEndOfClass{\shorthandon{"}}
\defineshorthand{"`}{\openautoquote}
\defineshorthand{"'}{\closeautoquote}
\AtBeginDocument{\sisetup{locale=DE}}
}{%
\typeout{english}
\AtBeginDocument{\sisetup{locale=UK}}
}
\MakeAutoQuote{»}{«}
\AtEndOfClass{%
......@@ -333,32 +329,6 @@
\RequirePackage{siunitx-PTB}
\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
}
\newcommand\resultTable[3][]{%
\@tempcnta=#2 %
\@tempcntb=\numexpr(\@tempcnta-1)*2 %
......
......@@ -40,5 +40,40 @@
}%
}
\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
}
\RequirePackage{iflang}
\IfLanguageName{ngerman}{%
\typeout{ngerman}
\AtBeginDocument{\sisetup{locale=DE}}
}{%
\typeout{english}
\AtBeginDocument{\sisetup{locale=UK}}
}
\endinput
%---------------------------
\listfiles
\documentclass[de,IK,2015]{kalibrierschein}
\documentclass[en,IK,2015]{kalibrierschein}
\resultTable{ 6 }{%
{\(p_{cal}\)}&{\(p_{ind}\)}&{\(p_r\)}&{\(p_{ind} - p_r\)}&{\(e\)}&{\(U(k=2)\)}\\
mbar&mbar&mbar&mbar&&\\\toprule\endhead
......
......@@ -4,7 +4,7 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{ptbletter}
[2017/11/30 v0.2a PTB-Brief-Klasse (RN)]
[2017/12/01 v0.2b PTB-Brief-Klasse (RN)]
\let\ptb@tempdima=\@ovxx
\let\ptb@tempdimb=\@ovyy
......@@ -51,12 +51,14 @@
,backaddress=plain
,refline=nodate
,enlargefirstpage
,pagenumber=no
,parskip=never
]{scrlttr2}
% Texbreite beibehalten, linken Rand anpassen
\ptb@tempdima=\textwidth
\RequirePackage[verbose,inner=72bp,textwidth=\ptb@tempdima]{geometry}
%\textheight=1.1\textheight
\oddsidemargin=0.0pt %
\evensidemargin=34.7124pt %
\raggedbottom
\RequirePackage{hyphsubst}% Trennregeln austauschen
\HyphSubstIfExists{ngerman-x-latest}{%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment