% \iffalse meta-comment
%
% Copyright 1994 the LaTeX3 project and the individual authors.
% All rights reserved. For further copyright information see the file
% legal.txt, and any other copyright indicated in this file.
% 
% This file is part of the LaTeX2e system.
% ----------------------------------------
% 
%  This system 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.
% 
% 
% IMPORTANT NOTICE:
% 
% For error reports in case of UNCHANGED versions see bugs.txt.
% 
% Please do not request updates from us directly.  Distribution is
% done through Mail-Servers and TeX organizations.
% 
% You are not allowed to change this file.
% 
% You are allowed to distribute this file under the condition that
% it is distributed together with all files mentioned in manifest.txt.
% 
% If you receive only some of these files from someone, complain!
% 
% You are NOT ALLOWED to distribute this file alone.  You are NOT
% ALLOWED to take money for the distribution or use of either this
% file or a changed version, except for a nominal charge for copying
% etc.
% \fi
% \iffalse
%%% File: ltplain
%
%<*driver>
% \fi
\ProvidesFile{ltplain.dtx}
             [1994/12/01 v1.1g LaTeX Kernel (Plain TeX)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltplain.dtx}
\begin{document}
\title{\filename\\(The file plain.tex, modified for \LaTeX)}
\author{Donald~E.~Knuth\\
 Modified by 
 Leslie Lamport, Frank Mittelbach, Rainer Sch\"opf}
\date{\filedate}
\maketitle
 \DocInput{\filename}
\end{document}
%</driver>
% \fi
%
% \CheckSum{930}
%
% \section{Plain \TeX}
%
% \LaTeX\ includes almost all of the functionality of Knuth's original
% `Basic Macros' That is, the plain \TeX\ format described in Appendix~B
% of the \TeX{}Book. This file is a modified version of the source file
% for plain \TeX, |plain.tex|.
%
%
% \LaTeX font definitions are done using NFSS2 (file ltfss.dtx)
% so all of PLAIN's font definitions are removed.
%
% LaTeX has its own tabbing environment, so PLAIN's is disabled.
%
% Macro definitions for math have been moved to some other file so
% that they are grouped together.
%
% \LaTeX{} uses its own output routine, so most of the plain one was
% removed.
%
%
% \StopEventually{}
%
% \changes{v1.0a}{1994/03/08}
%         {Remove need for a driver file.}
% \changes{v1.0b}{1994/03/12}
%         {Name changed from lplain. The end of an era}
% \changes{v1.0e}{1994/03/12}{Replaced remaining width, height, depth
%       by \LaTeX{} macro names to save tokens.}
% \changes{v1.1a}{1994/10/14}
%         {Moved code to other files.}
% \changes{v1.1b}{1994/11/10}
%         {(CAR) added patch to \cs{loop}.}
% \changes{v1.1f}{1994/11/25}
%         {(DPC) Comment out lots of obsolete code..}
% \changes{v1.1g}{1994/12/01}
%         {(DPC) More doc changes.}
%
% \begin{oldcomments}
% File LPLAIN - Created 29 October 1985 from plain version 1.5CM
%             - Last modified 20 October 1988 to take into account
%               changes to PLAIN.TEX reported by Arthur Ogawa
%             - Modified February 8, 1990 by Dominik Wujastyk to
%               match the PLAIN.TEX meant for TeX 3.0 
%                  (\fmtname{plain}, \fmtversion{3.0}).
%             - Modified March 15, 1990 by Frank Mittelbach to
%               allow the use of this file both in TeX 2 and 3
%             - Modified June 21, 1991 by RmS to clear the
%               contents of \box0.
%             - Modified July 1, 1991, by RmS to correct \multispan bug.
%             - Modified August 14, 1991, By RmS to make \cases work
%               with NFSS.
%             - Modified October 30, 1991, by RmS to remove \catcode 
%               and \mathcode assignments for control characters.
%             - Modified November 1, 1991, by RmS to remove 
%               ^^A and ^^K control characters.
%             - Modified November 4, 1991, by RmS to add missing \m@th
%               assignments and to introduce the file lhyphen.tex.
%             - Modified November 7, 1991, by RmS to make it work with
%               MLTeX version 2.
%             - Modified March 17, 1992, by RmS to match changes in
%               plain.tex of March 16, 1992.
%             - Modified August 5, 1993, by RmS to make \dotfill and
%               \hrulefill behave in vertical mode.
%             - Modified September 17, 1993, by RmS to match changes in
%               plain.tex of June 26, 1993.
%             - Modified September 19, 1993, by RmS to remove remaining
%               definitions for control characters ^^D, ^^S, ^^Z, ^^_.
%
% This is the LaTeX version of the plain TeX format that's described in
% The TeXbook.  All modifications can be found by searching for
% the word 'LaTeX'.
% N.B.: A version number is defined at the very end of this file;
%       please change that number whenever the file is modified!
% And don't modify the file under any circumstances.
%
% \end{oldcomments}
% \iffalse
%% \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         \~}
%%
% \fi
% \begin{oldcomments}
%    \begin{macrocode}
%<*2ekernel>
\catcode`\{=1 % left brace is begin-group character
\catcode`\}=2 % right brace is end-group character
\catcode`\$=3 % dollar sign is math shift
\catcode`\&=4 % ampersand is alignment tab
\catcode`\#=6 % hash mark is macro parameter character
\catcode`\^=7 % circumflex and uparrow are for superscripts
\catcode`\_=8 % underline and downarrow are for subscripts
\catcode`\^^I=10 % ascii tab is a blank space
\chardef\active=13 \catcode`\~=\active % tilde is active
\catcode`\^^L=\active \outer\def^^L{\par}% ascii form-feed is \outer\par
%    \end{macrocode}
%
%    \begin{macrocode}
\message{Preloading the plain format: codes,}
%    \end{macrocode}
%
% We had to define the \catcodes right away, before the message line,
% since \message uses the { and } characters.
% When INITEX (the TeX initializer) starts up,
% it has defined the following \catcode values:
% \catcode`\^^@=9 % ascii null is ignored
% \catcode`\^^M=5 % ascii return is end-line
% \catcode`\\=0 % backslash is TeX escape character
% \catcode`\%=14 % percent sign is comment character
% \catcode`\ =10 % ascii space is blank space
% \catcode`\^^?=15 % ascii delete is invalid
% \catcode`\A=11 ... \catcode`\Z=11 % uppercase letters
% \catcode`\a=11 ... \catcode`\z=11 % lowercase letters
% all others are type 12 (other)
%
% Here is a list of the characters that have been specially catcoded:
%    \begin{macrocode}
\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
  \do\#\do\^\do\_\do\%\do\~}
%    \end{macrocode}
% (not counting ascii null, tab, linefeed, formfeed, return, delete)
% Each symbol in the list is preceded by \do, which can be defined
% if you want to do something to every item in the list.
%
% We make @ signs act like letters, temporarily, to avoid conflict
% between user names and internal control sequences of plain format.
%    \begin{macrocode}
\catcode`@=11
%    \end{macrocode}
%
% To make the plain macros more efficient in time and space,
% several constant values are declared here as control sequences.
% If they were changed, anything could happen;
% so they are private symbols.
%    \begin{macrocode}
\chardef\@ne=1
\chardef\tw@=2
\chardef\thr@@=3
\chardef\sixt@@n=16
\chardef\@cclv=255
\mathchardef\@cclvi=256
\mathchardef\@m=1000
\mathchardef\@M=10000
\mathchardef\@MM=20000
%    \end{macrocode}
%
% Allocation of registers
%
% Here are macros for the automatic allocation of \count, \box, \dimen,
% \skip, \muskip, and \toks registers, as well as \read and \write
% stream numbers, \fam codes, \language codes, and \insert numbers.
%
%    \begin{macrocode}
\message{registers,}
%    \end{macrocode}
%
% When a register is used only temporarily, it need not be allocated;
% grouping can be used, making the value previously in the register
% return after the close of the group.  The main use of these macros is
% for registers that are defined by one macro and used by others,
% possibly at ifferent nesting levels.  All such registers should be
% defined through these macros; otherwise conflicts may occur,
% especially when two or more more macro packages are being used at
% once.
%
% The following counters are reserved:
%   0 to 9  page numbering
%       10  count allocation
%       11  dimen allocation
%       12  skip allocation
%       13  muskip allocation
%       14  box allocation
%       15  toks allocation
%       16  read file allocation
%       17  write file allocation
%       18  math family allocation
%       19  language allocation
%       20  insert allocation
%       21  the most recently allocated number
%       22  constant -1
% New counters are allocated starting with 23, 24, etc.  Other registers
% are allocated starting with 10.  This leaves 0 through 9 for the user
% to play with safely, except that counts 0 to 9 are considered to be
% the page and subpage numbers (since they are displayed during
% output). In this scheme, \count 10 always contains the number of the
% highest-numbered counter that has been allocated, \count 14 the
% highest-numbered box, etc. Inserts are given numbers 254, 253, etc.,
% since they require a \count, \dimen, \skip, and \box all with the same
% number; \count 20 contains the lowest-numbered insert that has been
% allocated. Of course, \box255 is reserved for \output; \count255,
% \dimen255, and \skip255 can be used freely.
%
% It is recommended that macro designers always use
% \global assignments with respect to registers numbered
% 1, 3, 5, 7, 9, and
% always non-\global assignments with respect to registers
% 0, 2, 4, 6, 8, 255.
% This will prevent ``save stack buildup'' that might otherwise occur.
%
%    \begin{macrocode}
\count10=22 % allocates \count registers 23, 24, ...
\count11=9 % allocates \dimen registers 10, 11, ...
\count12=9 % allocates \skip registers 10, 11, ...
\count13=9 % allocates \muskip registers 10, 11, ...
\count14=9 % allocates \box registers 10, 11, ...
\count15=9 % allocates \toks registers 10, 11, ...
\count16=-1 % allocates input streams 0, 1, ...
\count17=-1 % allocates output streams 0, 1, ...
\count18=3 % allocates math families 4, 5, ...
\count19=0 % allocates \language codes 1, 2, ...
\count20=255 % allocates insertions 254, 253, ...
\countdef\insc@unt=20 % the insertion counter
\countdef\allocationnumber=21 % the most recent allocation
\countdef\m@ne=22 \m@ne=-1 % a handy constant
\def\wlog{\immediate\write\m@ne} % write on log file (only)
%    \end{macrocode}
%
% Here are abbreviations for the names of scratch registers
% that don't need to be allocated.
%
%    \begin{macrocode}
\countdef\count@=255
\dimendef\dimen@=0
\dimendef\dimen@i=1 % global only
\dimendef\dimen@ii=2
\skipdef\skip@=0
\toksdef\toks@=0
%    \end{macrocode}
%
% Now, we define \newcount, \newbox, etc. so that you can say 
% \newcount\foo and \foo will be defined (with \countdef) to be the next
% counter.
% To find out which counter \foo is, you can look at \allocationnumber.
% Since there's no \boxdef command, \chardef is used to define a
%  \newbox, \newinsert, \newfam, and so on.
% LaTeX change: remove \outer from \newcount and \newdimen (FMi)
%               This is necessary to use \newcount inside \if...
%               later on. Also remove from \newskip, \newbox
%               \newwrite and \newfam (DPC) to save later redefinition.
%
% \end{oldcomments}
% \changes{v1.0c}{1994/03/28}
%         {Remove some \cs{outer} declarations.}
% \begin{oldcomments}
%    \begin{macrocode}
\def\newcount{\alloc@0\count\countdef\insc@unt}
\def\newdimen{\alloc@1\dimen\dimendef\insc@unt}
\def\newskip{\alloc@2\skip\skipdef\insc@unt}
\outer\def\newmuskip{\alloc@3\muskip\muskipdef\@cclvi}
\def\newbox{\alloc@4\box\chardef\insc@unt}
\let\newtoks=\relax % we do this to allow plain.tex to be read in twice
\outer\def\newhelp#1#2{\newtoks#1#1\expandafter{\csname#2\endcsname}}
\outer\def\newtoks{\alloc@5\toks\toksdef\@cclvi}
\outer\def\newread{\alloc@6\read\chardef\sixt@@n}
\def\newwrite{\alloc@7\write\chardef\sixt@@n}
\def\newfam{\alloc@8\fam\chardef\sixt@@n}
\outer\def\newlanguage{\alloc@9\language\chardef\@cclvi}
\def\alloc@#1#2#3#4#5{\global\advance\count1#1by\@ne
  \ch@ck#1#4#2% make sure there's still room
  \allocationnumber=\count1#1%
  \global#3#5=\allocationnumber
  \wlog{\string#5=\string#2\the\allocationnumber}}
\outer\def\newinsert#1{\global\advance\insc@unt by\m@ne
  \ch@ck0\insc@unt\count
  \ch@ck1\insc@unt\dimen
  \ch@ck2\insc@unt\skip
  \ch@ck4\insc@unt\box
  \allocationnumber=\insc@unt
  \global\chardef#1=\allocationnumber
  \wlog{\string#1=\string\insert\the\allocationnumber}}
\def\ch@ck#1#2#3{\ifnum\count1#1<#2%
  \else\errmessage{No room for a new #3}\fi}
%    \end{macrocode}
%
% Here are some examples of allocation.
%    \begin{macrocode}
\newdimen\maxdimen \maxdimen=16383.99999pt % the largest legal <dimen>
\newskip\hideskip \hideskip=-1000pt plus 1fill % negative but can grow
%    \end{macrocode}
%
% LaTeX change: the PLAIN \centering dimension conflicts with
% LaTeX's \centering command, so it is redefined to \@centering.
% This dimension is used by LaTeX.
%
%    \begin{macrocode}
\newskip\@centering \@centering=0pt plus 1000pt minus 1000pt
%    \end{macrocode}
%
%    \begin{macrocode}
\newdimen\p@ \p@=1pt % this saves macro space and time
\newdimen\z@ \z@=0pt % can be used both for 0pt and 0
\newskip\z@skip \z@skip=0pt plus0pt minus0pt
\newbox\voidb@x % permanently void box register
%    \end{macrocode}
%
% And here's a different sort of allocation:
% For example, 
% \newif\iffoo creates \footrue, \foofalse to go with \iffoo.
%    \begin{macrocode}
\outer\def\newif#1{\count@\escapechar \escapechar\m@ne
  \expandafter\expandafter\expandafter
   \edef\@if#1{true}{\let\noexpand#1=\noexpand\iftrue}%
  \expandafter\expandafter\expandafter
   \edef\@if#1{false}{\let\noexpand#1=\noexpand\iffalse}%
  \@if#1{false}\escapechar\count@} % the condition starts out false
\def\@if#1#2{\csname\expandafter\if@\string#1#2\endcsname}
{\uccode`1=`i \uccode`2=`f \uppercase{\gdef\if@12{}}} % `if' is required
%    \end{macrocode}
%
%    \begin{macrocode}
\message{compatibility for TeX 2, }
%    \end{macrocode}
%
% If this file is used in an old TeX we define the new features
% of TeX 3.0 as simple macros or counters so that files that uses
% these features can be processed in such an environment
% (They will however produce some other results).
%
%    \begin{macrocode}
\ifx\undefined\inputlineno
  \newcount\inputlineno
  \inputlineno-1               % this could be used to detect that
                               % an old TeX is in force
  \ifx\undefined\language      % extra test for MLTeX 2, RmS 91/11/07
    \newcount\language
  \fi
  \newcount\lefthyphenmin
  \newcount\righthyphenmin
  \newcount\errorcontextlines
  \newcount\holdinginserts
  \newdimen\emergencystretch
  \newcount\badness
  \let\noboundary\relax
  \newcount\setlanguage
\fi
%    \end{macrocode}
%
% Assign initial values to TeX's parameters
%
%    \begin{macrocode}
\message{parameters,}
%    \end{macrocode}
%
% All of TeX's numeric parameters are listed here,
% but the code is commented out if no special value needs to be set.
% INITEX makes all parameters zero except where noted.
%
%    \begin{macrocode}
\pretolerance=100
\tolerance=200 % INITEX sets this to 10000
\hbadness=1000
\vbadness=1000
\linepenalty=10
\hyphenpenalty=50
\exhyphenpenalty=50
\binoppenalty=700
\relpenalty=500
\clubpenalty=150
\widowpenalty=150
\displaywidowpenalty=50
\brokenpenalty=100
\predisplaypenalty=10000
%    \end{macrocode}
% \postdisplaypenalty=0
% \interlinepenalty=0
% \floatingpenalty=0, set during \insert
% \outputpenalty=0, set before TeX enters \output
%    \begin{macrocode}
\doublehyphendemerits=10000
\finalhyphendemerits=5000
\adjdemerits=10000
%    \end{macrocode}
% \looseness=0, cleared by TeX after each paragraph
% \pausing=0
% \holdinginserts=0
% \tracingonline=0
% \tracingmacros=0
% \tracingstats=0
% \tracingparagraphs=0
% \tracingpages=0
% \tracingoutput=0
%    \begin{macrocode}
\tracinglostchars=1
%    \end{macrocode}
% \tracingcommands=0
% \tracingrestores=0
% \language=0
%    \begin{macrocode}
\uchyph=1
%    \end{macrocode}
% \lefthyphenmin=2 \righthyphenmin=3 set below
% \globaldefs=0
% \maxdeadcycles=25 % INITEX does this
% \hangafter=1 % INITEX does this, also TeX after each paragraph
% \fam=0
% \mag=1000 % INITEX does this
% \escapechar=`\\ % INITEX does this
%    \begin{macrocode}
\defaulthyphenchar=`\-
\defaultskewchar=-1
%    \end{macrocode}
% \endlinechar=`\^^M % INITEX does this
% \newlinechar=-1     \LaTeX\ sets this in ltdefns.dtx.
%    \begin{macrocode}
\delimiterfactor=901
%    \end{macrocode}
% \time=now % TeX does this at beginning of job
% \day=now % TeX does this at beginning of job
% \month=now % TeX does this at beginning of job
% \year=now % TeX does this at beginning of job
%
% \end{oldcomments}
%    In \LaTeX{} we don't want box information in the transcript
%    unless we do a full tracing.
%  \changes{v1.0g}{1994/04/28}{Turn off overfull box tracing in log}
%
%    \begin{macrocode}
\showboxbreadth=-1
\showboxdepth=-1
\errorcontextlines=-1
%    \end{macrocode}
%
%    \begin{macrocode}
\hfuzz=0.1pt
\vfuzz=0.1pt
\overfullrule=5pt
\hsize=6.5in
\vsize=8.9in
\maxdepth=4pt
\splitmaxdepth=\maxdimen
\boxmaxdepth=\maxdimen
%    \end{macrocode}
% \begin{oldcomments}
% \lineskiplimit=0pt, changed by \normalbaselines
%    \begin{macrocode}
\delimitershortfall=5pt
\nulldelimiterspace=1.2pt
\scriptspace=0.5pt
%    \end{macrocode}
% \mathsurround=0pt
% \predisplaysize=0pt, set before TeX enters $$
% \displaywidth=0pt, set before TeX enters $$
% \displayindent=0pt, set before TeX enters $$
%    \begin{macrocode}
\parindent=20pt
%    \end{macrocode}
% \hangindent=0pt, zeroed by TeX after each paragraph
% \hoffset=0pt
% \voffset=0pt
%
% \baselineskip=0pt, changed by \normalbaselines
% \lineskip=0pt, changed by \normalbaselines
%    \begin{macrocode}
\parskip=0pt plus 1pt
\abovedisplayskip=12pt plus 3pt minus 9pt
\abovedisplayshortskip=0pt plus 3pt
\belowdisplayskip=12pt plus 3pt minus 9pt
\belowdisplayshortskip=7pt plus 3pt minus 4pt
%    \end{macrocode}
% \leftskip=0pt
% \rightskip=0pt
%    \begin{macrocode}
\topskip=10pt
\splittopskip=10pt
%    \end{macrocode}
% \tabskip=0pt
% \spaceskip=0pt
% \xspaceskip=0pt
%    \begin{macrocode}
\parfillskip=0pt plus 1fil
%    \end{macrocode}
%
%
% We also define special registers that function like parameters:
%    \begin{macrocode}
\newskip\smallskipamount \smallskipamount=3pt plus 1pt minus 1pt
\newskip\medskipamount \medskipamount=6pt plus 2pt minus 2pt
\newskip\bigskipamount \bigskipamount=12pt plus 4pt minus 4pt
\newskip\normalbaselineskip \normalbaselineskip=12pt
\newskip\normallineskip \normallineskip=1pt
\newdimen\normallineskiplimit \normallineskiplimit=0pt
\newcount\interfootnotelinepenalty \interfootnotelinepenalty=100
%    \end{macrocode}
%
% Definitions for preloaded fonts
%
%    \begin{macrocode}
\def\magstephalf{1095 }
\def\magstep#1{\ifcase#1 \@m\or 1200\or 1440\or 1728\or 
               2074\or 2488\fi\relax}
%    \end{macrocode}
%
%
% Macros for setting ordinary text
%    \begin{macrocode}
\message{macros,}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\frenchspacing{\sfcode`\.\@m \sfcode`\?\@m \sfcode`\!\@m
  \sfcode`\:\@m \sfcode`\;\@m \sfcode`\,\@m}
\def\nonfrenchspacing{\sfcode`\.3000\sfcode`\?3000\sfcode`\!3000%
  \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 }
%    \end{macrocode}
%
%    \begin{macrocode}
\def\normalbaselines{\lineskip\normallineskip
  \baselineskip\normalbaselineskip \lineskiplimit\normallineskiplimit}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\^^M{\ } % control <return> = control <space>
\def\^^I{\ } % same for <tab>
%    \end{macrocode}
%
%    \begin{macrocode}
\def\lq{`} \def\rq{'}
\def\lbrack{[} \def\rbrack{]}
%    \end{macrocode}
%
%    \begin{macrocode}
\let\endgraf=\par \let\endline=\cr
%    \end{macrocode}
%
%    \begin{macrocode}
\def\space{ }
\def\empty{}
\def\null{\hbox{}}
%    \end{macrocode}
%
%    \begin{macrocode}
\let\bgroup={ \let\egroup=}
%    \end{macrocode}
%
% In \obeylines, we say `\let^^M=\par' instead of `\def^^M{\par}'
% since this allows, for example, `\let\par=\cr \obeylines \halign{...'
%    \begin{macrocode}
{\catcode`\^^M=\active % these lines must end with %
  \gdef\obeylines{\catcode`\^^M\active \let^^M\par}%
  \global\let^^M\par} % this is in case ^^M appears in a \write
\def\obeyspaces{\catcode`\ \active}
{\obeyspaces\global\let =\space}
%    \end{macrocode}
% \end{oldcomments}
%
%  \begin{macro}{\loop}
% \changes{v1.0h}{1994/05/16}{Use Kabelschacht method} 
%  \begin{macro}{\iterate}
% \changes{v1.1b}{1994/11/10}
%         {(CAR) added extra \cs{relax}}
%  \begin{macro}{\repeat}
%    We use Kabelschacht's method of doing loops, see TUB 8\#2 (1987).
%    (unless that breaks something :-).  It turned out to need an
%    extra |\relax|: see pr/642 (|\loop| could do one iteration too much
%    in certain cases).
%    \begin{macrocode}
\def\loop#1\repeat{%
  \def\iterate{#1\relax  % Extra \relax
               \expandafter\iterate\fi
               }%
  \iterate
  \let\iterate\relax
}
%    \end{macrocode}
%    This setting of |\repeat| is needed to make |\loop...\if...\repeat|
%    skippable within another |\if...|.
%    \begin{macrocode}
\let\repeat=\fi 
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
%    \begin{macrocode}
\def\thinspace{\kern .16667em }
\def\negthinspace{\kern-.16667em }
\def\enspace{\kern.5em }
%    \end{macrocode}
%
%    \begin{macrocode}
\def\enskip{\hskip.5em\relax}
\def\quad{\hskip1em\relax}
\def\qquad{\hskip2em\relax}
%    \end{macrocode}
%
% \LaTeX\ defines these in |ltspace.dtx|.
%\begin{verbatim}
% \def\smallskip{\vskip\smallskipamount}
% \def\medskip{\vskip\medskipamount}
% \def\bigskip{\vskip\bigskipamount}
%\end{verbatim}
%
%    \begin{macrocode}
\def\nointerlineskip{\prevdepth-1000\p@}
\def\offinterlineskip{\baselineskip-1000\p@
  \lineskip\z@ \lineskiplimit\maxdimen}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\vglue{\afterassignment\vgl@\skip@=}
\def\vgl@{\par \dimen@\prevdepth \hrule \@height\z@
  \nobreak\vskip\skip@ \prevdepth\dimen@}
\def\hglue{\afterassignment\hgl@\skip@=}
\def\hgl@{\leavevmode \count@\spacefactor \vrule \@width\z@
  \nobreak\hskip\skip@ \spacefactor\count@}
%    \end{macrocode}
%
% \LaTeX\ sets this in |ltdefns.dtx|.
%\begin{verbatim}
%\def~{\penalty\@M \ } % tie
%\end{verbatim}
%
%    \begin{macrocode}
\def\slash{/\penalty\exhyphenpenalty} % a `/' that acts like a `-'
%    \end{macrocode}
%
%    \begin{macrocode}
\def\break{\penalty-\@M}
\def\nobreak{\penalty \@M}
\def\allowbreak{\penalty \z@}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\filbreak{\par\vfil\penalty-200\vfilneg}
\def\goodbreak{\par\penalty-500 }
\def\eject{\par\break}
\def\supereject{\par\penalty-\@MM}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\removelastskip{\ifdim\lastskip=\z@\else\vskip-\lastskip\fi}
\def\smallbreak{\par\ifdim\lastskip<\smallskipamount
  \removelastskip\penalty-50\smallskip\fi}
\def\medbreak{\par\ifdim\lastskip<\medskipamount
  \removelastskip\penalty-100\medskip\fi}
\def\bigbreak{\par\ifdim\lastskip<\bigskipamount
  \removelastskip\penalty-200\bigskip\fi}
%    \end{macrocode}
%
% |\line| changed to |\@@line| because \LaTeX\ redefines |\line|
%    \begin{macrocode}
\def\@@line{\hbox to\hsize}
\def\leftline#1{\@@line{#1\hss}}
\def\rightline#1{\@@line{\hss#1}}
\def\centerline#1{\@@line{\hss#1\hss}}
%    \end{macrocode}
% end of \LaTeX\ |\line -> \@@line| change
%
%    \begin{macrocode}
\def\rlap#1{\hbox to\z@{#1\hss}}
\def\llap#1{\hbox to\z@{\hss#1}}
%    \end{macrocode}
%
% \changes{v1.0h}{1994/05/16}{Remove unnecssary space} 
%    \begin{macrocode}
\def\m@th{\mathsurround\z@}
\def\underbar#1{$\setbox\z@\hbox{#1}\dp\z@\z@
  \m@th \underline{\box\z@}$}
%    \end{macrocode}
%
%    \begin{macrocode}
\newbox\strutbox
\setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}
\def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\hidewidth{\hskip\hideskip} % for alignment entries that 
                                % can stick out
\def\ialign{\everycr{}\tabskip\z@skip\halign} % initialized \halign
\newcount\mscount
\def\multispan#1{\omit \mscount#1\relax
  \loop\ifnum\mscount>\@ne \sp@n\repeat}
\def\sp@n{\span\omit\advance\mscount\m@ne}
%    \end{macrocode}
%
%
% \changes{v1.0h}{1994/05/16}{Remove unnecessary def for \cmd\item} 
%    \begin{macrocode}
\def\hang{\hangindent\parindent}
\def\textindent#1{\indent\llap{#1\enspace}\ignorespaces}
%\def\item{\par\hang\textindent}
%    \end{macrocode}
% RmS 1991/11/04: Removed |\itemitem| since never needed/useful on LaTeX.
%\begin{verbatim}
%\def\itemitem{\par\indent \hangindent2\parindent \textindent}
%\end{verbatim}
%    \begin{macrocode}
\def\narrower{\advance\leftskip\parindent
  \advance\rightskip\parindent}
%    \end{macrocode}
%
%
% \begin{macro}{\proclaim}
% \changes{v1.0d}{1994/04/12}
%         {Use NFSS  font commands.}
% LaTeX Change: Use NFSS font commands.
%    \begin{macrocode}
\outer\def\proclaim #1. #2\par{\medbreak
  \noindent{\bfseries#1.\enspace}{\slshape#2\par}%
  \ifdim\lastskip<\medskipamount \removelastskip\penalty55\medskip\fi}
%    \end{macrocode}
% \end{macro}
%
% LaTeX Change: \LaTeX\ has its own version of |\raggedright|.
%\begin{verbatim}
%\def\raggedright{%
%  \rightskip\z@ plus2em \spaceskip.3333em \xspaceskip.5em\relax}
%\end{verbatim}
%
% \begin{macro}{\ttraggedright}
% \changes{v1.0d}{1994/04/12}
%         {Use NFSS  font commands. Comment out \cmd\raggedright.}
% LaTeX Change: Use NFSS font commands.
%    \begin{macrocode}
\def\ttraggedright{\reset@font\ttfamily\rightskip\z@ plus2em\relax}
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.1c}{1994/11/12}{Comment out more encoding specific commands} 
%\begin{verbatim}
%\chardef\$=`\$
%\chardef\ss="19
%\chardef\ae="1A
%\chardef\oe="1B
%\chardef\o="1C
%\chardef\AE="1D
%\chardef\OE="1E
%\chardef\O="1F
%\chardef\i="10 \chardef\j="11 % dotless letters
%\def\aa{\accent23a}
%\def\l{\char32l}
%\def\L{\leavevmode\setbox0\hbox{L}\hbox to\wd0{\hss\char32L}}
%\end{verbatim}
%
%    \begin{macrocode}
\chardef\%=`\%
\chardef\&=`\&
\chardef\#=`\#
%    \end{macrocode}
%
%    Most text commands are actually encoding specific and 
%    therefore defined later, so commented out.
% \changes{v1.0h}{1994/05/16}{Comment out encoding specific commands} 
%    \begin{macrocode}
\def\leavevmode{\unhbox\voidb@x} % begins a paragraph, if necessary
\def\mathhexbox#1#2#3{\leavevmode
  \hbox{$\m@th \mathchar"#1#2#3$}}
%    \end{macrocode}
%
%\begin{verbatim}
%\def\_{\leavevmode \kern.06em \vbox{\hrule \@width.3em}}
%\def\AA{\leavevmode\setbox0\hbox{h}\dimen@\ht0\advance\dimen@-1ex%
%  \rlap{\raise.67\dimen@\hbox{\char'27}}A}
%
%\def\dag{\mathhexbox279}
%\def\ddag{\mathhexbox27A}
%\def\S{\mathhexbox278}
%\def\P{\mathhexbox27B}
%\end{verbatim}
%
%    \begin{macrocode}
\def\oalign#1{\leavevmode\vtop{\baselineskip\z@skip \lineskip.25ex%
  \ialign{##\crcr#1\crcr}}} % put characters over each other
\def\ooalign{\lineskiplimit-\maxdimen \oalign}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\sh@ft#1{\dimen\z@.00#1ex\multiply\dimen\z@\fontdimen1\font
  \kern-.0156\dimen\z@} % compensate for slant in lowered accents
%    \end{macrocode}
%
% LaTeX change: |\d|, |\b|, |\c|, |\copyright|, |\TeX|
%  defined elsewhere.
%\begin{verbatim}
%\def\pd#1{\oalign{#1\crcr\hidewidth\sh@ft{08}.\hidewidth}}
%\def\d{\protect\pd}
%
%\def\pb#1{\oalign{#1\crcr\hidewidth\sh@ft{29}%
%    \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}}
%\def\b{\protect\pb}
%
%\def\pc#1{\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1%
%  \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}
%\def\c{\protect\pc}
%
%\def\copyright{{\ooalign{\hfil\raise.07ex\hbox{c}%
%                \hfil\crcr\mathhexbox20D}}}
%
%\def\dots{\ldots}
%
%\def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX}
%    \end{macrocode}
%\end{verbatim}
%
% \changes{LaTeX2e}
%     {1993/11/29}{All accents in decimals; suggested by Paul Taylor}
% \changes{v1.0d}{1994/04/12}
%         {Define \cmd{\@acci}}
% \changes{v1.0h}{1994/05/16}{Remove \cmd\@acci and friends again} 
%\begin{verbatim}
%\def\@accii#1{{\accent18 #1}} \def\`{\@accii}
%\def\@acci#1{{\accent19 #1}}   \def\'{\@acci}
%\def\v#1{{\accent20 #1}}
%\def\u#1{{\accent21 #1}}
%\def\@acciii#1{{\accent22 #1}} \def\={\@acciii}
%\def\^#1{{\accent94 #1}}
%\def\.#1{{\accent95 #1}}
%\def\H#1{{\accent125 #1}}
%\def\~#1{{\accent126 #1}}
%\def\"#1{{\accent127 #1}}
%\end{verbatim}
%
% \LaTeX{} change: Make |\t| work in a moving argument.
% Now defined elsewhere.
%
% \LaTeX\ change: |\kern\z@| added to end of
% |\hrulefill| and |\dotfill|
% to make them work in `tabular' and `array' environments.
% (Change made 24 July 1987).
% \LaTeX\ change: |\leavevmode| added at begining of
% |\dotfill| and |\hrulefill|
% so that they work as expected in vertical mode.
%    \begin{macrocode}
\def\hrulefill{\leavevmode\leaders\hrule\hfill\kern\z@}
\def\dotfill{\leavevmode\cleaders
     \hbox{$\m@th \mkern1.5mu.\mkern1.5mu$}\hfill\kern\z@}
