Skip to content
Snippets Groups Projects
ptb-confirm.cls 2.12 KiB
Newer Older
Rolf Niepraschk's avatar
Rolf Niepraschk committed
% Rolf Niepraschk, Rolf.Niepraschk@ptb.de

\setcounter{errorcontextlines}{100}  \listfiles

\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{ptb-confirm}
    [2015/05/26 v0.1a PTB-Brief-Klasse (RN)]

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ptbletter}}

\ProcessOptions\relax

\LoadClass[%
,BLN
]{ptbletter}

\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}%
}

\RequirePackage{trimspaces}

\newcommand*\DateOfApplication[1]{\vl@setcommand{vl@DateOfApplication}{#1}}
\newcommand*\KindOfEnquiry[1]{\vl@setcommand{vl@KindOfEnquiry}{#1}}
\newcommand*\DateOfEnquiry[1]{\vl@setcommand[\vl@DateOfApplication]{vl@DateOfEnquiry}{#1}}
\newcommand*\Company[1]{\vl@setcommand{vl@Company}{#1}}
\newcommand*\Name[1]{\vl@setcommand{vl@Name}{#1}}
\newcommand*\Street[1]{\vl@setcommand{vl@Street}{#1}}
\newcommand*\Zipcode[1]{\vl@setcommand{vl@Zipcode}{#1}}
\newcommand*\Town[1]{\vl@setcommand{vl@Town}{#1}}
\newcommand*\Land[1]{\vl@setcommand{vl@Land}{#1}}
\newcommand*\Device[1]{\vl@setcommand{vl@Device}{#1}}
\newcommand*\Condition[1]{\vl@setcommand{vl@Condition}{#1}}
\newcommand*\ScheduleDate[1]{\vl@setcommand{vl@ScheduleDate}{#1}}
\newcommand*\Fee[1]{\vl@setcommand{vl@Fee}{#1}}
Rolf Niepraschk's avatar
Rolf Niepraschk committed

\newcommand*\vl@DateOfApplication{}
\newcommand*\vl@KindOfEnquiry{}
\newcommand*\vl@DateOfEnquiry{}
\newcommand*\vl@Company{}
\newcommand*\vl@Name{}
\newcommand*\vl@Street{}
\newcommand*\vl@Zipcode{}
\newcommand*\vl@Town{}
\newcommand*\vl@Land{}
\newcommand*\vl@Device{}
\newcommand*\vl@Condition{}
\newcommand*\vl@ScheduleDate{}
\newcommand*\vl@Fee{} % TODO: Kommazahlen bearbeiten? siunitx ?
Rolf Niepraschk's avatar
Rolf Niepraschk committed

\AtBeginDocument{%
  \begin{letter}{%
    \vl@Company \\
    \vl@Name \smallskip \\
    \vl@Street \\
    \vl@Zipcode\ \vl@Town
    \ifx\vl@Land\@empty\else \bigskip \\ \textls[100]{\MakeUppercase{\vl@Land}} \fi
Rolf Niepraschk's avatar
Rolf Niepraschk committed
  }
    \iflanguage{ngerman}{%
      \subject{Antragsbestätigung}%
      \input{ptb-confirm-de.lco}%
    }{%
      \subject{Confirmation of Order}%
      \input{ptb-confirm-en.lco}%
    }%
  \end{letter}
}%

\endinput