%
% J. Daniel Smith
% 29 March 1991
%
% a Sized verbatim & program enviornment.
%
% Usage:
%    \documentstyle[...,sizedverbatim,...]{...}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\typeout{Document Style option `sizedverbatim' <29 Mar 91>.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PROGRAM environment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Similar to VERBATIM, but indented
% not really neaded anymore, "sizedverbatim" can do the same thing.
% Keep this environment around for backwards compatability, and a more
% logical structure for documents.
%
\begingroup \catcode `|=0 \catcode `[= 1
\catcode`]=2 \catcode `\{=12 \catcode `\}=12
\catcode`\\=12 |gdef|@xprogram#1\end{program}[#1|end[program]]
|gdef|@sxprogram#1\end{program*}[#1|end[program*]]
|endgroup
\def\@sprogram{\obeyspaces\@program}
\def\@gobble#1{}
\def\@program{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
%\leftskip\@totalleftmargin\rightskip\z@
\leftskip\leftmargini\rightskip\z@
\parindent\z@\parfillskip\@flushglue\parskip\z@
\@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
\obeylines \tt \catcode``=13 \@noligs \let\do\@makeother \dospecials}

\def\program{\par\@program\frenchspacing\@vobeyspaces \@xprogram}
\let\endprogram=\endtrivlist

\@namedef{program*}{\@program\@sxprogram}
\expandafter\let\csname endprogram*\endcsname =\endtrivlist
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SIZEDVERBATIM environment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Similar to VERBATIM, but in a user specified font size & indent amounts.
% Actual size of font is set with \sizedverbatimsize (a LaTeX size
% command like \small, \footnotesize, etc.)  Default is \normalsize.
% Left indent is set with \sizedverbatimleftskip, right indent with
% \sizedverbatimrightskip; default values of normal "verbatim"
% environment.
%
\def\sizedverbatimsize{\normalsize}
\newskip\sizedverbatimleftskip \newskip\sizedverbatimrightskip
\sizedverbatimleftskip\@totalleftmargin \sizedverbatimrightskip\z@
\begingroup \catcode `|=0 \catcode `[= 1
\catcode`]=2 \catcode `\{=12 \catcode `\}=12
\catcode`\\=12 |gdef|@xsizedverbatim#1\end{sizedverbatim}[#1|end[sizedverbatim]]
|gdef|@sxsizedverbatim#1\end{sizedverbatim*}[#1|end[sizedverbatim*]]
|endgroup
\def\@ssizedverbatim{\obeyspaces\@sizedverbatim}
\def\@gobble#1{}
\def\@sizedverbatim{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
%\leftskip\@totalleftmargin\rightskip\z@
\leftskip\sizedverbatimleftskip\rightskip\sizedverbatimrightskip
\parindent\z@\parfillskip\@flushglue\parskip\z@
\@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
\obeylines \sizedverbatimsize\tt \catcode``=13 \@noligs \let\do\@makeother \dospecials}

\def\sizedverbatim{\par\@sizedverbatim\frenchspacing\@vobeyspaces \@xsizedverbatim}
\let\endsizedverbatim=\endtrivlist

\@namedef{sizedverbatim*}{\@sizedverbatim\@sxsizedverbatim}
\expandafter\let\csname endsizedverbatim*\endcsname =\endtrivlist