%    \end{macrocode}
%
%
%
% LaTeX change: |\bye| is eliminated.
%\begin{verbatim}
%\outer\def\bye{\par\vfill\supereject\end}
%\end{verbatim}
%
% LaTeX change: |\phantom| moved to ltmath.
%\begin{verbatim}
%\newif\ifv@ \newif\ifh@
%\def\vphantom{\v@true\h@false\ph@nt}
%\def\hphantom{\v@false\h@true\ph@nt}
%\def\phantom{\v@true\h@true\ph@nt}
%\def\ph@nt{\ifmmode\def\next{\mathpalette\mathph@nt}%
%  \else\let\next\makeph@nt\fi\next}
%\def\makeph@nt#1{\sbox\z@{#1}\finph@nt}
%\def\mathph@nt#1#2{\setbox\z@\hbox{$\m@th#1{#2}$}\finph@nt}
%\def\finph@nt{\setbox\tw@\null
%  \ifv@ \ht\tw@\ht\z@ \dp\tw@\dp\z@\fi
%  \ifh@ \wd\tw@\wd\z@\fi \box\tw@}
%\end{verbatim}
%
%
%
%
% INITEX sets |\sfcode x=1000| for all x, except that |\sfcode`X=999|
% for uppercase letters. The following changes are needed:
%    \begin{macrocode}
\sfcode`\)=0 \sfcode`\'=0 \sfcode`\]=0
%    \end{macrocode}
% The |\nonfrenchspacing| macro will make further changes to 
% |\sfcode| values.
%
%
% Definitions related to output
%
%
% \LaTeX\ does use the same insert for footnotes as PLAIN.
%    \begin{macrocode}
\newinsert\footins
%    \end{macrocode}
%
% \LaTeX\ leaves these initializations for the |\footins| insert.
%
%    \begin{macrocode}
\skip\footins=\bigskipamount % space added when footnote is present
\count\footins=1000 % footnote magnification factor (1 to 1)
\dimen\footins=8in % maximum footnotes per page
%    \end{macrocode}
%
%
% \LaTeX\ keeps PLAIN \TeX's |\footnoterule |as the default.
%
%    \begin{macrocode}
\def\footnoterule{\kern-3\p@
  \hrule \@width 2in \kern 2.6\p@} % the \hrule is .4pt high
