% dir.tex -- by Frank Neukam  (01 Dec 1993)
% Generates a directory from given .ADR file
% Remove `german' two lines below if german.sty is unavailable or useless

\documentstyle[german,10pt,twoside]{script_s}
\headseplineon
\raggedbottom

\def\empty{}
\def\adrfile{}
\def\adrtitle{}

\typeout{}
\typeout{*** dir.tex v2.0 by Frank Neukam <01 Dec 1993> ***}
\typeout{}
\typein[\adrfile]{Name of .ADR file (without .ADR): }
\typeout{}
\typein[\adrtitle]{Title of directory: }
\typeout{}
\ifx\adrtitle\empty\def\adrtitle{\ }\fi

\newdimen\paperwidth
\newdimen\leftfield
\newdimen\rightfield
\newdimen\adrindent
\paperwidth 210mm
\leftfield 40mm
\rightfield 25mm
\adrindent 1em
\advance\leftfield by -\adrindent
\textwidth 70mm
\oddsidemargin -1in
\evensidemargin -1in
\advance\oddsidemargin by 9mm
\advance\evensidemargin by \paperwidth
\advance\evensidemargin by -9mm
\advance\evensidemargin by -\textwidth
\textheight 120mm
\headheight 1\baselineskip
\headsep 0.5\baselineskip
\footheight 1\baselineskip
\footskip 1.5\baselineskip
\topmargin -1in
\advance\topmargin by 8mm
\marginparwidth 0in
\marginparsep 0in
\marginparpush 0in
\parskip 0.5\baselineskip
\parindent 0in

\begin{document}
\def\headfont{\sfb}
\def\adrchar#1{\clearpage\typeout{#1}\markboth{#1}{#1}}
\def\adrentry#1#2#3#4#5#6#7#8{\hspace{\adrindent}%
 \parbox[b]{\leftfield}{\raggedright \hspace{-\adrindent}{\sc #1}%
 \ifx #2\empty \else , #2\fi%
 \ifx #3\empty \else \par #3\fi%
 \ifx #7\empty \else \par (#7)\fi}%
 \hfill%
 \parbox[b]{\rightfield}{\raggedright%
 \ifx #8\empty \else {\scriptsize #8}\par \fi #4}\par}
\ifx\adrfile\empty \else
 \pagestyle{empty}
 \null\vfil
 \begin{center}
 {\Large \sfb \adrtitle}
 \end{center}
 \vfil\vfil\null
 \cleardoublepage
 \pagestyle{myheadings}
 \input\adrfile.adr\relax
\fi
\end{document}

