1 % \iffalse meta-comment
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.
31 %%% From File: ltsect.dtx
34 \ProvidesFile{ltsect.dtx}[2014/09/29 v1.0z LaTeX Kernel (Sectioning)]
36 \documentclass{ltxdoc}
37 \GetFileInfo{ltsect.dtx}
47 Tobias Oetiker\thanks{Tobi updated
48 the comments to `doc' conventions}\and
52 \MaintainedByLaTeXTeam{latex}
61 % \changes{v1.0o}{1995/05/07}{Use \cs{hb@xt@}}
62 % \changes{v1.0y}{1996/10/31}{Corrected and tidied documentation;
66 % \section{Sectioning Commands}
68 % This file defines the declarations such as |\author| which are used
69 % by |\maketitle|. |\maketitle| itself is defined by each class, not
70 % in the \LaTeX{} kernel.
72 % The second part of the file defines the generic commands used for
73 % defining sectioning commands such as |\chapter|. Again the actual
74 % document level commands are defined in the class files, in terms of
80 % \changes{v1.0a}{1994/03/04}{Initial version, split from latex.dtx}
81 % \changes{v1.0b}{1994/03/28}{Split further from ltherest.dtx}
82 % \changes{v1.0d}{1994/05/21}{Use new error commands}
83 % \changes{v1.0f}{1994/10/12}{Doc. typos}
84 % \changes{v1.0g}{1994/10/18}{Added \cs{normalcolor}}
85 % \changes{v1.0i}{1994/11/17}
86 % {\cs{@tempa} to \cs{reserved@a}}
87 % \changes{v1.0m}{1995/05/03}{TO: Promoted documentation to doc.sty
95 % \subsection{The Title}
97 % \DescribeMacro{\title}
98 % The user defines the title and author by the declarations
99 % |\title|\marg{name},
100 % \DescribeMacro{\author}
101 % |\author|\marg{name}
103 % \DescribeMacro{\date}
104 % Similarly the date is declared with
105 % |\date|\marg{date}.
107 % \DescribeMacro{\thanks}
108 % Inside these, the |\thanks|\marg{footnote text} command may be used
109 % to make acknowledgements, notice of address, etc.\ in a footnote.
110 % \DescribeMacro{\and}
111 % If there are multiple authors, they have to be separated with the
114 % \DescribeMacro{\maketitle}
115 % And finally, the |\maketitle| command produces the actual title,
116 % using the information previously saved with the other commands.
118 % \begin{macro}{\title}
119 % \begin{macro}{\@title}
120 % \changes{LaTeX2e}{1993/12/11}{Added default}
121 % |\title| for use in |\maketitle|. If not given |\maketitle| will
122 % produce an error message.
124 \def\title#1{\gdef\@title{#1}}
125 \def\@title{\@latex@error{No \noexpand\title given}\@ehc}
130 % \begin{macro}{\author}
131 % \begin{macro}{\@author}
132 % \changes{LaTeX2e}{1993/12/11}{Added default}
134 % |\author| for use in |\maketitle|. If not given |\maketitle| will
135 % produce a warning message.
138 \def\author#1{\gdef\@author{#1}}
139 \def\@author{\@latex@warning@no@line{No \noexpand\author given}}
144 % \begin{macro}{\date}
145 % \begin{macro}{\@date}
146 % |\date| for use in |\maketitle|. If not given |\maketitle| will
147 % produce |\today| as the default.
149 \def\date#1{\gdef\@date{#1}}
155 % \changes{1.0h}{1994/11/04}{(ASAJ) Added \cs{protected@xdef} to
157 % \begin{macro}{\thanks}
159 \def\thanks#1{\footnotemark
160 \protected@xdef\@thanks{\@thanks
161 \protect\footnotetext[\the\c@footnote]{#1}}%
166 % \begin{macro}{\@thanks}
171 % \begin{macro}{\and}
173 \def\and{% % \begin{tabular}
175 \hskip 1em \@plus.17fil%
176 \begin{tabular}[t]{c}}% % \end{tabular}
181 \message{sectioning,}
183 % \subsection{Sectioning}
186 % \begin{macro}{\@secpenalty}
188 \newcount\@secpenalty
193 % \begin{macro}{\if@noskipsec}
194 % \begin{macro}{\@noskipsectrue}
195 % \changes{1.0w}{1996/09/29}{Added documentation}
196 % Way back in 1991 (08/26) FMi \& RmS set the |\@noskipsec| switch
197 % to true for the preamble and to false in |\document|.
198 % This was done to trap lists and related text in the preamble but it
199 % does not catch everything.
201 \newif\if@noskipsec \@noskipsectrue
206 % \begin{macro}{\@startsection}
208 % The |\@startsection{|\meta{name}|}{|\meta{level}|}{|%
209 % \meta{indent}|}{|\meta{beforeskip}|}|\\
210 % |{|\meta{afterskip}|}{|\meta{style}|}*[|\meta{altheading}%
211 % |]{|\meta{heading}|}|
212 % command is the mother of all the user level sectioning commands.
213 % The part after the |*|, including the |*| is optional.
215 % \begin{description}
216 % \item[name:] e.g., 'subsection'
217 % \item[level:] a number, denoting depth of section -- e.g., chapter=1,
219 % \item[indent:] Indentation of heading from left margin
220 % \item[beforeskip:] Absolute value = skip to leave above the heading.
221 % If negative, then paragraph indent of text following
222 % heading is suppressed.
223 % \item[afterskip:] if positive, then skip to leave below heading, else
224 % negative of skip to leave to right of run-in heading.
225 % \item[style:] Commands to set style. Since June 1996 release the
226 % \emph{last} command in this argument may be a command
227 % such as |\MakeUppercase| or |\fbox| that takes an
228 % argument. The section heading will be supplied as the
229 % argument to this command. So setting |#6| to, say,
230 % |\bfseries\MakeUppercase| would produce bold,
231 % uppercase headings.
234 % If `|*|' is missing, then increment the counter. If it is
235 % present, then there should be no |[|\meta{altheading}|]| argument.
236 % The command uses the counter 'secnumdepth'. It contains a pointer
237 % to the highest section level that is to be numbered.
240 % The |\@startsection| command should be at the same or higher
241 % grouping level as the text that follows it. For example, you should
242 % \emph{not} do something like
244 % \def\foo{ \begingroup ...
249 % Pseudocode for the |\@startsection| command
250 % \begin{oldcomments}
251 % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} ==
253 % IF @noskipsec = T THEN \leavevmode FI
254 % % true if previous section had no body.
257 % \@tempskipa := BEFORESKIP
259 % IF \@tempskipa < 0 THEN \@tempskipa := -\@tempskipa
263 % THEN \everypar == null
264 % ELSE \addpenalty{\@secpenalty}
265 % \addvspace{\@tempskipa}
268 % THEN \@ssect{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
269 % ELSE \@dblarg{\@sect
270 % {NAME}{LEVEL}{INDENT}
271 % {BEFORESKIP}{AFTERSKIP}{STYLE}}
277 \def\@startsection#1#2#3#4#5#6{%
278 \if@noskipsec \leavevmode \fi
282 \ifdim \@tempskipa <\z@
283 \@tempskipa -\@tempskipa \@afterindentfalse
288 \addpenalty\@secpenalty\addvspace\@tempskipa
291 {\@ssect{#3}{#4}{#5}{#6}}%
292 {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
296 % \begin{macro}{\@sect}
297 % Pseudocode for the |\@sect| command
298 % \begin{oldcomments}
299 % \@sect{NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}[ARG1]{ARG2}
302 % IF LEVEL > \c@secnumdepth
303 % THEN \@svsec :=L null
304 % ELSE \refstepcounter{NAME}
305 % \@svsec :=L BEGIN \@seccntformat{#1}\relax END
310 % \@hangfrom{\hskip INDENT\@svsec}
311 % {\interlinepenalty 10000 ARG2\par}
314 % \addcontentsline{toc}{NAME}
315 % { IF LEVEL > \c@secnumdepth
316 % ELSE \protect\numberline{\theNAME} FI
318 % ELSE \@svsechd == BEGIN STYLE
319 % \hskip INDENT\@svsec
322 % \addcontentsline{toc}{NAME}
323 % { IF LEVEL > \c@secnumdepth
325 % \protect\numberline{\theNAME}
334 % \changes{LaTeX2.09}{1992/08/25}
335 % {(FMi) replaced explicit setting of \cs{@svsec}
336 % by call to \cs{@seccntformat}}
337 % \changes{LaTeX2.09}{1993/08/05}
338 % {(RmS) Made sure that \cs{protect} works correctly in
339 % expansion of \cs{the} counter}
340 % \changes{1.0h}{1994/11/04}
341 % {(ASAJ) Added \cs{protected@edef}.}
343 \def\@sect#1#2#3#4#5#6[#7]#8{%
344 \ifnum #2>\c@secnumdepth
349 % Since |\@seccntformat| might end with an improper |\hskip| which
350 % is scanning forward for |plus| or |minus| we end the definition
351 % of |\@svsec| with |\relax| as a precaution.
352 % \changes{1.0n}{1995/05/06}{Added \cs{relax} after
353 % \cs{@seccntformat} just in case}
355 \protected@edef\@svsec{\@seccntformat{#1}\relax}%
358 \ifdim \@tempskipa>\z@
361 % \changes{v1.0s}{1996/05/21}
362 % {(DPC) Moved brace to allow commands like
363 % \cs{MakeUppercase} in 6th argument.
364 % Changed \cs{par} to \cs{endgraf} to allow non-long
365 % commands. internal/2148}
366 % \changes{v1.0t}{1996/06/10}
367 % {(DPC) Changed \cs{endgraf} to \cs{@@par}}
368 % This |{| used to be after the argument to |\@hangfrom| but was moved
369 % here to allow commands such as |\MakeUppercase| to be used at the end
373 \@hangfrom{\hskip #3\relax\@svsec}%
374 \interlinepenalty \@M #8\@@par}%
376 \csname #1mark\endcsname{#7}%
377 \addcontentsline{toc}{#1}{%
378 \ifnum #2>\c@secnumdepth \else
379 \protect\numberline{\csname the#1\endcsname}%
384 % |\relax| added 2 May 90
385 % \changes{v1.0s}{1996/05/21}
386 % {(DPC) Added extra braces for internal/2148}
391 \csname #1mark\endcsname{#7}%
392 \addcontentsline{toc}{#1}{%
393 \ifnum #2>\c@secnumdepth \else
394 \protect\numberline{\csname the#1\endcsname}%
402 % \begin{macro}{\@xsect}%
403 % Pseudocode for the |\@xsect| command
404 % \begin{oldcomments}
405 % \@xsect{AFTERSKIP} ==
411 % ELSE @nobreak :=G F
413 % \everypar{ IF @noskipsec = T
414 % THEN @noskipsec :=G F
415 % \clubpenalty :=G 10000
421 % \hskip -AFTERSKIP \relax
422 % %% relax added 14 Jan 91
423 % ELSE \clubpenalty :=G \@clubpenalty
432 % \changes{0.0}{1992/08/19}
433 % {(RmS) corrected bug: stretch and shrink in argument to
434 % \cs{hskip} previously not negated}
438 \ifdim \@tempskipa>\z@
440 % Why not combine |\@sect| and |\@xsect| and save doing the
441 % same test twice? It is not possible to change this now as these
444 % This |\par| seems unnecessary.
451 % \changes{v1.0u}{1996/07/26}{Removed \cs{global} before
453 % \changes{v1.0x}{1996/10/23}{Replaced \cs{hskip...} with \cs{setbox...}
454 % as used in \cs{@afterheading}}
457 \global\@noskipsectrue
460 \global\@noskipsecfalse
461 {\setbox\z@\lastbox}%
463 \begingroup \@svsechd \endgroup
468 \clubpenalty \@clubpenalty
476 % \begin{macro}{\@seccntformat}
477 % This command formats the section number including the space
479 % \changes{1.0n}{1995/05/06}{Use \cs{quad} instead of \cs{hskip}}
481 \def\@seccntformat#1{\csname the#1\endcsname\quad}
485 % Pseudocode for the |\@ssect| command
486 % \begin{oldcomments}
487 % \@ssect{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}{ARG} ==
492 % \@hangfrom{\hskip INDENT}{\interlinepenalty 10000 ARG\par}
494 % ELSE \@svsechd == BEGIN STYLE
503 % Pseudocode for the |\@afterheading| command
504 % \begin{oldcomments}
508 % \everypar := BEGIN IF @nobreak = T
509 % THEN @nobreak :=G false
510 % \clubpenalty :=G 10000
511 % IF @afterindent = F
512 % THEN remove \lastbox
514 % ELSE \clubpenalty :=G \@clubpenalty
522 % \begin{macro}{\@ssect}
524 \def\@ssect#1#2#3#4#5{%
526 \ifdim \@tempskipa>\z@
529 % \changes{v1.0s}{1996/05/21}
530 % {(DPC) Moved brace to allow commands like
531 % \cs{MakeUppercase} in 4th argument.
532 % Changed \cs{par} to \cs{endgraf} to allow non-long
533 % commands. internal/2148}
534 % \changes{v1.0t}{1996/06/10}
535 % {(DPC) Changed \cs{endgraf} to \cs{@@par}}
536 % This |{| used to be after the argument to |\@hangfrom| but was moved
537 % here to allow commands such as |\MakeUppercase| to be used at the end
541 \@hangfrom{\hskip #1}%
542 \interlinepenalty \@M #5\@@par}%
546 % \changes{v1.0s}{1996/05/21}
547 % {(DPC) Added extra braces for internal/2148}
549 \def\@svsechd{#4{\hskip #1\relax #5}}%
555 % \begin{macro}{\if@afterindent}
556 % \begin{macro}{\@afterindenttrue}
558 \newif\if@afterindent \@afterindenttrue
560 % \end{macro}\end{macro}
562 % \begin{macro}{\@afterheading}
563 % \changes{v1.0v}{1996/08/02}{Removed \cs{global}
564 % before \cs{@nobreak...}}
566 % This hook is used in setting up custom-built headings in classes.dtx.
575 \if@afterindent \else
576 {\setbox\z@\lastbox}%
579 \clubpenalty \@clubpenalty
586 % \begin{macro}{\@hangfrom}
588 % |\@hangfrom{|\meta{text}|}| : Puts \meta{text} in a box, and makes a
589 % hanging indentation of the following material up to the first
590 % |\par|. Should be used in vertical mode.
592 % \changes{v1.0a}{1994/03/07}{(DPC)Extra groups for colour}
594 \def\@hangfrom#1{\setbox\@tempboxa\hbox{{#1}}%
595 \hangindent \wd\@tempboxa\noindent\box\@tempboxa}
599 % \begin{macro}{\c@secnumdepth}
600 % \begin{macro}{\c@tocdepth}
602 \newcount\c@secnumdepth
605 % \end{macro}\end{macro}
607 % \begin{macro}{\secdef}
609 % |\secdef{|\meta{unstarcmds}|}{|\meta{unstarcmds}|}{|%
610 % \meta{starcmds}|}|\\
611 % When defining a |\chapter| or |\section| command without using
612 % |\@startsection|, you can use |\secdef| as follows:
614 % \item |\def\chapter{| \ldots |\secdef|
615 % |\|\meta{starcmd} |\|\meta{unstarcmd} |}|
616 % \item |\def\|\meta{starcmd}|[#1]#2{| \ldots |}|
617 % |%| Command to define |\chapter[|\ldots|]{|\ldots|}|
618 % \item |\def\|\meta{unstarcmd}|#1{| \ldots |}|
619 % |%| Command to define |\chapter*{|\ldots|}|
623 \def\secdef#1#2{\@ifstar{#2}{\@dblarg{#1}}}
627 % \subsubsection{Initializations}
628 % \begin{macro}{\sectionmark}
629 % \begin{macro}{\subsectionmark}
630 % \begin{macro}{\subsubsectionmark}
631 % \begin{macro}{\paragraphmark}
632 % \begin{macro}{\subparagraphmark}
633 % \changes{v1.0q}{1995/10/25}{Use \cs{let} not \cs{def} to save space.}
635 \let\sectionmark\@gobble
636 \let\subsectionmark\@gobble
637 \let\subsubsectionmark\@gobble
638 \let\paragraphmark\@gobble
639 \let\subparagraphmark\@gobble
651 % \subsection{Table of Contents etc.}
653 % \subsubsection{Convention}
654 % |\tf@|\meta{foo} = file number for output for table foo.
655 % The file is opened only if |@filesw| = |true|.
657 % \subsubsection{Commands}
660 % A |\l@|\meta{type}|{|\meta{entry}|}{|\meta{page}|}| Macro needs to
661 % defined by document style for making an entry of type \meta{type}
662 % in a table of contents, etc. E.g., the document style
663 % should define |\l@chapter|, |\l@section|, etc.
665 % \textbf{Note:} When the |\protect| command is
666 % used in the \meta{entry} or \meta{text} of one of the commands
667 % below, it causes the following control sequence to be written on
668 % the file without being expanded. The sequence will be expanded
669 % when the table of contents entry is processed.
671 % \textbf{Surprise:} Inside an |\addcontentsline| or |\addtocontents|
672 % command argument, the commands: |\index|, |\glossary|, and |\label|
673 % are no-ops . This could cause a problem if the user puts an
674 % |\index| or |\label| into one of the commands he writes, or into the
675 % optional `short version' argument of a |\section| or |\caption|
678 % \begin{macro}{\@starttoc}
679 % The |\@starttoc|\marg{ext} command is used to define the commands:\\
680 % |\tableofcontents|, |\listoffigures|, etc.
683 % |\@starttoc{lof}| is used in |\listoffigures|. This command
684 % reads the |.|\meta{ext} file and sets up to write the new
685 % |.|\meta{ext} file.
687 % \begin{oldcomments}
692 % read file \jobname.EXT
694 % THEN open \jobname.EXT as file \tf@EXT
696 % @nobreak :=G FALSE %% added 24 May 89
701 % \changes{0.0}{1992/01/14}{(RmS) added \cs{immediate} to \cs{openout}
702 % as all \cs{write} commands
703 % are also executed \cs{immediate}}
704 % \changes{v1.0u}{1996/07/26}{removed \cs{global}
705 % before \cs{@nobreak...}}
710 \@input{\jobname.#1}%
712 \expandafter\newwrite\csname tf@#1\endcsname
713 \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
720 % \begin{macro}{\addcontentsline}
721 % The |\addcontentsline{|\meta{table}|}{|\meta{type}|}{|%
722 % \meta{entry}|}| command allows the user to add
723 % his/her own entry to a table of contents, etc. The command adds the
724 % entry |\contentsline{|\meta{type}|}{|\meta{entry}|}{|\meta{page}|}|
725 % to the |.|\meta{table} file.
727 % This macro is implemented as an application of |\addtocontents|.
728 % Note that |\thepage| is not expandable during |\protected@write|
729 % therefore one gets the page number at the time of the |\shipout|.
731 % \changes{v1.0c}{1994/05/20}{Correct setting of \cs{protect}.}
732 % \changes{v1.0j}{1995/04/23}{Use \cs{contentsline} internally.}
733 % \changes{v1.0h}{1994/11/04}{Added \cs{protected@write} to
734 % \cs{addcontentsline}. ASAJ.}
736 \def\addcontentsline#1#2#3{%
737 \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}}}
741 % \changes{v1.0c}{1994/05/20}{Correct setting of \cs{protect}.}
742 % \changes{v1.0h}{1994/11/04}{Added \cs{protected@write} to
743 % \cs{addtocontents}. ASAJ.}
744 % \begin{macro}{\addtocontents}
746 % The |\addtocontents{|\meta{table}|}{|\meta{text}|}| command
747 % adds \meta{text} to the |.|\meta{table} file, with no
751 \long\def\addtocontents#1#2{%
752 \protected@write\@auxout
753 {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble}%
754 {\string\@writefile{#1}{#2}}}
758 % \begin{macro}{\contentsline}
759 % The |\contentsline{|\meta{type}|}{|\meta{entry}|}{|\meta{page}|}|
760 % macro produces a \meta{type} entry in a table of contents, etc.
761 % It will appear in the |.toc| or other file. For example,
762 % The entry for subsection 1.4.3 in the table of contents for
763 % example, might be produced by:
766 % \contentsline{subsection}
767 % {\makebox{30pt}[r]{1.4.3} Gnats and Gnus}{22}
770 % The |\protect| command causes command sequences to be written
771 % without expanding them.
774 \def\contentsline#1{\csname l@#1\endcsname}
778 % |\@dottedtocline{|\meta{level}|}{|\meta{indent}|}{|\meta{numwidth}%
779 % |}{|\meta{title}|}{|\meta{page}|}|:
780 % Macro to produce a table of contents line with the following
782 % \begin{description}
783 % \item[level] If \meta{level} $>$ |\c@tocdepth|, then no line
785 % \item[indent] Total indentation from the left margin.
786 % \item[numwidth] Width of box for number if the \meta{title} has a
787 % |\numberline| command.
788 % As of 25 Jan 1988, this is also the amount of extra
789 % indentation added to second and later lines of a
790 % multiple line entry.
791 % \item[title] Contents of entry.
792 % \item[page] Page number.
795 % Uses the following parameters, which must be set by the document
796 % style. They should be defined with |\def|'s.
797 % \begin{description}
798 % \item[|\@pnumwidth|] Width of box in which page number is set.
799 % \item[|\@tocrmarg|] Right margin indentation for all but last line
800 % of multiple-line entries.
801 % \item[|\@dotsep|] Separation between dots, in mu units.
802 % Should be |\def|'d to a number like 2 or 1.7
805 % \begin{macro}{\@dottedtocline}
806 % \changes{LaTeX2.09}{1991/09/29}
807 % {(RmS) added \cs{reset@font} for page number}
808 % \changes{v1.0e}{1994/05/25}{Put braces around argument 4
809 % (the actual toc entry) to avoid font (and possibly other)
810 % changes leaking out to the leaders.}
811 % \changes{v1.0g}{1994/10/18}{Added \cs{normalcolor} for page number}
812 % \changes{v1.0z}{1996/12/20}{Added \cs{nobreak} for latex/2343}
814 \def\@dottedtocline#1#2#3#4#5{%
815 \ifnum #1>\c@tocdepth \else
816 \vskip \z@ \@plus.2\p@
817 {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
818 \parindent #2\relax\@afterindenttrue
823 % \changes{v1.0z}{1996/12/20}{Added \cs{nobreak} for latex/2343}
825 \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
829 % If a document uses fonts other than computer modern, the use of a
830 % dot from math can be very disturbing despite the fact that this
831 % might be the only place in a document that then uses computer
833 % Therefore we surround the dot with an |\hbox| to escape to the
834 % surrounding text font.
835 % \changes{v1.0k}{1995/04/25}{Added \cs{hbox} around dots.}
836 % \changes{v1.0l}{1995/05/02}{Don't reset to \cs{rmfamily}}
838 \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
841 \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
847 % \textbf{Note:} |\nobreak|'s added 7 Jan 86 to prevent bad line break
848 % that left the page number dangling by itself at left edge of a new
851 % Changed 25 Jan 88 to use |\leftskip| instead of |\hangindent| so
852 % leaders of multiple-line contents entries would line up properly.
853 % \begin{macro}{\numberline}
854 % |\numberline{|\meta{number}|}|: For use in a |\contentsline| command.
855 % It puts \meta{number} flushleft in a box of width |\@tempdima|
857 % Jan 88 change, it also added |\@tempdima| to the hanging
861 \def\numberline#1{\hb@xt@\@tempdima{#1\hfil}}