%% %% This is file `sverb.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% sverb.dtx (with options: `package') %% %% IMPORTANT NOTICE %% %% sverb package -- handling of verbatim text %% Copyright (c) 1996 Mark Wooding %% %% This program is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by %% the Free Software Foundation; either version 2 of the License, or %% (at your option) any later version. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program; if not, write to the Free Software %% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{sverb} [1996/05/08 1.02 Verbatim typesetting] %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% \def\@cspecials{% \begingroup% \catcode`|0% \catcode`<1% \catcode`>2% \catcode`\{12% \catcode`\}12% \catcode`\\12% } \def\sv@startlisting{% \def\par{\@@par\penalty\interlinepenalty}% \@@par% \leftskip\@totalleftmargin% \obeylines% \@noligs% \let\do\@makeother\dospecials% \verbatim@font% \frenchspacing% \@vobeyspaces% \settabwidth% \catcode9\active% \lccode`\~9\lowercase{\let~\sv@vtab}% \lccode`\~13\lowercase{\let~\vinput@cr}% \interlinepenalty500% } \newdimen\svtab \def\settabwidth{\setbox\z@\hbox{\texttt{\space}}\svtab8\wd\z@} \def\sv@vtab{% \hfill\egroup% \@tempdima\wd\z@% \divide\@tempdima\svtab% \multiply\@tempdima\svtab% \advance\@tempdima\svtab% \wd\z@\@tempdima% \leavevmode\box\z@% \setbox\z@\hbox\bgroup% } \def\verbinput#1{% \begin{listinglist}% \listingsize% \sv@startlisting% \setbox\z@\hbox\bgroup% \input{#1}% \sv@stripspc% \egroup% \ifdim\wd\z@=\z@% \ifhmode\par\fi% \else% \leavevmode\box\z@\par% \fi% \end{listinglist}% } \def\vinput@cr{% \egroup% \leavevmode\box\z@% \par% \setbox\z@\hbox\bgroup% } \newif\if@matched \def\matcher#1#2#3{% \expandafter\def\csname\string#1$match\endcsname##1#2##2##3\end{% \ifx##2\relax% \@matchedfalse% \else% \@matchedtrue% \fi% #3{##1}% }% \expandafter\def\expandafter#1\expandafter##\expandafter1\expandafter{% \csname\string#1$match\endcsname##1#2\relax\end% }% } \def\sv@stripspc{% \unpenalty% \ifdim\lastskip=\z@\else% \unskip\expandafter\sv@stripspc% \fi% } \begingroup \catcode`\%=12 \gdef\sv@percent#1#2\relax {\ifx\check@percent\@@undefined \ifx#1\relax\def\@tempa{}\else \def\@tempa{#1#2}\fi\else \ifx#1\relax\def\@tempa{}\else \ifx#1%\def\@tempa{#2}\else \def\@tempa{#1#2}\fi\fi\fi} \endgroup \lccode`\~32 \lccode`\!32 \lowercase{% \def\@isspaces#1{% \ifx#1\relax% \def\@tempb{\@tempswafalse}% \else\ifx#1~% \let\@tempb\@isspaces% \else% \def\@tempb##1\relax{}% \fi\fi% \@tempb% } \def\sv@safespc{% \catcode32\active% \def~{ }% } } \def\sv@read#1#2#3{% \begingroup% \matcher\@match{#1}\sv@read@ii% \catcode13\active% \catcode32\active% \@tempswafalse% \lccode`\~13\lowercase{% \def\sv@read@i##1~{\@match{##1}}% }% \def\sv@read@ii##1{% \sv@percent##1\relax\relax% \if@matched\@tempswafalse\fi% \if@tempswa\else\@tempswatrue\expandafter\@isspaces\@tempa\relax\fi% \if@tempswa% \begingroup% \expandafter#2\expandafter{\@tempa}% \endgroup% \fi% \@tempswatrue% \if@matched\def\@tempa{\endgroup#3}\else\let\@tempa\sv@read@i\fi% \@tempa% }% \sv@read@i% } \def\sv@verbline#1{% \setbox\z@\hbox{#1\sv@stripspc}% \ifdim\wd\z@=\z@% \if@matched\ifhmode\par\relax\fi\else\leavevmode\par\relax\fi% \else% \leavevmode\box\z@\par\relax% \fi% } \newdimen\listingindent \AtBeginDocument{% \ifdim\parindent=\z@\listingindent1em\else\listingindent\parindent\fi% } \ifx\listingsize\@@undefined \let\listingsize\small \fi \def\listinglist{% \list{}{% \leftmargin\listingindent% \rightmargin\z@% \labelwidth\z@% \labelsep\z@% \itemindent\z@% \listparindent\z@% \let\makelabel\relax% \parsep\z@skip% }% \parfillskip\@flushglue% \item\relax% } \let\endlistinglist\endlist \@cspecials |gdef|listing<% |listinglist% |listingsize% |sv@listing<\end{listing}><|end