Makefile: Include some custom LaTeX setup.
[mdwtools] / sverb.dtx
index f579d4a..7cc212b 100644 (file)
--- a/sverb.dtx
+++ b/sverb.dtx
@@ -1,50 +1,42 @@
-% \begin{meta-comment}
-%
-% $Id: sverb.dtx,v 1.2 2003/09/05 16:09:30 mdw Exp $
-%
-% Verbatim typesetting done properly (ahem)
-%
-% (c) 1996 Mark Wooding
-%
-% \end{meta-comment}
-%
 % \begin{meta-comment} <general public licence>
 %%
 %% sverb package -- handling of verbatim text
-%% Copyright (c) 1996 Mark Wooding
+%% Copyright (c) 1996, 2003, 2007, 2020 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 file is part of the `mdwtools' LaTeX package collection.
 %%
-%% 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.
+%% `mdwtools' 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.
+%%
+%% `mdwtools' 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.
+%% along with `mdwtools'.  If not, write to the Free Software Foundation,
+%% Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 %%
 % \end{meta-comment}
 %
 % \begin{meta-comment} <Package preamble>
 %<+package>\NeedsTeXFormat{LaTeX2e}
 %<+package>\ProvidesPackage{sverb}
-%<+package>                [2003/09/04 1.4 Verbatim typesetting]
+%<+package>                [2020/09/06 1.14.0 Verbatim typesetting]
 %<+colour>\NeedsTeXFormat{LaTeX2e}
 %<+colour>\ProvidesPackage{svcolour}
-%<+colour>                [2003/09/04 1.4 Colour support for sverb]
+%<+colour>                [2020/09/06 1.14.0 Colour support for sverb]
 %<+color>\NeedsTeXFormat{LaTeX2e}
 %<+color>\ProvidesPackage{svcolor}
-%<+color>                [2003/09/04 1.4 Fix for people who can't spell]
+%<+color>                [2020/09/06 1.14.0 Fix for people who can't spell]
 %<+split>\NeedsTeXFormat{LaTeX2e}
 %<+split>\ProvidesPackage{svsplit}
-%<+split>                [2003/09/04 1.4 Verbatim, but with line breaking]
+%<+split>                [2020/09/06 1.14.0 Verbatim, but with line breaking]
 % \end{meta-comment}
 %
-% \CheckSum{1009}
+% \CheckSum{1012}
 %% \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
 %
 %    \begin{macrocode}
 \def\verbinput{\listinghook\@ifstar{\verbinput@\@input}{\verbinput@\input}}
-\def\verbinput@#1#2{%  
+\def\verbinput@#1#2{%
   \sv@startlisting%
   \setbox\z@\hbox\bgroup%
   #1{#2}%
 % expand to a space character which is not active.  Neat, huh?
 %
 %    \begin{macrocode}
+\begingroup
 \lccode`\~32
 \lccode`\!32
 \lowercase{%
+  \endgroup
   \def\@isspaces#1{%
     \ifx#1\relax%
       \def\@tempb{\@tempswafalse}%
 % If you say \syntax{"\\sv@readenv{"<macro-name>"}"}, it will expand do
 % \begin{listinglist} \listingsize \synshorts
 % <macro-name>"{\\"$_{12}$"end{"$_{12}$<current-env-name>"}"$_{12}$"}"^^A
-%              "{\\end{"<current-env-name>"}}"
+%               "{\\end{"<current-env-name>"}}"
 % \end{listinglist}
 % Easy, no?
 %
 %
 %    \begin{macrocode}
 \newcount\sv@nestcount
-\def\sv@demoname{demo\number\sv@nestcount.tmp}
+\def\sv@demoname{\jobname-demo\number\sv@nestcount.tmp}
 %    \end{macrocode}
 %
 % \end{macro}
 % whitespace on the line.
 %
 %    \begin{macrocode}
-\dimendef\svsplit@remain=1 
+\dimendef\svsplit@remain=1
 \dimendef\svsplit@indent=2
 %    \end{macrocode}
 %
 %    \end{macrocode}
 %
 % Otherwise it's a normal character.  If there's not enough space then force
-% a break.  
+% a break.
 %
 %    \begin{macrocode}
     \else%