
% TeX as a Programming Language --- Manual Style File
%
%  Andrew Marc Greene  ---   5 March, 1988
%
% For use with TeX only, DO NOT ATTEMPT TO USE THIS WITH LaTeX!!!
%
\font\mainkeyfont=cmr10 scaled 2488
\font\subkeyfont=cmsl10 scaled 1440
\font\pagenumfont=cmr10 scaled 2488
\font\textmain=cmr10 \font\textdb=cmr8
\font\slmain=cmsl10 \font\sldb=cmsl8
\font\ttmain=cmtt10 scaled\magstephalf \font\ttdb=cmtt9
\font\sfmain=cmss10 \font\sfdb=cmss10
\font\bfmain=cmbx10 \font\bfdb=cmbx8
%
\hsize=5.25in
\hoffset=.25in
\vsize=9.3in
\voffset=-.4in
\parskip=.16in
\parindent=0pt
\overfullrule=0pt
%
\newcount\textclass \textclass=0
\def\mainkey#1{\line{\mainkeyfont\hfill #1}}
\def\subkey#1{\line{\subkeyfont\hfill #1}}
\def\newpage#1#2{\vfill\eject
\def\newline{\hfill\break}
{\hsize=6.25in\mainkey{#1}\smallskip\subkey{#2}\medskip\hrule}
\bigskip\hsize=5.25in}
\footline={{\textmain{\TeX} as a Programming Language} \hfill
{\bf\number\pageno}}
%
\catcode`\<=13 \gdef<{\begingroup$\langle$\sl}
\catcode`\>=13 \gdef>{$\rangle$\endgroup}
\catcode`\|=13 \gdef|{\begingroup\tt \catcode64=0\catcode`\\=12
\catcode`\{=12 \catcode`\}=12 \catcode`\$=12 \catcode`\&=12
\catcode`\#=12 \catcode`\%=12 \catcode`\~=12 \catcode`\_=12
\catcode`\^=12 \catcode`\<=12 \catcode`\>=12 \let|=\endgroup \obeylines}
%
\def\classerr{\errhelp={Ask Andrew}%
\errmessage{You can't nest db's.}}
\def\rm{\ifcase\textclass\textmain\or\textdb\else\classerr\fi}
\def\sl{\ifcase\textclass\slmain\or\sldb\else\classerr\fi}
\def\tt{\ifcase\textclass\ttmain\or\ttdb\else\classerr\fi}
\def\sf{\ifcase\textclass\sfmain\or\sfdb\else\classerr\fi}
\def\bf{\ifcase\textclass\bfmain\or\bfdb\else\classerr\fi}
%
\def\cmp#1{{\sf\obeylines #1}} % should be sans serif
\def\ix#1{}
\def\markey#1{}
\def\tbp#1{[#1]} \def\tb{{\TeX}book}
%
\def\dbline{{\nointerlineskip\moveright0.05\hsize%
\hbox{\vrule height0.4pt depth0pt width0.9\hsize}}}
\def\dbbegin{\begingroup
\ifnum\textclass=1{\classerr}\else\textclass=1\rm\baselineskip=9pt
      \parskip=0pt\fi
\bigskip\leftskip=.1\hsize\rightskip=.1\hsize\dbline}
\def\dbend{\par\smallskip\dbline\endgroup}

