In standard classes book.cls
and report.cls
we find
\newcommand\tableofcontents{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\contentsname
\@mkboth{%
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
\@starttoc{toc}%
\if@restonecol\twocolumn\fi
}
and
\newcommand\listoffigures{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\listfigurename}%
\@mkboth{\MakeUppercase\listfigurename}%
{\MakeUppercase\listfigurename}%
\@starttoc{lof}%
\if@restonecol\twocolumn\fi
}
In article.cls
\newcommand\tableofcontents{%
\section*{\contentsname
\@mkboth{%
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
\@starttoc{toc}%
}
and
\newcommand\listoffigures{%
\section*{\listfigurename}%
\@mkboth{\MakeUppercase\listfigurename}%
{\MakeUppercase\listfigurename}%
\@starttoc{lof}%
}
and in documentation we read
The code for
\@mkboth
is placed inside the heading to avoid any influence on vertical spacing after the heading (in some cases). For other commands, such as\listoffigures
below this has been changed from the LATEX2.09 version as it will produce a serious bug if used in two-column mode (see, pr/3285). However\tableofcontents
is always typeset in one-column mode in these classes, therefore the somewhat inconsistent setting has been retained for compatibility reasons.
Question Can any one please explain a bit this paragraph, in particular in some cases (so if there is an example)
and However \tableofcontents
is always typeset in one-column
Update - Main questions
- Why
\@mkboth
is placed inside the heading for\tableofcontents
? - Why the two codes
\tableofcontents
and\listoffigures
are differents?
Answers (what i understand)
\@mkboth
is placed inside the heading to avoid any influence on vertical spacing after the heading (in some cases)
OK I can see the point here, but then the 2nd question come: why we don't do same for \listoffigures
?
For other commands, such as
\listoffigures
below this has been changed from the LATEX2.09 version as it will produce a serious bug if used in two-column mode (see, pr/3285).
Here I can't see! and next lines confuse me more.
\@mkboth
is no fixed command actually. Depending on page style it is\markboth
or a\@gobbletwo
etc, via\let