%    \end{macrocode}
%
% |\magnification| doesn't work in \LaTeX.
%
%\def\magnification{\afterassignment\m@g\count@}
%\def\m@g{\mag\count@
%  \hsize6.5truein\vsize8.9truein\dimen\footins8truein}
%
% FMi \& RmS 1991/08/26: added |\errorcontextlines=\maxdimen|,
%  suggested by J. Schrod
%
%    \begin{macrocode}
\def\tracingall{\tracingcommands\tw@\tracingstats\tw@
  \tracingpages\@ne\tracingoutput\@ne\tracinglostchars\@ne
  \tracingmacros\tw@\tracingparagraphs\@ne\tracingrestores\@ne
  \showboxbreadth\maxdimen\showboxdepth\maxdimen\errorstopmode
  \errorcontextlines\maxdimen\tracingonline\@ne}
%    \end{macrocode}
%
% Defined later:
%\begin{verbatim}
%\def\showhyphens#1{\setbox0\vbox{\parfillskip\z@skip\hsize\maxdimen
%  \tenrm
%  \pretolerance\m@ne\tolerance\m@ne\hbadness0\showboxdepth0\ #1}}
%\end{verbatim}
%
%
%    \begin{macrocode}
\nonfrenchspacing % punctuation affects the spacing
%</2ekernel>
%    \end{macrocode}
%
%
% \Finale
%
