diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/base/docstrip.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/base/docstrip.dtx | 328 |
1 files changed, 164 insertions, 164 deletions
diff --git a/Master/texmf-dist/source/latex/base/docstrip.dtx b/Master/texmf-dist/source/latex/base/docstrip.dtx index be2a4711e08..ab107aecf86 100644 --- a/Master/texmf-dist/source/latex/base/docstrip.dtx +++ b/Master/texmf-dist/source/latex/base/docstrip.dtx @@ -1,37 +1,37 @@ % \iffalse meta-comment % -% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 +% Copyright 1993-2014 % The LaTeX3 Project and any individual authors listed elsewhere -% in this file. -% +% in this file. +% % This file is part of the LaTeX base system. % ------------------------------------------- -% +% % It may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt -% and version 1.3c or later is part of all distributions of LaTeX +% and version 1.3c or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% +% % This file has the LPPL maintenance status "maintained". -% +% % The list of all files belonging to the LaTeX base distribution is % given in the file `manifest.txt'. See also `legal.txt' for additional % information. -% -% The list of derived (unpacked) files belonging to the distribution -% and covered by LPPL is defined by the unpacking scripts (with +% +% The list of derived (unpacked) files belonging to the distribution +% and covered by LPPL is defined by the unpacking scripts (with % extension .ins) which are part of the distribution. -% +% % \fi \catcode`\{=1 \catcode`\}=2 \def\filename{docstrip.dtx} \def\fileversion{2.5d} \def\filedate{2005/07/29} -\def\docdate {1999/03/31} +\def\docdate {2014/04/19} % \CheckSum{2439} %% \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 @@ -54,7 +54,7 @@ % %% The docstrip program for use with TeX. %% Copyright (C) 1989-1991 Frank Mittelbach -%% Copyright (C) 1992-1995 Johannes Braams, Denys Duchier, +%% Copyright (C) 1992-1995 Johannes Braams, Denys Duchier, %% Frank Mittelbach %% Copyright (C) 1995 Marcin Woli\'nski %% Copyright (C) 1996-1997 Mark Wooding, Marcin Woli\'nski @@ -142,17 +142,17 @@ % \and % Denys Duchier % \and -% Johannes Braams +% Johannes Braams % \and -% Marcin Woli\'nski +% Marcin Woli\'nski % \and -% Mark Wooding +% Mark Wooding % } % % \date{Printed \today} % % \maketitle -% +% % \begin{abstract} % This document describes the implementation of the \ds{} program. % The original version of this program was developed by Frank @@ -204,7 +204,7 @@ % \TeX\ programs has \TeX\@. Therefore the \ds{} program is % implemented entirely in \TeX. % -% \subsection{Functions of the \ds{} program} +% \subsection{Functions of the \ds{} program} % % Having created the \ds{} program to remove comment lines from % \TeX\ programs\footnote{Note that only comment lines, that is @@ -232,9 +232,9 @@ % to generate the executable versions of your files from the % distribution sources. % Most of the \LaTeX\ distribution is packaged this way. -% To produce such a batch file include a statement in your +% To produce such a batch file include a statement in your % `batch file' that -% instructs \TeX\ to read \texttt{docstrip.tex}. +% instructs \TeX\ to read \texttt{docstrip.tex}. % The beginning of such a file would look like: %\begin{verbatim} % \input docstrip @@ -286,7 +286,7 @@ % And standard packages use %\begin{verbatim} % \usedir{tex/latex/tools} -% \usedir{tex/latex/babel} +% \usedir{tex/latex/babel} %\end{verbatim} % etc. % @@ -312,12 +312,12 @@ %\begin{verbatim} % \BaseDirectory{/usr/local/lib/texmf} %\end{verbatim} -% and for standard em\TeX{} installation +% and for standard em\TeX{} installation %\begin{verbatim} % \BaseDirectory{c:/emtex} %\end{verbatim} % -% \DescribeMacro{\DeclareDir} +% \DescribeMacro{\DeclareDir} % Having specified the base directory you should tell \ds{} how to % interpret labels used in |\usedir| commands. This is done with % |\DeclareDir| with two arguments. The first is the label and the @@ -383,13 +383,13 @@ % |\def\WriteToDir{./}| on MSDOS/Unix, % |\def\WriteToDir{:}| on Macintosh, % |\def\WriteToDir{[]}| on VMS. -% +% % If your system requires something % completely different you can define in |docstrip.cfg| macros % |\dirsep| and |\makepathname|. Check for their definition in the % implementation part. If you want some substantially different % scheme of translating |\usedir| labels into directory names try -% redefining macro |\usedir|. +% redefining macro |\usedir|. % % \subsection{Setting maximum numbers of streams} % @@ -449,7 +449,7 @@ % batch file for \TeX. % % \DescribeMacro{\input} -% All \ds{} batch files should start with the line: |\input docstrip| +% All \ds{} batch files should start with the line: |\input docstrip| % % Do not use the \LaTeX\ syntax |\input{docstrip}| as batch files may % be used with plain~\TeX\ or ini\TeX. @@ -465,7 +465,7 @@ % in the file are ignored. In old files that start % |\def\batchfile{|\ldots\ this command is optional, but is a good % idea anyway. If this command is omitted from a batchfile then -% normally \TeX\ will go to its interactive |*| prompt, so you may +% normally \TeX\ will go to its interactive |*| prompt, so you may % stop \ds{} by typing |\endbatchfile| to this prompt. % % \DescribeMacro{\generate} @@ -628,7 +628,7 @@ % you include a |^^J| character in one of these lines, everything % that follows it on the same line is written to a new line in the % output file. This `feature' can be used to add a |\typeout| or -% |\message| to the the stripped file. +% |\message| to the stripped file. % % \DescribeMacro{\declarepreamble} % \DescribeMacro{\declarepostamble} @@ -642,16 +642,16 @@ % such). In such a case one can say |\declarepreamble\somename|, % then type in his/her preamble, end it with |\endpreamble|, % and later on |\usepreamble\somename| to switch to this -% preamble. +% preamble. % If no preamble should be used you can deploy the |\nopreamble| % command. This command is equivalent to saying |\usepreamble\empty|. % The same mechanism works for postambles, |\use...| % declarations are local and can appear inside |\generate|. % % Commands |\preamble| and |\postamble| define and activate -% pre(post)ambles named |\defaultpreamble| and |\defaultpostamble|. +% pre(post)ambles named |\defaultpreamble| and |\defaultpostamble|. % -% \DescribeMacro{\batchinput} +% \DescribeMacro{\batchinput} % The batch file commands can be put into several batch files which % are then executed from a master batch file. This is, for example, % useful if a distribution consists of several distinct parts. You @@ -659,11 +659,11 @@ % addition a master file that simply calls the batch files for the % parts. For this, call the individual batch files from the master % file with the command |\batchinput{|\meta{file}|}|. Don't use -% |\input| for this purpose, this command +% |\input| for this purpose, this command % should be used only for calling the \ds{} program as explained % above and is ignored when used for any other purpose. % -% \DescribeMacro{\ifToplevel} +% \DescribeMacro{\ifToplevel} % When batch files are nested you may want to suppress certain % commands in the lower-level batch files such as terminal % messages. For this purpose you can use the |\ifToplevel| command @@ -686,7 +686,7 @@ % a \texttt{.}-character is written on the terminal. % \item[\texttt{/}] When a number of empty lines appear in a row in the % input file, at most one of them is retained. The \ds{} -% program signals the removal of an empty line with the +% program signals the removal of an empty line with the % \texttt{/}-character. % \item[\texttt{<}] When a `guard line' is found in the input and it % starts a block of optionally included code, this is signalled @@ -763,12 +763,12 @@ %\DeleteShortVerb\| % \begin{tabular}{lcl} % \meta{Expression} & $::=$ & \meta{Secondary} -% [\{\texttt{|}, \texttt{,}\} +% [\{\texttt{|}, \texttt{,}\} % \meta{Secondary}]*\\ -% \meta{Secondary} & $::=$ & +% \meta{Secondary} & $::=$ & % \meta{Primary} [\texttt{\&} % \meta{Primary}]*\\ -% \meta{Primary} & $::=$ & +% \meta{Primary} & $::=$ & % \meta{Terminal} $|$ \texttt{!}\meta{Primary} % $|$ \texttt{(}\meta{Expression}\texttt{)}\\ % \end{tabular} @@ -799,7 +799,7 @@ % % When a block of code is {\em not\/} included, any guards that occur % within that block are {\em not\/} evaluated. -% +% % \section{Those other languages} % Since \TeX\ is an open system some of \TeX\ packages include % non-\TeX\ files. Some authors use \ds\ to generate PostScript @@ -826,7 +826,7 @@ % \declarepreamble\foo % ____________________________ % Package FOO for use with TeX -% \endpreamble +% \endpreamble %\end{verbatim} % macro |\foo| is defined as %\begin{verbatim} @@ -865,7 +865,7 @@ % source file use value current at time of |\generate|. Note that % this means that you cannot produce concurrently two files using % different |\MetaPrefix|es. -% +% % \subsection{Verbatim mode} % If your programming language uses some construct that can % interferes badly with \ds\ (e.g., percent in column one) you may @@ -874,7 +874,7 @@ % % A `Guard expression' of the form |%<<|\meta{END-TAG} marks % the start of a section that will be copied verbatim upto a line -% containing only a percent in column 1 followed by \meta{END-TAG}. +% containing only a percent in column 1 followed by \meta{END-TAG}. % You can select any \meta{END-TAG} you want, but note that spaces % count here. Example: %\begin{verbatim} @@ -907,7 +907,7 @@ % \section{Producing the documentation} % % We provide a short driver file that can be extracted by the -% \ds{} program using the the conditional `\textsf{driver}'. To +% \ds{} program using the conditional `\textsf{driver}'. To % allow the use of \texttt{docstrip.dtx} as a program at Ini\TeX{} % time (e.g., to strip % off its own comments) we need to add a bit of primitive code. @@ -929,7 +929,7 @@ % We use some trickery to avoid issuing |\end{document}| when % the |\ifx| construction is unfinished. If condition below is % true a |\fi| is constructed on the fly, the |\ifx| is completed, -% and the real |\fi| will never be seen as it comes after +% and the real |\fi| will never be seen as it comes after % |\end{document}|. On the other hand if condition is false % \TeX\ skips over |\csname fi\endcsname| having no idea that % this could stand for |\fi|, driver is skipped and only then @@ -948,11 +948,11 @@ % formatting the documentation. % \begin{macrocode} \documentclass{ltxdoc} - \EnableCrossrefs - % \DisableCrossrefs - % use \DisableCrossrefs if the - % index is ready - \RecordChanges + \EnableCrossrefs + % \DisableCrossrefs + % use \DisableCrossrefs if the + % index is ready + \RecordChanges % \OnlyDescription \typeout{Expect some Under- and overfull boxes} \begin{document} @@ -977,7 +977,7 @@ \ifnum13=\catcode`\~{\egroup\else \catcode`\Z=9 Z -Z \catcode`\{=1 \catcode`\}=2 +Z \catcode`\{=1 \catcode`\}=2 Z \catcode`\#=6 \catcode`\^=7 Z \catcode`\@=11 \catcode`\^^L=13 Z \let\bgroup={ \let\egroup=} @@ -1007,7 +1007,7 @@ Z \def\@if#1#2{% Z \expandafter\def\csname\expandafter\@gobbletwo\string#1% Z \expandafter\@gobbletwo\string#2\endcsname Z {\let#1#2}} -Z +Z Z \def\@gobbletwo#1#2{} Z \def\@gobblethree#1#2#3{} Z @@ -1017,9 +1017,9 @@ Z \let\repeat\fi Z Z \def\empty{} Z -Z \def\tracingall{\tracingcommands2 \tracingstats2 -Z \tracingpages1 \tracingoutput1 \tracinglostchars1 -Z \tracingmacros2 \tracingparagraphs1 \tracingrestores1 +Z \def\tracingall{\tracingcommands2 \tracingstats2 +Z \tracingpages1 \tracingoutput1 \tracinglostchars1 +Z \tracingmacros2 \tracingparagraphs1 \tracingrestores1 Z \showboxbreadth 10000 \showboxdepth 10000 \errorstopmode Z \errorcontextlines 10000 \tracingonline1 } Z @@ -1078,7 +1078,7 @@ Z % \begin{macro}{\ifDefault} % The switch |\ifDefault| is used to indicate whether the % default batch file has to be used. -% \changes{2.0f}{1991/06/04}{Macro added.} +% \changes{2.0f}{1991/06/04}{Macro added.} % \begin{macrocode} \newif\ifDefault % \end{macrocode} @@ -1199,7 +1199,7 @@ Z % \end{macro} % % \begin{macro}{\inputcheck} -% This stream is only used for checking for existence of files. +% This stream is only used for checking for existence of files. % \begin{macrocode} \newread\inputcheck % \end{macrocode} @@ -1226,7 +1226,7 @@ Z % an argument delimited by \verb*= = (i.e.\ a space) that just % gobbles the argument. Since the end-of-line character is % converted by \TeX{} to a space. This means that |\input| is not -% available as a command within batch files. +% available as a command within batch files. % % \begin{macro}{\@@input} % \changes{2.1a}{1993/02/22}{Macro added} @@ -1237,7 +1237,7 @@ Z \ifx\undefined\@@input \let\@@input\input\fi % \end{macrocode} % \end{macro} -% +% % To allow the nesting of batch files the |\batchinput| command is % provided it takes one argument, the name of the batch file to % switch to. @@ -1274,7 +1274,7 @@ Z % \begin{macro}{\skip@input} % \changes{2.0j}{1992/03/03}{Added macro} % \changes{2.0n}{1992/04/26}{Argument delimited by space not \cs{relax}} -% \changes{2.0n}{1992/04/26}{Macro renamed from \cs{skipinput}} +% \changes{2.0n}{1992/04/26}{Macro renamed from \cs{skipinput}} % And here is the promised redefinition of |\input|: % \begin{macrocode} \def\skip@input#1 {} @@ -1491,7 +1491,7 @@ Z % use of the \verb=\loop{=\meta{body}\verb=}\repeat= macro that % is defined in plain \TeX\@. The syntax for this loop is: % \begin{flushleft} -% |\for|\meta{control sequence} |:=| \meta{list} +% |\for|\meta{control sequence} |:=| \meta{list} % |\do|\\ % \meta{body}\\ % |\od| @@ -1573,16 +1573,16 @@ Z % \end{macro} % % \changes{2.3a}{1995/08/18}{New mechanism: output streams allocation} -% +% % \subsubsection{Output streams allocator} -% +% % For each of sixteen output streams available we have a macro % named |\s@0| through |\s@15| saying if the stream is assigned to a % file~(1) or not~(0). Initially all streams are not assigned. % % We also declare 16 counters which will be needed by the conditional % code inclusion algorithm. -% +% % \begin{macrocode} \ifx\@tempcnta\undefined \newcount\@tempcnta \fi \@tempcnta=0 @@ -1593,9 +1593,9 @@ Z \advance\@tempcnta1 \ifnum\@tempcnta<16\repeat % \end{macrocode} -% +% % We will use \emph{The \TeX book} style list to search through streams. -% +% % \begin{macrocode} \let\s@do\relax \edef\@outputstreams{% @@ -1619,18 +1619,18 @@ Z % called, which gobbles rest of the list including the ending % |\@nostreamerror|. It also gobbles |\fi| ending the condition, so % the |\fi| is reinserted. -% +% % \begin{macrocode} \def\@nostreamerror{\errmessage{No more output streams!}} \def\@streamfound#1\@nostreamerror{\fi} % \end{macrocode} % \end{macro}\end{macro} -% +% % |\@stripstr| is auxiliary macro eating characters |\s@| % (backslash,s,@). It is defined in somewhat strange way since |\s@| % must have all category code 12 (other). This macro is used to % extract stream numbers from stream names. -% +% % \begin{macrocode} \bgroup\edef\x{\egroup \def\noexpand\@stripstr\string\s@{}} @@ -1643,11 +1643,11 @@ Z % named the same as the external file being opened. E.g., to % write to file |foo.tex| use |\StreamOpen\foo|, then % |\StreamPut\foo| and |\StreamClose\foo|. -% +% % \begin{macrocode} \chardef\stream@closed=16 \def\StreamOpen#1{% - \chardef#1=\stream@closed + \chardef#1=\stream@closed \def\s@do##1{\ifnum##1=0 \chardef#1=\expandafter\@stripstr\string##1 % \global\chardef##1=1 % @@ -1668,7 +1668,7 @@ Z \def\StreamPut{\immediate\write} % \end{macrocode} % \end{macro}\end{macro}\end{macro} -% +% % \subsubsection{Input and Output} % % \begin{macro}{\maybeMsg} @@ -1677,7 +1677,7 @@ Z % When this program is used it can optionally show its progress on % the terminal. In that case it will write a special character to % the terminal (and the transcript file) for each input line. This -% option is on by default when statistics are included in +% option is on by default when statistics are included in % \texttt{docstrip.tex}. It is off when statistics are excluded. The % commands |\showprogress| and |\keepsilent| can be used % to choose otherwise. @@ -1806,12 +1806,12 @@ Z \edef#1{\the\@temptokena#2}} % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\@ifpresent} % This macro checks if its first argument is present on a % list passed as the second argument. Depending on the result % it executes either its third or fourth argument. -% +% % \begin{macrocode} \def\@ifpresent#1#2#3#4{% \def\tmp##1#1##2\qStop{\ifx!##2!}% @@ -1876,7 +1876,7 @@ Z % \end{macrocode} % \end{macro} % \begin{macro}{\kernel@ifnextchar} -% \changes{v2.5d}{2005/07/29}{Added macro} +% \changes{v2.5d}{2005/07/29}{Added macro} % The 2003/12/01 release of \LaTeX\ incorporated this macro to avoid % problems with \texttt{amsmath} but this also means that we have to % perform the same trick here when people use \LaTeX\ on a @@ -1888,10 +1888,10 @@ Z % % % \subsection{The evaluation of boolean expressions} -% +% % For clarity we repeat here the syntax for the boolean expressions % in a somewhat changed but equivalent way: -% +% % \DeleteShortVerb\| % \begin{tabular}{lcl} % \meta{Expression} & $::=$ & \meta{Secondary} $|$ @@ -1900,19 +1900,19 @@ Z % \meta{Secondary} & $::=$ & \meta{Primary} $|$ % \meta{Primary} \texttt{\&} % \meta{Secondary}\\ -% \meta{Primary} & $::=$ & +% \meta{Primary} & $::=$ & % \meta{Terminal} $|$ \texttt{!}\meta{Primary} -% $|$ +% $|$ % \texttt{(}\meta{Expression}\texttt{)}\\ % \end{tabular} -% +% % The \texttt{|} stands for disjunction, the \texttt{\&} stands for % conjunction and the \texttt{!}\ stands for negation. The % \meta{Terminal} is any sequence of letters and evaluates to % \meta{true} iff it occurs in the list of options that have to be % included. % \MakeShortVerb\| -% +% % Since we can generate multiple output files from one input, % same guard expressions can be computed several times with % different options. For that reason we first ``compile'' the @@ -1921,10 +1921,10 @@ Z % options produces 1 or 0 as a result. The idea is to say % |\if1\Expr{|\meta{current set of options}|}...\fi| for all % output files. -% +% % Here is a table recursively defining translations for right % sides of the grammar. $\tau(X)$ denotes translation of~$X$. -% +% % \DeleteShortVerb\| % \MakeShortVerb\" % \begingroup @@ -1958,11 +1958,11 @@ Z %\end{verbatim} % When called as above this will expand to |1| if |foo| is % present on current list of options and to |0| otherwise. -% +% % Macros below work in ``almost expand-only'' mode i.e. % expression is analyzed only by expansion but we have to define % some macros on the way (e.g., |\Expr| and |\t@foo|). -% +% % The first parameter of each of these macros is % ``continuation'' (in the sense similar to the language % \textsc{Scheme}). Continuation is a function of at least one @@ -1973,12 +1973,12 @@ Z % argument) passing to it whole constructed translation. % Continuation may expect more arguments if it wants to see what % comes next on the input. -% +% % We will perform recursive descent parse, but definitions will % be presented in bottom-up order. -% +% % \begin{macro}{\Terminal} -% +% % \meta{Terminal}s are recognized by macro |\Terminal|. The % proper way of calling it is |\Terminal{|\meta{current % continuation}|}{}|. Parameters are: continuation, @@ -1987,7 +1987,7 @@ Z % then takes appropriate actions. Since there are 7 ending % chars and probably one |\csname| costs less than 7 nested % |\if|s we construct a name and check if it is defined. -% +% % We must expand |\ifx| completely before taking next actions so % we use |\afterfi|. % \begin{macrocode} @@ -1996,21 +1996,21 @@ Z % \end{macrocode} % If condition is true |#3| belongs to current \meta{Terminal} % so we append it to \meta{Terminal}-so-far and call |\Terminal| -% again. +% again. % \begin{macrocode} \afterfi{\Terminal{#1}{#2#3}}\else % \end{macrocode} % When condition is false it's time to end the \meta{Terminal} % so we call macro |\TerminalX|. Next character is reinserted to % the input. -% +% % In both cases continuation is passed unchanged. % \begin{macrocode} \afterfi{\TerminalX{#1}{#2}#3}\fi } % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\eT@} % Here we define macros marking characters that cannot appear % inside terminal. The value is not important as long as it is @@ -2022,11 +2022,11 @@ Z \Name\let{eT@(}=1 \Name\let{eT@)}=1 % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\TerminalX} % This macro should end scanning of \meta{Terminal}. Parameters % are continuation and gathered tokens of \meta{Terminal}. -% +% % Macro starts by issuing an error message if \meta{Terminal} is % empty. % \begin{macrocode} @@ -2046,10 +2046,10 @@ Z } % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\Primary} % Parameters are continuation and next character from the input. -% +% % According to the syntax \meta{Primari}es can have three forms. % This makes us use even more dirty tricks than usual. Note the % |\space| after a series of |\ifx|s. This series produces an @@ -2060,7 +2060,7 @@ Z % |\if|s and so to use |\afterfi|. % \begin{macrocode} \def\Primary#1#2{% - \ifcase \ifx!#20\else\ifx(#21\else2\fi\fi\space + \ifcase \ifx!#20\else\ifx(#21\else2\fi\fi\space % \end{macrocode} % First case is for |!| i.e. negated \meta{Primary}. In this % case we call |\Primary| recursively but we create new @@ -2084,11 +2084,11 @@ Z } % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\NPrimary} % Parameters are continuation and previously computed % \meta{Primary}. -% +% % This macro negates result of previous computations according % to the rule % $$\tau(!\meta{Primary}) @@ -2097,21 +2097,21 @@ Z \def\NPrimary#1#2{% #1{\noexpand\if1#20\noexpand\else1\noexpand\fi}% } -% \end{macrocode} +% \end{macrocode} % \end{macro} -% +% % \begin{macro}{\PExpression} % Parameters: continuation, \meta{Expression}, next character % from input. We are checking if character is |)| and then pass % unchanged result to our continuation. % \begin{macrocode} -\def\PExpression#1#2#3{% +\def\PExpression#1#2#3{% \ifx)#3\else \errmessage{Error in expression: expected right parenthesis}\fi #1{#2}} % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\Secondary} % Each \meta{Secondary} expression starts with \meta{Primary}. % Next checks will be performed by |\SecondaryX|. @@ -2120,7 +2120,7 @@ Z \Primary{\SecondaryX{#1}}} % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\SecondaryX} % Parameters: continuation, translation of \meta{Primary}, next % character. We start by checking if next character is |&|. @@ -2143,9 +2143,9 @@ Z \afterfi{#1{#2}#3}\fi } \egroup -% \end{macrocode} +% \end{macrocode} % \end{macro} -% +% % \begin{macro}{\SecondaryXX} % Parameters: continuation, translation of \meta{Primary}, % translation of \meta{Secondary}. We construct translation of @@ -2159,16 +2159,16 @@ Z #1{\noexpand\if0#20\noexpand\else#3\noexpand\fi}} % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\Expression} % Every \meta{Expression} starts with \meta{Secondary}. We % construct new continuation and pass it to |\Secondary|. % \begin{macrocode} \def\Expression#1{% \Secondary{\ExpressionX{#1}}} -% \end{macrocode} +% \end{macrocode} % \end{macro} -% +% % \begin{macro}{\ExpressionX} % Parameters: continuation, translation of \meta{Secondary}, % next character. We perform check if character is @@ -2189,11 +2189,11 @@ Z } % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\ExpressionXX} % Parameters: continuation, translation of \meta{Secondary}, % translation of \meta{Expression}. -% We finish up translating of \meta{Expression} according to +% We finish up translating of \meta{Expression} according to % the formula: % $$\tau(\mbox{\meta{Secondary}\texttt{\char`\|}\meta{Expression}}) % =|\if1|\,\tau(\meta{Secondary})\,|1\else| @@ -2201,9 +2201,9 @@ Z % \begin{macrocode} \def\ExpressionXX#1#2#3{% #1{\noexpand\if1#21\noexpand\else#3\noexpand\fi}} -% \end{macrocode} +% \end{macrocode} % \end{macro} -% +% % \begin{macro}{\StopParse} % Here is initial continuation for whole parse process. It will % be used by |\Evaluate|. Note that we assume that expression @@ -2216,8 +2216,8 @@ Z \edef\Expr##1{#1}} % \end{macrocode} % \end{macro} -% -% \begin{macro}{\Evaluate} +% +% \begin{macro}{\Evaluate} % This macro is used to start parsing. We call |\Expression| % with continuation defined above. On end of expression we % append a |>|. @@ -2291,7 +2291,7 @@ Z % The macro |\putMetaComment| has one argument, delimited with % |\endLine|. It brings the source line with |%%| stripped. We % prepend to it |\MetaPrefix| (which can be different from |%%|) -% and send the line to all active files. +% and send the line to all active files. % \begin{macrocode} \edef\inLine{\MetaPrefix#1}% \let\do\putline@do @@ -2325,7 +2325,7 @@ Z % a `\texttt{\%}' further processing has to be done by % |\processLineX|; otherwise this is normal (not commented out) % line. -% +% % In either case the character read is reinserted to the input % as it may have to be written out. % @@ -2361,7 +2361,7 @@ Z % % \begin{macro}{\processLineX} % \changes{2.3a}{1995/08/20}{Trying to avoid assignments} -% This macro is also defined within a group, +% This macro is also defined within a group, % because it also has to check if the next % token in the input stream is a `\texttt{\%}' character. % @@ -2408,9 +2408,9 @@ Z % slash (\texttt{/}) a plus (\texttt{+}), a minus (\texttt{-}), a % less-than sign (\texttt{<}) starting verbatim mode or % any other character that can be found in an option name. This -% means that we have to peek at the next token and -% decide what kind of guard we have. -% +% means that we have to peek at the next token and +% decide what kind of guard we have. +% % We reinsert |#1| as it may be needed by |\doOption|. % \begin{macrocode} \def\checkOption<#1{% @@ -2431,7 +2431,7 @@ Z % \begin{macro}{\doOption} % When no guard modifier is found by |\checkOptions|, the % macro |\doOption| is called. It evaluates a boolean -% expression. The result of this evaluation is stored in +% expression. The result of this evaluation is stored in % |\Expr|. The guard only affects the current % line, so |\do| is defined in such a way that depending on the % result of the test |\if1\Expr{|\meta{options}|}|, the current @@ -2517,7 +2517,7 @@ Z % \begin{macrocode} \def\blockHead{#1}% % \end{macrocode} -% Now we evaluate guard expression for all output files +% Now we evaluate guard expression for all output files % updating off-counters. Then we create new list of active % output files. Only files that were active in the outer block % can remain active now. @@ -2670,7 +2670,7 @@ Z % \changes{2.3e}{1996/10/02}{Added doc} % \ds{} keeps information needed to control inclusion of sources in % several list structures. Lists are macros expanding to a series -% of calls to macro |\do| with two or three parameters. +% of calls to macro |\do| with two or three parameters. % Subsequently |\do| is redefined in various ways and list % macros sometimes are executed to perform some action on every % element, and sometimes are used inside an |\edef| to make new @@ -2689,7 +2689,7 @@ Z % \end{itemize} % % For every output file name \meta{outfile} \ds{} keeps following -% information: +% information: % \begin{itemize} % \item[\cs{pth@}\meta{outfile}] full pathname (including file name), % \item[\cs{ref@}\meta{outfile}] reference lines for the file, @@ -2697,7 +2697,7 @@ Z % with spaces (needed by \cs{InFileName}), % \item[\cs{pre@}\meta{outfile}] preamble template (as defined with % |\declarepreamble|), -% \item[\cs{post@}\meta{outfile}] postamble template. +% \item[\cs{post@}\meta{outfile}] postamble template. % \end{itemize} % % \begin{macro}{\generate} @@ -2775,9 +2775,9 @@ Z % \begin{macrocode} \immediate\openin\inFile\@pathname\relax \ifeof\inFile\else - \Ask\answer{File \@pathname\space already exists + \Ask\answer{File \@pathname\space already exists \ifx\empty\destdir somewhere \fi - on the system.^^J% + on the system.^^J% Overwrite it% \ifx\empty\destdir\space if necessary\fi ? [y/n]}% @@ -2840,7 +2840,7 @@ Z #2% \let\from\err@from \let\needed\err@needed % \end{macrocode} -% We check order of input files. +% We check order of input files. % \begin{macrocode} \checkorder % \end{macrocode} @@ -2874,7 +2874,7 @@ Z \def\checkorderX(#1)#2\qStop#3\qStop{% \def\tmp##1\readsource(#1)##2\qStop{% \ifx!##2! \order@error - \else\ifx!#2!\else + \else\ifx!#2!\else \checkorderXX##2% \fi\fi}% \def\checkorderXX##1\readsource(#1)\fi\fi{\fi\fi @@ -2892,7 +2892,7 @@ Z % \end{macro} % % \begin{macro}{\needed} -% \changes{2.3c}{1995/08/24}{Macro added} +% \changes{2.3c}{1995/08/24}{Macro added} % \changes{2.3e}{1996/09/12}{Forced expansion of argument to fix a bug % with filenames containing macros} % \begin{macro}{\@needed} @@ -2937,7 +2937,7 @@ Z % \end{macro} % % \begin{macro}{\from} -% \changes{2.3c}{1995/08/24}{part of code moved to \cs{needed}} +% \changes{2.3c}{1995/08/24}{part of code moved to \cs{needed}} % |\from| starts by adding a line to preamble for output file. % \begin{macrocode} \def\from#1#2{\errmessage{Command `\string\from' only allowed in @@ -3000,7 +3000,7 @@ Z % off-counters' names} % \changes{2.3e}{1996/10/02}{Introduced ``open list''} % When the input file was successfully opened, we try to open all -% needed output files by executing the ``open list''. +% needed output files by executing the ``open list''. % If any of files couldn't be opened because of number of streams % limits, their names are put into |\refusedfiles| list. This list % subsequently becomes the open list for the next pass. @@ -3012,7 +3012,7 @@ Z % Now all output files that could be opened are open. So we go % through the ``output list'' and for every open file we display a % message and zero the off-counter, while closed files are appended -% to |\refusedfiles|. +% to |\refusedfiles|. % \begin{macrocode} \Msg{} \def\@msg{Processing file \uptospace#1 \qStop} \def\change@msg{% @@ -3143,14 +3143,14 @@ Z % \end{macro} % % \begin{macro}{\showfiles@do} -% \changes{2.4a}{1996/10/02}{Macro added (MW)} +% \changes{2.4a}{1996/10/02}{Macro added (MW)} % A message is displayed on the terminal telling the user what we % are about to do. For each open output file we display one line % saying what options it is generated with and the off-counter % associated with the file is zeroed. First line contains also name % of input file. % Names of output files that are closed are appended to -% |\refusedfiles|. +% |\refusedfiles|. % \begin{macrocode} \def\showfiles@do#1#2{% \ifnum#1=\stream@closed @@ -3181,7 +3181,7 @@ Z % % \begin{macro}{\openoutput} % \changes{2.3e}{1996/10/02}{Change for ``open lists'' -- renamed from -% \cs{ensureopen@do}} +% \cs{ensureopen@do}} % \changes{2.4a}{1996/06/06}{Check whether there are streams left (MDW)} % This macro opens output streams if possible. % \begin{macrocode} @@ -3211,7 +3211,7 @@ Z % % \begin{macro}{\closeoutput} % \changes{2.4a}{1996/06/06} -% {Don't close the file if it's not open (MDW)} +% {Don't close the file if it's not open (MDW)} % This macro closes open output stream when it is no longer % needed and increments maxfiles counters. % \begin{macrocode} @@ -3230,7 +3230,7 @@ Z % \begin{macro}{\ds@heading} % \changes{2.3e}{1996/09/16}{Macro added.} % This is a couple of lines, stating what file is being written and -% how it was created. +% how it was created. % \begin{macrocode} \def\ds@heading{% \MetaPrefix ^^J% @@ -3261,7 +3261,7 @@ Z % \begin{macro}{\declarepreamble} % \changes{2.3a}{1995/08/18}{renamed from \cs{preamble}; % interface changed} -% \changes{2.0e}{1991/06/01}{Macro added.} +% \changes{2.0e}{1991/06/01}{Macro added.} % \changes{2.3e}{1995/09/25} % {Change for batchfiles working by \cs{input}} % \changes{2.3e}{1996/09/16}{Change to allow customization.} @@ -3366,7 +3366,7 @@ Z \declarepreamble\defaultpreamble} \def\postamble{\usepostamble\defaultpostamble \declarepostamble\defaultpostamble} -% \end{macrocode} +% \end{macrocode} % \end{macro} % \end{macro} % \begin{macro}{\org@preamble} @@ -3418,7 +3418,7 @@ in the same archive or directory.) % % \begin{macro}{\originaldefault} % \changes{2.5a}{1998/04/03}{Macro added} -% \changes{2.5b}{1998/04/28}{Macro renamed from \cs{orginaldefault} +% \changes{2.5b}{1998/04/28}{Macro renamed from \cs{orginaldefault} % to \cs{originaldefault}} % The default preamble header changed in v2.5 to allow distribution % of generated files as long as source also distributed. If you need @@ -3491,7 +3491,7 @@ for copying and modification in the file \inFileName. % \end{macro} % % \subsection{Support for writing to specified directories} -% +% % As we've seen before every output file is written to directory % specifed by the value of |\destdir| current at the moment of % this file's |\file| declaration. @@ -3511,11 +3511,11 @@ for copying and modification in the file \inFileName. \def\showdirectory#1{\WriteToDir} % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\BaseDirectory} % \changes{2.3e}{1995/09/15}{Macro added} % \changes{2.4e}{1996/10/22}{\cs{@setwritetodir} added (DPC)} -% This is config file command for specifing root directory of the +% This is config file command for specifing root directory of the % \TeX{} hierarchy. It enables the whole directory % selecting mechanism by redefining |\usedir|. % First make sure that the directory syntax commands have been set @@ -3529,7 +3529,7 @@ for copying and modification in the file \inFileName. \edef\basedir{#1\dirsep}} % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\convsep} % \changes{2.3e}{1995/09/15}{Macro added} % This macro loops through slashes in its argument replacing them @@ -3541,16 +3541,16 @@ for copying and modification in the file \inFileName. \def\pesvnoc#1\qStop{\fi} % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\alt@usedir} % \changes{2.3e}{1995/09/15}{Macro added} % Directory name construction macro enabling writing to various -% directories. +% directories. % \begin{macrocode} \def\alt@usedir#1{% \Name\ifx{dir@#1}\relax \undefined@directory{#1}% - \else + \else \edef\destdir{\csname dir@#1\endcsname}% \fi} \def\showalt@directory#1{% @@ -3559,7 +3559,7 @@ for copying and modification in the file \inFileName. \else\csname dir@#1\endcsname\fi} % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\undefined@directory} % \changes{2.4a}{1996/10/04}{Macro added (MW)} % \changes{2.4e}{1996/10/22}{Help text added (DPC)} @@ -3627,7 +3627,7 @@ for copying and modification in the file \inFileName. \ifx t#2\askforoverwritetrue \else\askforoverwritefalse\fi \generate{\file{#1}{#3}}% - }} + }} % \end{macrocode} % \end{macro} % @@ -3683,11 +3683,11 @@ for copying and modification in the file \inFileName. % these commands, but issue a warning when they are used. % \begin{macrocode} \def\processfile{\Msg{% - ^^Jplease use \string\processFile\space instead of + ^^Jplease use \string\processFile\space instead of \string\processfile!^^J}% \processFile} \def\generatefile{\Msg{% - ^^Jplease use \string\generateFile\space instead of + ^^Jplease use \string\generateFile\space instead of \string\generatefile!^^J}% \generateFile} % \end{macrocode} @@ -3715,7 +3715,7 @@ for copying and modification in the file \inFileName. % The configuration command |\maxfiles| is just slightly prettier than % an assignment, for \LaTeX\ people. It also gives me an opportunity % to check that the limit is vaguely sensible. I need at least 4 -% streams: +% streams: % \begin{enumerate} % \item A batch file. % \item A sub batch file, which \LaTeX's installation utility uses. @@ -3737,7 +3737,7 @@ for copying and modification in the file \inFileName. % \end{macrocode} % % \changes{2.4a}{1996/10/03}{No default limit since batchfiles are now -% \cs{input} (MW)} +% \cs{input} (MW)} % Since batchfiles are now |\input|ed there should be no default limit % here. I'll just use some abstract large number. % \begin{macrocode} @@ -3820,7 +3820,7 @@ for copying and modification in the file \inFileName. % \changes{2.3e}{1995/09/25}{Batch file is \cs{input}ed not \cs{read}} % When \ds{} is run it always tries to use a batch file. % -% For this purpose it calls the macro |\processbatchFile|. +% For this purpose it calls the macro |\processbatchFile|. % % \changes{2.4a}{1996/06/06} % {Added check for file limits (MDW)} @@ -3989,10 +3989,10 @@ for copying and modification in the file \inFileName. % \changes{2.0p}{1992/06/26}{Changed question about overwriting.} % \begin{macrocode} \Continuefalse - \Ask\answer{File \destdir\destFileName\space already - exists + \Ask\answer{File \destdir\destFileName\space already + exists \ifx\empty\destdir somewhere \fi - on the system.^^J% + on the system.^^J% Overwrite it% \ifx\empty\destdir\space if necessary\fi ? [y/n]}% @@ -4145,7 +4145,7 @@ for copying and modification in the file \inFileName. % a file name. Its default value defined here is suitable for % \textsc{unix, ms-dos} and Macintosh, but for some systems it may % be needed to redefine this in \texttt{docstrip.cfg} file. We -% provide such redefinition for VMS here. +% provide such redefinition for VMS here. % % Macro |\dirsep| holds directory separator specific for a % system. Default value suitable for UNIX and DOS is slash. It @@ -4154,7 +4154,7 @@ for copying and modification in the file \inFileName. % The definition of this macro is now delayed until |\@setwritedir| % is called. % \end{macro} -% +% % \begin{macro}{\@setwritedir} % \changes{2.4e}{1996/10/22}{macro added (DPC)} % The following tests try to automatically set |\WriteToDir|, @@ -4228,7 +4228,7 @@ for copying and modification in the file \inFileName. % % If the user has a |docstrip.cfg| file, use it now. % \changes{2.4d}{1995/10/17}{Move config file test to outer level (DPC)} -% This macro tries to read \texttt{docstrip.cfg} file. If this +% This macro tries to read \texttt{docstrip.cfg} file. If this % succeeds executes its first argument, otherwise the second. % \begin{macrocode} \immediate\openin\inputcheck=docstrip.cfg\relax @@ -4261,7 +4261,7 @@ for copying and modification in the file \inFileName. % do not start with |\def\batchfile{|\ldots % \begin{macrocode} \def\process@first@batchfile{% - \processbatchFile + \processbatchFile \ifnum\NumberOfFiles=\z@ \interactive \fi @@ -4316,9 +4316,9 @@ for copying and modification in the file \inFileName. % % First check whether the user has % defined the control sequence |\batchfile|. If he did, it should -% contain the name of the file to process. +% contain the name of the file to process. % If he didn't, try the current file, unless that is |docstrip.tex| -% in which case a default name is tried. +% in which case a default name is tried. % Whether or not the default batch file is used is % remembered by setting the switch |\ifDefault| to \meta{true} or % \meta{false}. |