## 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 mdwtools; if not, write to the Free Software Foundation,
## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%
% \DescribeMacro{\atdef}
% For \TeX\ hackers, the |\atdef| command defines @-commands using a syntax
-% similar to \TeX's built-in |\def|.
+% similar to \TeX's built-in |\def|.
%
% As an example, the following command makes @.{"@/"<text>"/"} write its
% argument \<text> in italics:
{\at@ifcat 0%
{\at@ifletter@i{#1}{#2}}%
{#2}%
- }%
+ }%
}
% \end{macrocode}
%
%
% \begin{macro}{\at@protect}
%
-% Since we gobbled the |\fi| from the above, we must put that back. We then
-% need to do things which are more complicated. If |\protect| is behaving
+% Since we gobbled the |\fi| from the above, we must put that back. We then
+% need to do things which are more complicated. If |\protect| is behaving
% like |\string|, then we do one sort of protection. Otherwise, we assume
% that |\protect| is being like |\noexpand|.
%
\def\mtt@chars{%
\do\#\#%
\do\%\%%
- \do\&\&%
+ \do\&\&%
\do\^\^%
\do\~\~%
\do\'\textquotesingl%
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
-dnl
+dnl
dnl mdwtools is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
-dnl
+dnl
dnl You should have received a copy of the GNU General Public License
dnl along with mdwtools; if not, write to the Free Software Foundation,
dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%% 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
% \DescribeMacro\Game
% \begin{synshorts}
% Some standard `things' are provided: "\\Succ{"<notion>"}{"<scheme>"}",
-% "\\Adv{"<notion>"}{"<scheme>"}", "\\InSec{"<notion>"}",
+% "\\Adv{"<notion>"}{"<scheme>"}", "\\InSec{"<notion>"}",
% "\\Expt{"<notion>"}{"<scheme>"}", and "\\Game{"<notion>"}{"<scheme>"}".
% \end{synshorts}
%
% \syntax{"\\Perm{"<L>"}"} typeset $\Func{l}{L}$ and $\Perm{L}$ respectively,
% and are intended to denote the sets of all functions $F\colon \{0, 1\}^l
% \to \{0, 1\}^L$ and all permutations $\Pi\colon \{0, 1\}^L \to \{0, 1\}^L$
-% respectively.
+% respectively.
%
% \DescribeMacro\PKCS
% Finally, the |\PKCS| macro typesets `\PKCS{$n$}', allowing you to name RSA
% Security Inc.'s Public Key Cryptography Standards in a relatively nice way.
-%
+%
% \implementation
%
%
%% 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
% If you don't give a file extension, then |.ans| is appended automatically.
%
% \implementation
-%
+%
%
%^^A-------------------------------------------------------------------------
% \section{Implementation}
%
% The \env{parlist} environment is a trimmed-down version of a normal list.
% We todge the |\item| command, make |\list| and |\trivlist| make errors, and
-% do various normal list things.
+% do various normal list things.
%
% \begin{macrocode}
\def\parlist#1#2{%
% Examples:
% \begin{itemize} \synshorts
% \item "foo = bar" is a key-value pair. The key is `foo' and the value is
-% `bar'.
+% `bar'.
% \item `{foo = bar}' is a tag. The key is `foo = bar'.
% \item `foo = { bar }' is a key-value pair. The key is `foo' and
% the value is ` bar ' (with the leading and trailing spaces).
% <key> is given a value: the value is available as "#1" in <stuff>.
% \item "\\mkdef{"<group>"}{"<key>"}["<default>"]{"<stuff>"}" is the same,
% but additionally if <key> is found as a tag, then treat it as if we found
-% <key>"={"<default>"}" instead.
+% <key>"={"<default>"}" instead.
% \item "\\mkdef{"<group>"}{"<key>"}*{"<stuff>"}" will perform <stuff> when
-% <key> is found as a tag.
+% <key> is found as a tag.
% \item "\\mkdef*{"<group>"}{"<stuff>"}" will perform <stuff> when an unknown
% key (one for which there is no specific definition in this group) is
% given a value: the key is available as "#1" and the value as "#2" in
-% <stuff>.
+% <stuff>.
% \item "\\mkdef*{"<group>"}["<default>"]{"<stuff>"}" is the same, but
-% additionally if an unknown key is found as a tag then treat it as if
+% additionally if an unknown key is found as a tag then treat it as if
% it had been assigned the value <default> instead.
% \item "\\mkdef*{"<group>"}*{"<stuff>"}" will perform <stuff> when an
% unknown key is found as a tag: the key is available as "#1" in <stuff>.
% symbols missing. Here they are, in all their glory:
% \begin{center} \unverb\| \begin{tabular}{cl|cl|cl}
% $\&$ & "\&" & $\bitor$ & "\bitor" & $\dbland$ & "\dbland" \\
-% $\bitand$ & "\bitand" & $\dblor$ & "\dblor" &
+% $\bitand$ & "\bitand" & $\dblor$ & "\dblor" &
% \end{tabular} \end{center}
%
% \DescribeMacro\xor
%
% Now we need to do some more calculating (don't you hate it?). As far as
% Appendix~G is concerned, $\theta=h(y)=0$, because we want no rule over the
-% top.
+% top.
%
% \begin{macrocode}
\@tempdima\ht\tw@%
% \item |\hfill| glue to push the little rule to the end of the line.
% \item A little square rule `\qedrule', with some small kerns around it.
% \item A glue item to counter the effect of glue added at the paragraph
-% boundary.
+% boundary.
% \end{itemize}
%
% The vertical mode case is simpler, but less universal. It copes with
% The |*| or optional \<rule-params> give rule-drawing parameters for the |h|
% and |c| subcommands. (Note that you can't pass a |*| or an optional
% parameters argument to the |h| or |c| subcommands directly.) See
-% section~\ref{sec:ruleparams}.
+% section~\ref{sec:ruleparams}.
%
% The argument works a bit like a table preamble, really. Each letter is a
% command. The following are supported:
% then you get an extra thick rule at the bottom of the page. This is a bit
% of a problem, because if the rule isn't there in the footer and you get
% a break between two rows \emph{without} a rule between them, then the page
-% looks very odd.
+% looks very odd.
%
% If you want to do ruled longtables, I'd recommend that you proceed as
% follows:
% Note that if you do gobble the |\tab@mkpream|, it's your responsibility to
% insert another one at the very end of your macro's expansion (so that
% further preamble characters can be read).
-%
+%
% The replacement text is inserted directly. It's normal to insert preamble
% elements here. There are several to choose from:
%
% \[ "*" \]
% \[ "[" <colour-model> "]" \]
% "{" <colour> "}"
-% \[ "[" <left-overhang> "]"
+% \[ "[" <left-overhang> "]"
% \[ "[" <right-overhang> "]" \] \]
% \]]
% \end{grammar}
%
%
% \subsection{Parser states}
-%
+%
% Now we start on the parser. It's really simple, deep down. We progress
% from state to state, extracting tokens from the preamble and building
% command names from them. Each command calls one of the element-building
% routines, which works out which state it should be in. We go through each
% of the states in between (see later) doing default things for the ones we
% missed out.
-%
+%
% Anyway, here's some symbolic names for the states. It makes my life
% easier.
%
%
% \begin{macro}{\tab@dohline}
%
-% This is where hlines actually get drawn.
+% This is where hlines actually get drawn.
% Drawing lines is more awkward than it used to be, particularly in unboxed
% tables. It used to be a case simply of saying |\noalign{\hrule}|.
% However, since unboxed tables are actually much wider than they look, this
\if@fleqn%
\eqaopenskip\mathindent%
\splitleft\mathindent\relax%
- \splitright\mathindent\@minus\mathindent\relax%
+ \splitright\mathindent\@minus\mathindent\relax%
\else%
\eqaopenskip\@centering%
\splitleft2.5em\@minus2.5em%
% \end{environment}
% \end{environment}
%
-% Now we can define the column types.
+% Now we can define the column types.
%
% \begin{macrocode}
\colpush{eqnarray}
%% 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
% everything works. It will automatically read in the licence text (from
% |gpl.tex|, and wraps some other things up.
%
-%
+%
% \subsection{Other commands}
%
% The |mdwtools.tex| file includes the \package{syntax} and \package{sverb}
\newif\ifpoem@long
% \end{macrocode}
%
-% Lastly, a skip register. This is the glue on the left hand side of a
+% Lastly, a skip register. This is the glue on the left hand side of a
% poem. It should be |\@centering| to center the poem horizontally, or
% something rigid and nonzero to left-align.
%
%
% \begin{environment}{xpoem}
%
-% The \env{xpoem} environment is where the nastiness really starts.
+% The \env{xpoem} environment is where the nastiness really starts.
% Actually, the early bit is simple enough.
%
% This environment has a funny name, so that users and style designers can
%% 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
% mode, everything happens normally; in \opt{hide} mode, slow boxes are
% replaced by frames. In order for the package to know the sizes of all of
% your boxes, you must first run through once in \opt{show} mode.
-% Thereafter, all should be well.
+% Thereafter, all should be well.
%
% \DescribeEnv{slowbox}
% In \opt{show} mode, the \env{slowbox} environment typesets its contents in
% \<before-text> is performed, and \<after-text> is done afterwards. The
% environments so created have \env{$*$}-variants which ignore the current
% mode, just like \env{slowbox$*$}. They also gather an additional \<tag>
-% argument, which you don't have to bother with.
+% argument, which you don't have to bother with.
%
% \DescribeMacro\doslowbox
% Finally, for commands, there's \syntax{"\\doslowbox{"<tag>"}"\*
}
\def\sb@hidden@i#1#2#3#4{%
\frameonly{#1}{#2}{#3}{Omitted \texttt{#4}}%
- \immediate\write\@auxout{\string\sb@def{#4}{#1}{#2}{#3}}%
+ \immediate\write\@auxout{\string\sb@def{#4}{#1}{#2}{#3}}%
}
% \end{macrocode}
% \end{macro}
}%
\dimen@#3\advance\dimen@-\dp\z@%
\setbox\z@\hbox{\lower\dimen@\box\z@}%
- \leavevmode\box\z@%
+ \leavevmode\box\z@%
}
% \end{macrocode}
% \end{macro}
% \end{macrocode}
%
% \Finale
-\endinput
\ No newline at end of file
+\endinput
%
% \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}%
% 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%
% \begin{listing}
%\def\<#1>{\synt{#1}}
% \end{listing}
-% to allow you to type "\\<"<text>">" as an alternative to
+% to allow you to type "\\<"<text>">" as an alternative to
% "\\synt{"<text>"}".
%
% \DescribeMacro\lit
% \DescribeMacro{\[[}
% \DescribeMacro{\]]}
% You can use syntax diagrams (see below) instead of a straight piece of BNF
-% by enclosing it in a |\[[| \dots |\]]| pair. Note that you can't mix
+% by enclosing it in a |\[[| \dots |\]]| pair. Note that you can't mix
% syntax diagrams and BNF in a production rule, and you will get something
% which looks very strange if you try.
%
%
% \DescribeMacro\tok
% You can also include text using the |\tok| command. The argument of this
-% command is typeset in \LaTeX's LR~mode and inserted into the diagram.
+% command is typeset in \LaTeX's LR~mode and inserted into the diagram.
% Syntax abbreviations are allowed within the argument, so you can, for
% example, include textual descriptions like
% \begin{listing}
%
% Note that items on the backwards arrow of a \env{rep} construction should
% be displayed \emph{backwards}. You must put the individual items in
-% reverse order when building this part of your diagrams. \syn\ will
+% reverse order when building this part of your diagrams. \syn\ will
% correctly reverse the arrows on \env{rep} structures, but apart from
% this, you must cope on your own. You are recommended to keep these parts
% of your diagrams as simple as possible to avoid confusing readers.
%
% You can also alter the appearance of \env{stack}s and \env{rep}s by using
% their optional positioning arguments. By default, \env{stack}s descend
-% below the main line of the diagram, and \env{rep}s extend above it.
+% below the main line of the diagram, and \env{rep}s extend above it.
% Specifying an optional argument of |[b]| for either environment reverses
% this, putting \env{stack}s above and \env{rep}s below the line.
%
% characters through. By default, we re-enable |\|, and make `\verb*" "'
% typeset some space glue, rather than a space character. A macro
% `\verb*"\ "' is defined to actually print a space character, which yield
-% `\verb*" "' in the `|\tt|' font.
+% `\verb*" "' in the `|\tt|' font.
%
% Finally, it defines a |\ch| command, which, given a single-character
% control sequence as its argument, typesets the character. This is useful,
\addspecial\|%
\addspecial\"%
\catcode`\|\active%
- \catcode`\<\active%
+ \catcode`\<\active%
\catcode`\"\active%
\catcode`\`\active%
}