Newer
Older
% Rolf Niepraschk, Rolf.Niepraschk@ptb.de
\setcounter{errorcontextlines}{100} \listfiles
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{pt-declaration}
\newcommand*\vl@lang{main=ngerman}
\DeclareOption{german}{\def\vl@lang{main=ngerman}}
\DeclareOption{ngerman}{\def\vl@lang{main=ngerman}}
\DeclareOption{de}{\def\vl@lang{main=ngerman}}
\DeclareOption{english}{\def\vl@lang{main=english}}
\DeclareOption{en}{\def\vl@lang{main=english}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
\ProcessOptions\relax
\LoadClass[%
,paper=a4
,fontsize=11pt
,parskip=true
]{scrartcl}
\RequirePackage[\vl@lang]{babel}
\RequirePackage{iflang}
\RequirePackage[left=25mm,right=25mm,top=2cm,bottom=6cm]{geometry}
\RequirePackage{ifxetex,ifluatex,url,array,tabularx}
\newif\ifXeOrLua \XeOrLuafalse
\ifxetex\XeOrLuatrue\else\ifluatex\XeOrLuatrue\fi\fi
% TODO: Mathematik?
\ifXeOrLua% XeLaTeX oder luaLaTeX
\RequirePackage{fontspec}
\setmainfont{TeX Gyre Pagella}[Ligatures=TeX]
\setsansfont{TeX Gyre Heros}[Scale=MatchUppercase,Ligatures=TeX]
\setmonofont{AnonymousPro-Regular}[%
Extension = .ttf,
BoldFont = AnonymousPro-Bold,
ItalicFont = AnonymousPro-Italic,
BoldItalicFont = AnonymousPro-BoldItalic,
Scale = MatchLowercase
]
\else
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
\RequirePackage{mathpazo}
\RequirePackage{tgpagella}
\RequirePackage{tgheros}
\RequirePackage[ttdefault=true,scale=1.034]{AnonymousPro}
\fi
\RequirePackage{amsfonts,trimspaces}
\newcommand*\vl@setcommand[3][]{% #1=default (opt.), #2=macro, #3=value
\edef\vl@tempa{\trim@spaces@noexp{#3}}%
\expandafter\protected@xdef\csname #2\endcsname{%
\ifx\@empty\vl@tempa #1\else\vl@tempa\fi}%
}
\newcommand*\myref[1]{\vl@setcommand{vl@myref}{#1}}
\newcommand*\mymail[1]{\vl@setcommand{vl@mymail}{#1}}
\newcommand*\myfax[1]{\vl@setcommand{vl@myfax}{#1}}
\newcommand*\myemail[1]{\vl@setcommand{vl@myemail}{#1}}
\newcommand*\yourref[1]{\vl@setcommand{vl@yourref}{#1}}
\newcommand*\missingEntries[1]{\vl@setcommand{vl@missingEntries}{#1}}
\newcommand*\vl@myref{}
\newcommand*\vl@mymail{}
\newcommand*\vl@myfax{}
\newcommand*\vl@myemail{}
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\AtBeginDocument{%
\RequirePackage{paralist}
\newcommand*\vl@begin@list[1]{%
%\vl@tempdima=\parindent
%\vl@tempdimb=\parskip
\@nameuse{#1}%
%\parindent=\vl@tempdima
%\parskip=\vl@tempdimb
}
\def\enumerate{%
\vl@begin@list{compactenum}%
}
\def\itemize{%
\vl@begin@list{compactitem}%
}
\def\description{%
\vl@begin@list{compactdesc}%
}
\let\enditemize\endcompactitem
\let\endenumerate\endcompactenum
\let\enddescription\endcompactdesc
\pltopsep=\medskipamount
\plitemsep=\medskipamount
\setlength\leftmargini{1.5em}
\setlength\leftmarginii{1.1em}
\setlength\leftmarginiii{1.1em}
\setlength\leftmarginiv{1.1em}
\setlength\labelsep{.5em}
\ifxetex\else
\RequirePackage[%
,factor=1500
,protrusion=true
,expansion=true
,verbose=true
,final=true
,letterspace=100
,babel=true
]{microtype}
\fi
\makeatletter
\IfLanguageName{ngerman}{%
\input{ptb-declaration-de.clo}
}{%
\input{ptb-declaration-en.clo}
}
\makeatother
}
\AtBeginDocument{%
\ifnum\number\vl@missingEntries>0 %
\AddToShipoutPictureBG{%
\AtTextCenter{%
\makebox(0,0)[c]{\resizebox{\textwidth}{!}{%
\rotatebox{54.7}{%
\textnormal{\textsf{\textbf{%
\color{lightgray}Fehler:~\vl@missingEntries}}}}}}%
}%
}%
\fi
}
\textheight=1.2\textheight
\pagestyle{empty}
\endinput