1 % \iffalse meta-comment
3 % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
30 %%% From File: ltplain.dtx
34 \ProvidesFile{ltplain.dtx}
35 [2005/09/27 v1.1y LaTeX Kernel (Plain TeX)]
37 \documentclass{ltxdoc}
38 \GetFileInfo{ltplain.dtx}
40 \title{\filename\\(The file plain.tex, modified for \LaTeX)}
41 \author{Donald~E.~Knuth\\
43 Leslie Lamport, Frank Mittelbach,\\
44 Rainer Sch\"opf, David Carlisle}
54 % \changes{v1.0a}{1994/03/08}
55 % {Remove need for a driver file.}
56 % \changes{v1.0b}{1994/03/12}
57 % {Name changed from lplain. The end of an era}
58 % \changes{v1.0e}{1994/03/12}{Replaced remaining width, height, depth
59 % by \LaTeX{} macro names to save tokens.}
60 % \changes{v1.1a}{1994/10/14}
61 % {Moved code to other files.}
62 % \changes{v1.1b}{1994/11/10}
63 % {(CAR) added patch to \cs{loop}.}
64 % \changes{v1.1f}{1994/11/25}
65 % {(DPC) Comment out lots of obsolete code}
66 % \changes{v1.1g}{1994/12/01}
67 % {(DPC) More doc changes}
68 % \changes{v1.1j}{1995/05/07}{Use \cs{hb@xt@}}
69 % \changes{v1.1j}{1995/05/21}{Moved some code to other files}
70 % \changes{v1.1n}{1995/07/02}{Removed surplus `by' and `\quotechar=' in
72 % \changes{v1.1o}{1995/09/14}{Moved \cs{multispan} to lttab.dtx}
73 % \changes{v1.1r}{1995/10/10}{Autoload tracing code}
74 % \changes{v1.1u}{1996/10/28}{(CAR) More doc changes}
76 % \section{Plain \TeX}
78 % \LaTeX\ includes almost all of the functionality of Knuth's original
79 % `Basic Macros' That is, the plain \TeX\ format described in Appendix~B
80 % of the \TeX{}Book. However, some of the user commands are not much
81 % use so, in order to save memory, we may remove them from the kernel
82 % into a package. Here is a list of the commands that may be removed
83 % (PROBABLY NOT COMPLETE).
85 % \magstep \magstephalf
91 % This file is by now very small as most of it has been moved to more
92 % appropriate kernel files: it may disappear completely one day.
94 % \LaTeX\ font definitions are done using NFSS2 so none of PLAIN's
95 % font definitions are in \LaTeX.
97 % \LaTeX\ has its own tabbing environment, so PLAIN's is disabled.
99 % \LaTeX{} uses its own output routine, so most of the plain one was
106 %% {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
107 %% 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
108 %% Digits \0\1\2\3\4\5\6\7\8\9
109 %% Exclamation \! Double quote \" Hash (number) \#
110 %% Dollar \$ Percent \% Ampersand \&
111 %% Acute accent \' Left paren \( Right paren \)
112 %% Asterisk \* Plus \+ Comma \,
113 %% Minus \- Point \. Solidus \/
114 %% Colon \: Semicolon \; Less than \<
115 %% Equals \= Greater than \> Question mark \?
116 %% Commercial at \@ Left bracket \[ Backslash \\
117 %% Right bracket \] Circumflex \^ Underscore \_
118 %% Grave accent \` Left brace \{ Vertical bar \|
119 %% Right brace \} Tilde \~}
124 %<*2ekernel|autoload>
125 \catcode`\{=1 % left brace is begin-group character
126 \catcode`\}=2 % right brace is end-group character
127 \catcode`\$=3 % dollar sign is math shift
128 \catcode`\&=4 % ampersand is alignment tab
129 \catcode`\#=6 % hash mark is macro parameter character
130 \catcode`\^=7 % circumflex and uparrow are for superscripts
131 \catcode`\_=8 % underline and downarrow are for subscripts
132 \catcode`\^^I=10 % ascii tab is a blank space
133 \chardef\active=13 \catcode`\~=\active % tilde is active
134 \catcode`\^^L=\active \outer\def^^L{\par}% ascii form-feed is \outer\par
141 % We had to define the |\catcodes| right away, before the message line,
142 % since |\message| uses the |{| and |}| characters.
143 % When INITEX (the \TeX\ initializer) starts up,
144 % it has defined the following |\catcode| values:\\
145 % |\catcode`\^^@=9 % | ascii null is ignored\\
146 % |\catcode`\^^M=5 % | ascii return is end-line\\
147 % |\catcode`\\=0 % | backslash is TeX escape character\\
148 % |\catcode`\%=14 % | percent sign is comment character\\
149 % |\catcode`\ =10 % | ascii space is blank space\\
150 % |\catcode`\^^?=15 %| ascii delete is invalid\\
151 % |\catcode`\A=11 ... \catcode`\Z=11 %| uppercase letters\\
152 % |\catcode`\a=11 ... \catcode`\z=11 %| lowercase letters\\
153 % all others are type 12 (other)
155 % Here is a list of the characters that have been specially catcoded:
157 \def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
158 \do\#\do\^\do\_\do\%\do\~}
160 % (not counting ascii null, tab, linefeed, formfeed, return, delete)
161 % Each symbol in the list is preceded by \do, which can be defined
162 % if you want to do something to every item in the list.
164 % We make |@| signs act like letters, temporarily, to avoid conflict
165 % between user names and internal control sequences of plain format.
170 % To make the plain macros more efficient in time and space,
171 % several constant values are declared here as control sequences.
172 % If they were changed, anything could happen;
173 % so they are private symbols.
174 % \begin{macro}{\@ne}
175 % \begin{macro}{\tw@}
176 % \begin{macro}{\thr@@}
177 % \begin{macro}{\sixt@@n}
178 % \begin{macro}{\@cclv}
179 % Small constants are defined using |\chardef|.
193 % \begin{macro}{\@cclvi}
196 % \begin{macro}{\@MM}
197 % Constants above 255 defined using |\mathchardef|.
199 \mathchardef\@cclvi=256
201 \mathchardef\@M=10000
202 \mathchardef\@MM=20000
209 % Allocation of registers
211 % Here are macros for the automatic allocation of |\count|, |\box|,
212 % |\dimen|, |\skip|, |\muskip|, and |\toks| registers, as well as
213 % |\read| and |\write| stream numbers, |\fam| codes, |\language| codes,
214 % and |\insert| numbers.
220 % When a register is used only temporarily, it need not be allocated;
221 % grouping can be used, making the value previously in the register
222 % return after the close of the group. The main use of these macros is
223 % for registers that are defined by one macro and used by others,
224 % possibly at different nesting levels. All such registers should be
225 % defined through these macros; otherwise conflicts may occur,
226 % especially when two or more macro packages are being used at
229 % \begin{oldcomments}
230 % The following counters are reserved:
231 % 0 to 9 page numbering
232 % 10 count allocation
233 % 11 dimen allocation
235 % 13 muskip allocation
238 % 16 read file allocation
239 % 17 write file allocation
240 % 18 math family allocation
241 % 19 language allocation
242 % 20 insert allocation
243 % 21 the most recently allocated number
247 % New counters are allocated starting with 23, 24, etc. Other registers
248 % are allocated starting with 10. This leaves 0 through 9 for the user
249 % to play with safely, except that counts 0 to 9 are considered to be
250 % the page and subpage numbers (since they are displayed during
251 % output). In this scheme, |\count| 10 always contains the number of the
252 % highest-numbered counter that has been allocated, |\count| 14 the
253 % highest-numbered box, etc. Inserts are given numbers 254, 253, etc.,
254 % since they require a |\count|, |\dimen|, |\skip|, and |\box| all with
255 % the same number; |\count| 20 contains the lowest-numbered insert that
256 % has been allocated. Of course, |\box|255 is reserved for |\output|;
257 % |\count|255, |\dimen|255, and |\skip|255 can be used freely.
259 % It is recommended that macro designers always use
260 % |\global| assignments with respect to registers numbered\\
262 % and always non-|\global| assignments with respect to registers\\
263 % 0, 2, 4, 6, 8, 255.\\
264 % This will prevent ``save stack buildup'' that might otherwise occur.
267 \count10=22 % allocates \count registers 23, 24, ...
268 \count11=9 % allocates \dimen registers 10, 11, ...
269 \count12=9 % allocates \skip registers 10, 11, ...
270 \count13=9 % allocates \muskip registers 10, 11, ...
271 \count14=9 % allocates \box registers 10, 11, ...
272 \count15=9 % allocates \toks registers 10, 11, ...
273 \count16=-1 % allocates input streams 0, 1, ...
274 \count17=-1 % allocates output streams 0, 1, ...
275 \count18=3 % allocates math families 4, 5, ...
276 \count19=0 % allocates \language codes 1, 2, ...
277 \count20=255 % allocates insertions 254, 253, ...
280 % \begin{macro}{\insc@unt}
281 % \begin{macro}{\allocationnumber}
282 % The insertion counter and most recent allocation.
284 \countdef\insc@unt=20
285 \countdef\allocationnumber=21
290 % \begin{macro}{\m@ne}
293 \countdef\m@ne=22 \m@ne=-1
297 % \begin{macro}{\wlog}
298 % Write on log file (only)
300 \def\wlog{\immediate\write\m@ne}
304 % \begin{macro}{\count@}
305 % \begin{macro}{\dimen@}
306 % \begin{macro}{\dimen@i}
307 % \begin{macro}{\dimen@ii}
308 % \begin{macro}{\skip@}
309 % \begin{macro}{\toks@}
310 % Here are abbreviations for the names of scratch registers
311 % that don't need to be allocated.
315 \dimendef\dimen@i=1 % global only
327 % \begin{macro}{\newcount}
328 % \begin{macro}{\newdimen}
329 % \begin{macro}{\newskip}
330 % \begin{macro}{\newmuskip}
331 % \begin{macro}{\newbox}
332 % \begin{macro}{\newhelp}
333 % \begin{macro}{\newtoks}
334 % \changes{v1.0c}{1994/03/28}
335 % {Remove some \cs{outer} declarations.}
336 % \changes{v1.1h}{1995/04/24}
337 % {Remove remaining \cs{outer} declarations.}
338 % Now, we define |\newcount|, |\newbox|, etc. so that you can say
339 % |\newcount\foo| and |\foo| will be defined (with |\countdef|) to
340 % be the next counter.
342 % To find out which counter |\foo| is, you can look at
343 % |\allocationnumber|.
345 % Since there's no |\boxdef| command, |\chardef| is used to define a
346 % |\newbox|, |\newinsert|, |\newfam|, and so on.
348 % \LaTeX\ change: remove |\outer| from |\newcount| and |\newdimen| (FMi)
349 % This is necessary to use |\newcount| inside |\if...|
350 % later on. Also remove from |\newskip|, |\newbox|
351 % |\newwrite| and |\newfam| (DPC) to save later redefinition.
353 \def\newcount{\alloc@0\count\countdef\insc@unt}
354 \def\newdimen{\alloc@1\dimen\dimendef\insc@unt}
355 \def\newskip{\alloc@2\skip\skipdef\insc@unt}
356 \def\newmuskip{\alloc@3\muskip\muskipdef\@cclvi}
357 \def\newbox{\alloc@4\box\chardef\insc@unt}
358 \def\newhelp#1#2{\newtoks#1#1\expandafter{\csname#2\endcsname}}
359 \def\newtoks{\alloc@5\toks\toksdef\@cclvi}
369 % \begin{macro}{\newread}
370 % \begin{macro}{\newwrite}
372 \def\newread{\alloc@6\read\chardef\sixt@@n}
373 \def\newwrite{\alloc@7\write\chardef\sixt@@n}
378 % \LaTeX\ defines |\newfam| in |ltfss.dtx|.
380 %\def\newfam{\alloc@8\fam\chardef\sixt@@n}
383 % \begin{macro}{\newlanguage}
385 \def\newlanguage{\alloc@9\language\chardef\@cclvi}
389 % \begin{macro}{\alloc@}
391 \def\alloc@#1#2#3#4#5{\global\advance\count1#1\@ne
392 \ch@ck#1#4#2% make sure there's still room
393 \allocationnumber\count1#1%
394 \global#3#5\allocationnumber
395 \wlog{\string#5=\string#2\the\allocationnumber}}
399 % \begin{macro}{\newinsert}
401 \def\newinsert#1{\global\advance\insc@unt \m@ne
402 \ch@ck0\insc@unt\count
403 \ch@ck1\insc@unt\dimen
404 \ch@ck2\insc@unt\skip
406 \allocationnumber\insc@unt
407 \global\chardef#1\allocationnumber
408 \wlog{\string#1=\string\insert\the\allocationnumber}}
412 % \begin{macro}{\ch@ck}
414 %</2ekernel|autoload>
415 %<*2ekernel|autoload|autoerr>
417 \ifnum\count1#1<#2\else
418 %<!autoload> \errmessage{No room for a new #3}%
419 %<autoload> \@autoerr\ch@ck#1#2#3%
421 %</2ekernel|autoload|autoerr>
422 %<*2ekernel|autoload>
426 % \begin{macro}{\maxdimen}
427 % \begin{macro}{\hideskip}
428 % Here are some examples of allocation.
430 \newdimen\maxdimen \maxdimen=16383.99999pt % the largest legal <dimen>
431 \newskip\hideskip \hideskip=-1000pt plus 1fill % negative but can grow
438 % \begin{macro}{\z@skip}
439 % \begin{macro}{\voidb@x}
441 \newdimen\p@ \p@=1pt % this saves macro space and time
442 \newdimen\z@ \z@=0pt % can be used both for 0pt and 0
443 \newskip\z@skip \z@skip=0pt plus0pt minus0pt
444 \newbox\voidb@x % permanently void box register
451 % \changes{v1.1p}{1995/10/02}{Move \cs{newif} to ltdefns}
454 \message{compatibility for TeX 2, }
457 % If this file is used in an old \TeX\ we define the new features
458 % of \TeX\ 3.0 as simple macros or counters so that files that uses
459 % these features can be processed in such an environment
460 % (They will however produce some other results).
463 \ifx\@undefined\inputlineno
464 \newcount\inputlineno
466 % This could be used to detect that an old \TeX\ is in force
470 % Extra test for MLTeX 2, RmS 91/11/07.
472 \ifx\@undefined\language
475 \newcount\lefthyphenmin
476 \newcount\righthyphenmin
477 \newcount\errorcontextlines
478 \newcount\holdinginserts
479 \newdimen\emergencystretch
481 \let\noboundary\relax
482 \newcount\setlanguage
486 % Assign initial values to \TeX's parameters
489 \message{parameters,}
492 % All of \TeX's numeric parameters are listed here,
493 % but the code is commented out if no special value needs to be set.
494 % INITEX makes all parameters zero except where noted.
496 % \begin{oldcomments}
499 \tolerance=200 % INITEX sets this to 10000
509 \displaywidowpenalty=50
511 \predisplaypenalty=10000
513 % \postdisplaypenalty=0
514 % \interlinepenalty=0
515 % \floatingpenalty=0, set during \insert
516 % \outputpenalty=0, set before TeX enters \output
518 \doublehyphendemerits=10000
519 \finalhyphendemerits=5000
522 % \looseness=0, cleared by TeX after each paragraph
528 % \tracingparagraphs=0
540 % \lefthyphenmin=2 \righthyphenmin=3 set below
542 % \maxdeadcycles=25 % INITEX does this
543 % \hangafter=1 % INITEX does this, also TeX after each paragraph
545 % \mag=1000 % INITEX does this
546 % \escapechar=`\\ % INITEX does this
548 \defaulthyphenchar=`\-
551 % \endlinechar=`\^^M % INITEX does this
552 % \newlinechar=-1 \LaTeX\ sets this in ltdefns.dtx.
556 % \time=now % TeX does this at beginning of job
557 % \day=now % TeX does this at beginning of job
558 % \month=now % TeX does this at beginning of job
559 % \year=now % TeX does this at beginning of job
562 % In \LaTeX{} we don't want box information in the transcript
563 % unless we do a full tracing.
564 % \changes{v1.0g}{1994/04/28}{Turn off overfull box tracing in log}
569 \errorcontextlines=-1
577 \splitmaxdepth=\maxdimen
578 \boxmaxdepth=\maxdimen
581 % \begin{oldcomments}
582 % \lineskiplimit=0pt, changed by \normalbaselines
584 \delimitershortfall=5pt
585 \nulldelimiterspace=1.2pt
589 % \predisplaysize=0pt, set before TeX enters $$
590 % \displaywidth=0pt, set before TeX enters $$
591 % \displayindent=0pt, set before TeX enters $$
595 % \hangindent=0pt, zeroed by TeX after each paragraph
599 % \baselineskip=0pt, changed by \normalbaselines
600 % \lineskip=0pt, changed by \normalbaselines
602 \parskip=0pt plus 1pt
603 \abovedisplayskip=12pt plus 3pt minus 9pt
604 \abovedisplayshortskip=0pt plus 3pt
605 \belowdisplayskip=12pt plus 3pt minus 9pt
606 \belowdisplayshortskip=7pt plus 3pt minus 4pt
618 \parfillskip=0pt plus 1fil
623 % \begin{macro}{\normalbaselineskip}
624 % \begin{macro}{\normallineskip}
625 % \begin{macro}{\normallineskiplimit}
626 % We also define special registers that function like parameters:
628 \newskip\normalbaselineskip \normalbaselineskip=12pt
629 \newskip\normallineskip \normallineskip=1pt
630 \newdimen\normallineskiplimit \normallineskiplimit=0pt
636 % \begin{macro}{\interfootlinepenalty}
638 \newcount\interfootnotelinepenalty \interfootnotelinepenalty=100
642 % Definitions for preloaded fonts
644 % \begin{macro}{\magstephalf}
645 % \begin{macro}{\magstep}
647 \def\magstephalf{1095 }
648 \def\magstep#1{\ifcase#1 \@m\or 1200\or 1440\or 1728\or
649 2074\or 2488\fi\relax}
655 % Macros for setting ordinary text
657 % \begin{macro}{\frenchspacing}
658 % \begin{macro}{\nonfrenchspacing}
660 \def\frenchspacing{\sfcode`\.\@m \sfcode`\?\@m \sfcode`\!\@m
661 \sfcode`\:\@m \sfcode`\;\@m \sfcode`\,\@m}
662 \def\nonfrenchspacing{\sfcode`\.3000\sfcode`\?3000\sfcode`\!3000%
663 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 }
668 % \begin{macro}{\normalbaselines}
670 \def\normalbaselines{\lineskip\normallineskip
671 \baselineskip\normalbaselineskip \lineskiplimit\normallineskiplimit}
677 % \changes{v1.1m}{1995/09/01}{Use \cs{let} to save space}
678 % Save a bit of space by using |\let| here.
680 \def\^^M{\ } % control <return> = control <space>
681 \let\^^I\^^M % same for <tab>
695 % \begin{macro}{\lbrack}
696 % \begin{macro}{\rbrack}
706 % These are not from plain.tex but they are similar to other commands
707 % found here and nowhere else, being alternate input forms for
716 % \begin{macro}{\endgraf}
717 % \begin{macro}{\endline}
725 % \begin{macro}{\space}
731 % \begin{macro}{\empty}
732 % \changes{v1.1m}{1995/09/01}{Use \cs{let} to save space}
733 % This probably ought to go altogether, but let it to the \LaTeX\
734 % version to save space.
740 % \begin{macro}{\null}
746 % \begin{macro}{\bgroup}
747 % \begin{macro}{\egroup}
755 % \begin{macro}{\obeylines}
756 % \begin{macro}{\obeyspaces}
757 % In |\obeylines|, we say |\let^^M=\par| instead of |\def^^M{\par}|
758 % since this allows, for example, |\let\par=\cr \obeylines \halign{...|
760 {\catcode`\^^M=\active % these lines must end with %
761 \gdef\obeylines{\catcode`\^^M\active \let^^M\par}%
762 \global\let^^M\par} % this is in case ^^M appears in a \write
763 \def\obeyspaces{\catcode`\ \active}
764 {\obeyspaces\global\let =\space}
769 % \begin{macro}{\loop}
770 % \changes{v1.0h}{1994/05/16}{Use Kabelschacht method}
771 % \begin{macro}{\iterate}
772 % \changes{v1.1b}{1994/11/10}
773 % {(CAR) added extra \cs{relax}}
774 % \changes{v1.1m}{1994/05/26}
775 % {(CAR) added \cs{long}}
776 % \begin{macro}{\repeat}
777 % We use Kabelschacht's method of doing loops, see TUB 8\#2 (1987).
778 % (unless that breaks something :-). It turned out to need an
779 % extra |\relax|: see pr/642 (|\loop| could do one iteration too much
782 \long\def \loop #1\repeat{%
783 \def\iterate{#1\relax % Extra \relax
784 \expandafter\iterate\fi
790 % This setting of |\repeat| is needed to make |\loop...\if...\repeat|
791 % skippable within another |\if...|.
799 % \LaTeX\ defines |\smallskip|, etc.\ in |ltspace.dtx|.
801 % \begin{macro}{\nointerlineskip}
802 % \begin{macro}{\offinterlineskip}
803 % \changes{v1.1n}{1995/07/02}{Replaced 1000 by \cs{@m}}
805 \def\nointerlineskip{\prevdepth-\@m\p@}
806 \def\offinterlineskip{\baselineskip-\@m\p@
807 \lineskip\z@ \lineskiplimit\maxdimen}
812 % \begin{macro}{\vglue}
813 % \begin{macro}{\hglue}
815 \def\vglue{\afterassignment\vgl@\skip@=}
816 \def\vgl@{\par \dimen@\prevdepth \hrule \@height\z@
817 \nobreak\vskip\skip@ \prevdepth\dimen@}
818 \def\hglue{\afterassignment\hgl@\skip@=}
819 \def\hgl@{\leavevmode \count@\spacefactor \vrule \@width\z@
820 \nobreak\hskip\skip@ \spacefactor\count@}
825 % \LaTeX\ defines |~| in |ltdefns.dtx|.
827 % \begin{macro}{\slash}
829 \def\slash{/\penalty\exhyphenpenalty} % a `/' that acts like a `-'
833 % \begin{macro}{\break}
834 % \begin{macro}{\nobreak}
835 % \begin{macro}{\allowbreak}
837 \def\break{\penalty-\@M}
838 \def\nobreak{\penalty \@M}
839 \def\allowbreak{\penalty \z@}
845 % \begin{macro}{\filbreak}
846 % \begin{macro}{\goodbreak}
848 \def\filbreak{\par\vfil\penalty-200\vfilneg}
849 \def\goodbreak{\par\penalty-500 }
854 % \begin{macro}{\eject}
855 % \changes{v1.1s}{1995/10/17}{Move \cs{supereject} to compat file}
856 % Define |\eject| as in plain \TeX\ but define |\supereject| only in
857 % the compatibility file.
859 \def\eject{\par\break}
863 % \begin{macro}{\removelastskip}
865 \def\removelastskip{\ifdim\lastskip=\z@\else\vskip-\lastskip\fi}
869 % \begin{macro}{\smallbreak}
870 % \begin{macro}{\medbreak}
871 % \begin{macro}{\bigbreak}
873 \def\smallbreak{\par\ifdim\lastskip<\smallskipamount
874 \removelastskip\penalty-50\smallskip\fi}
875 \def\medbreak{\par\ifdim\lastskip<\medskipamount
876 \removelastskip\penalty-100\medskip\fi}
877 \def\bigbreak{\par\ifdim\lastskip<\bigskipamount
878 \removelastskip\penalty-200\bigskip\fi}
884 % \begin{macro}{\m@th}
885 % \changes{v1.0h}{1994/05/16}{Remove unnecssary space}
887 \def\m@th{\mathsurround\z@}
891 % \begin{macro}{\underbar}
892 % Due to \LaTeX's redefinition of |\underline| plain \TeX's
893 % |\underbar| can be done in a simpler fashion (but do we
895 % \changes{v1.1m}{1994/05/26}
896 % {(CAR/FMi) changed to use box \cs{tw@}}
897 % \changes{v1.1p}{1994/05/26}
898 % {(DPC) changed to use \cs{sbox}}
900 \def\underbar#1{\underline{\sbox\tw@{#1}\dp\tw@\z@\box\tw@}}
904 % \begin{macro}{\strutbox}
905 % \begin{macro}{\strut}
906 % \LaTeX\ sets |\strutbox| in |\set@fontsize|.
909 \def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}
914 % \begin{macro}{\hidewidth}
915 % For alignment entries that can stick out.
917 \def\hidewidth{\hskip\hideskip}
921 % \changes{v1.0h}{1994/05/16}{Remove unnecessary def for \cs{item}}
922 % \changes{v1.1i}{1995/04/27}
923 % {Move \cs{hang} and \cs{textindent} to latex209.def}
924 % \changes{RmS}{1991/11/04}{Removed \cs{itemitem} since never
925 % needed/useful with \LaTeX.}
927 % \begin{macro}{\narrower}
930 \advance\leftskip\parindent
931 \advance\rightskip\parindent}
935 % \changes{v1.1c}{1994/11/12}{Comment out more encoding specific
937 % \LaTeX\ defines |\ae| and similar commands elsewhere.
945 % Most text commands are actually encoding specific and therefore
946 % defined later, so commented out or removed from this file.
947 % \changes{v1.0h}{1994/05/16}{Comment out encoding specific commands}
949 % \begin{macro}{\leavevmode}
950 % begins a paragraph, if necessary
952 \def\leavevmode{\unhbox\voidb@x}
956 % \begin{macro}{\mathhexbox}
958 \def\mathhexbox#1#2#3{\mbox{$\m@th \mathchar"#1#2#3$}}
963 % \begin{macro}{\ialign}
965 \def\ialign{\everycr{}\tabskip\z@skip\halign} % initialized \halign
969 % \begin{macro}{\oalign}
970 % \begin{macro}{\o@lign}
971 % \begin{macro}{\ooalign}
973 \def\oalign#1{\leavevmode\vtop{\baselineskip\z@skip \lineskip.25ex%
974 \ialign{##\crcr#1\crcr}}}
975 \def\o@lign{\lineskiplimit\z@ \oalign}
976 \def\ooalign{\lineskiplimit-\maxdimen \oalign}
982 % \begin{macro}{\sh@ft}
983 % \changes{v1.1t}{1996/07/26}{replace \cs{dimen}\cs{z@} by
985 % \changes{v1.1y}{2005/09/27}{Macro no longer used but
986 % left for compatibility}
987 % The definition of this macro in plain.tex was improved in
988 % about 1997; but as a result its usage was changed and its new
989 % definition is not appropriate for \LaTeX{}.
991 % Since the version given here has been in use by
992 % \LaTeX{} for many years it does not seem prudent to remove it now.
993 % As far as we can tell it has only been used to define~|\b| and~|\d|
994 % but this cannot be certain.
996 \def\sh@ft#1{\dimen@.00#1ex\multiply\dimen@\fontdimen1\font
997 \kern-.0156\dimen@} % compensate for slant in lowered accents
1001 % \begin{macro}{\ltx@sh@ft}
1002 % \changes{v1.1y}{2005/09/27}{New macro}
1003 % This is the \LaTeX{} version of the second incarnation of the plain
1004 % macro |\sh@ft|, which takes a dimension as its argument. It shifts
1005 % a pseudo-accent horizontally by an amount proportional to the product
1006 % of its argument and the slant-per-point (fontdimen 1).
1012 \fontdimen1\font \dimen@
1013 } % kern by #1 times the current slant
1019 % \LaTeX{} change: the text commands such as
1020 % |\d|, |\b|, |\c|, |\copyright|,~|\TeX|
1021 % are now defined elsewhere.
1024 % {1993/11/29}{All accents in decimals; suggested by Paul Taylor}
1025 % \changes{v1.0d}{1994/04/12}
1026 % {Define \cs{@acci}}
1027 % \changes{v1.0h}{1994/05/16}{Remove \cs{@acci} and friends again}
1029 % \LaTeX{} change: Make |\t| work in a moving argument.
1030 % Now defined elsewhere.
1032 % \begin{macro}{\hrulefill}
1033 % \begin{macro}{\dotfill}
1034 % \LaTeX\ change: |\kern\z@| added to end of
1035 % |\hrulefill| and |\dotfill|
1036 % to make them work in `tabular' and `array' environments.
1037 % (Change made 24 July 1987).
1038 % \LaTeX\ change: |\leavevmode| added at begining of
1039 % |\dotfill| and |\hrulefill|
1040 % so that they work as expected in vertical mode.
1042 \def\hrulefill{\leavevmode\leaders\hrule\hfill\kern\z@}
1044 % The box in |\dotfill| originally contained (in plain.tex):
1045 % |\mkern 1.5mu .\mkern 1.5mu|; the width of .44em differs from this
1046 % by .04pt which is probably an acceptable difference within leaders.
1047 % \changes{v1.1u}{1996/10/28}{Removed math mode}
1048 % \changes{v1.1v}{1996/10/29}{Got arithmetic correct (CAR)}
1049 % \changes{v1.1w}{1996/11/03}{Saved tokens by using \cs{hb@xt@}}
1053 \cleaders \hb@xt@ .44em{\hss.\hss}\hfill
1059 % INITEX sets |\sfcode x=1000| for all x, except that |\sfcode`X=999|
1060 % for uppercase letters. The following changes are needed:
1062 \sfcode`\)=0 \sfcode`\'=0 \sfcode`\]=0
1064 % The |\nonfrenchspacing| macro will make further changes to
1068 % Definitions related to output
1071 % \changes{v1.1k}{1995/05/22}{Definitions of \cs{footins} and
1072 % \cs{footnoterule} moved to ltfloat.}
1075 % |\magnification| doesn't work in \LaTeX.
1077 %\def\magnification{\afterassignment\m@g\count@}
1078 %\def\m@g{\mag\count@
1079 % \hsize6.5truein\vsize8.9truein\dimen\footins8truein}
1082 % \begin{macro}{\showoverfull}
1083 % \changes{v0.1k ltfinal}{1994/05/19}{used \cs{@ne} not 1}
1084 % The following commands are used in debugging:
1086 \def\showoverfull{\tracingonline\@ne}
1090 % \begin{macro}{\showoutput}
1091 % \changes{v0.1k ltfinal}{1994/05/19}
1092 % {used \cs{maxdimen} not 99999}
1093 % \changes{v1.1n}{1995/07/02}{Use \cs{showoverfull} to save space}
1094 % \changes{v1.1x}{2002/02/24}{Use newly added \cs{loggingoutput}}
1095 % \begin{macro}{\loggingoutput}
1096 % \changes{v1.1x}{2002/02/24}{Macro added}
1098 %</2ekernel|autoload>
1099 %<*2ekernel|autoerr>
1100 \gdef\loggingoutput{\tracingoutput\@ne
1101 \showboxbreadth\maxdimen\showboxdepth\maxdimen\errorstopmode}
1102 \gdef\showoutput{\loggingoutput\showoverfull}
1103 %</2ekernel|autoerr>
1104 %<autoload>\def\showoutput{\@autoerr\showoutput}
1110 % \begin{macro}{\tracingall}
1111 % \changes{LaTeX209}{1991/08/26}{Added
1112 % \cs{errorcontextlines}!=\cs{maxdimen}, suggested by J. Schrod}
1113 % \changes{v1.1n}{1995/07/02}{Use \cs{showoutput} to save space}
1114 % \changes{v1.1x}{2002/02/24}{Use newly added \cs{loggingoutput}}
1115 % \begin{macro}{\loggingall}
1116 % \changes{v1.1x}{2002/02/24}{Macro added}
1118 %<*2ekernel|autoerr>
1119 \gdef\loggingall{\tracingcommands\tw@\tracingstats\tw@
1120 \tracingpages\@ne\tracinglostchars\@ne
1121 \tracingmacros\tw@\tracingparagraphs\@ne\tracingrestores\@ne
1122 \errorcontextlines\maxdimen\loggingoutput}
1123 \gdef\tracingall{\loggingall\showoverfull}
1124 %</2ekernel|autoerr>
1125 %<autoload>\def\tracingall{\@autoerr\tracingall}
1130 % \LaTeX\ change: |\showhyphens| Defined later.
1132 % Punctuation affects the spacing.
1134 %<*2ekernel|autoload>
1136 %</2ekernel|autoload>