| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 1993-2025 |
| 4 |
% The LaTeX Project and any individual authors listed elsewhere |
| 5 |
% in this file. |
| 6 |
% |
| 7 |
% This file is part of the LaTeX base system. |
| 8 |
% ------------------------------------------- |
| 9 |
% |
| 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 |
% https://www.latex-project.org/lppl.txt |
| 15 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 16 |
% version 2008 or later. |
| 17 |
% |
| 18 |
% This file has the LPPL maintenance status "maintained". |
| 19 |
% |
| 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 |
| 22 |
% information. |
| 23 |
% |
| 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. |
| 27 |
% |
| 28 |
% \fi |
| 29 |
% |
| 30 |
% \iffalse |
| 31 |
% \section{Identification} |
| 32 |
% |
| 33 |
% These document classes can only be used with \LaTeXe, so we make |
| 34 |
% sure that an appropriate message is displayed when another \TeX{} |
| 35 |
% format is used. |
| 36 |
% \changes{v1.3p}{1995/11/30}{Added date of \LaTeX\ format to argument |
| 37 |
% of \cs{NeedsTeXFormat}} |
| 38 |
% \begin{macrocode} |
| 39 |
%<article|report|book>\NeedsTeXFormat{LaTeX2e}[1995/12/01] |
| 40 |
% \end{macrocode} |
| 41 |
% |
| 42 |
% Announce the Class name and its version: |
| 43 |
% \begin{macrocode} |
| 44 |
%<article>\ProvidesClass{article} |
| 45 |
%<report>\ProvidesClass{report} |
| 46 |
%<book>\ProvidesClass{book} |
| 47 |
%<10pt&!bk>\ProvidesFile{size10.clo} |
| 48 |
%<11pt&!bk>\ProvidesFile{size11.clo} |
| 49 |
%<12pt&!bk>\ProvidesFile{size12.clo} |
| 50 |
%<10pt&bk>\ProvidesFile{bk10.clo} |
| 51 |
%<11pt&bk>\ProvidesFile{bk11.clo} |
| 52 |
%<12pt&bk>\ProvidesFile{bk12.clo} |
| 53 |
%<*driver> |
| 54 |
\ProvidesFile{classes.drv} |
| 55 |
%</driver> |
| 56 |
[2025/01/22 v1.4n |
| 57 |
%<article|report|book> Standard LaTeX document class] |
| 58 |
%<10pt|11pt|12pt> Standard LaTeX file (size option)] |
| 59 |
% \end{macrocode} |
| 60 |
% |
| 61 |
% \section{A driver for this document} |
| 62 |
% |
| 63 |
% The next bit of code contains the documentation driver file for |
| 64 |
% \TeX{}, i.e., the file that will produce the documentation you are |
| 65 |
% currently reading. It will be extracted from this file by the |
| 66 |
% {\sc docstrip} program. |
| 67 |
% |
| 68 |
% \changes{1.0f}{1993/12/07}{Use class ltxdoc document class} |
| 69 |
% \changes{1.0r}{1994/02/28}{Moved driver code in order not to need a |
| 70 |
% separate driver} |
| 71 |
% \begin{macrocode} |
| 72 |
%<*driver> |
| 73 |
] |
| 74 |
\documentclass{ltxdoc} |
| 75 |
% \end{macrocode} |
| 76 |
% |
| 77 |
% We don't want everything to appear in the index |
| 78 |
% \begin{macrocode} |
| 79 |
\DoNotIndex{\',\.,\@M,\@@input,\@Alph,\@alph,\@addtoreset,\@arabic} |
| 80 |
\DoNotIndex{\@badmath,\@centercr,\@cite} |
| 81 |
\DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue} |
| 82 |
\DoNotIndex{\@input,\@ixpt,\@m,\@minus,\@mkboth} |
| 83 |
\DoNotIndex{\@ne,\@nil,\@nomath,\@plus,\roman,\@set@topoint} |
| 84 |
\DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb} |
| 85 |
\DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt} |
| 86 |
\DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt} |
| 87 |
\DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace} |
| 88 |
\DoNotIndex{\advance,\ast,\begin,\begingroup,\bfseries,\bgroup,\box} |
| 89 |
\DoNotIndex{\bullet} |
| 90 |
\DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption} |
| 91 |
\DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass} |
| 92 |
\DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist} |
| 93 |
\DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup} |
| 94 |
\DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter} |
| 95 |
\DoNotIndex{\fbox} |
| 96 |
\DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef} |
| 97 |
\DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule} |
| 98 |
\DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi} |
| 99 |
\DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi} |
| 100 |
\DoNotIndex{\input} |
| 101 |
\DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark} |
| 102 |
\DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright} |
| 103 |
\DoNotIndex{\month,\newcommand,\newcounter,\newenvironment} |
| 104 |
\DoNotIndex{\NeedsTeXFormat,\newdimen} |
| 105 |
\DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number} |
| 106 |
\DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@} |
| 107 |
\DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip} |
| 108 |
\DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions} |
| 109 |
\DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright} |
| 110 |
\DoNotIndex{\refstepcounter,\relax,\renewcommand} |
| 111 |
\DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily} |
| 112 |
\DoNotIndex{\secdef,\selectfont,\setbox,\setcounter,\setlength} |
| 113 |
\DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space} |
| 114 |
\DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase} |
| 115 |
\DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt} |
| 116 |
\DoNotIndex{\viipt,\vipt,\vskip,\vspace} |
| 117 |
\DoNotIndex{\wd,\xiipt,\year,\z@} |
| 118 |
% \end{macrocode} |
| 119 |
% We do want an index, using line numbers |
| 120 |
% \begin{macrocode} |
| 121 |
\EnableCrossrefs |
| 122 |
\CodelineIndex |
| 123 |
% \end{macrocode} |
| 124 |
% We use so many \file{docstrip} modules that we set the |
| 125 |
% \texttt{StandardModuleDepth} counter to 1. |
| 126 |
% \begin{macrocode} |
| 127 |
\setcounter{StandardModuleDepth}{1} |
| 128 |
% \end{macrocode} |
| 129 |
% The following command retrieves the date and version information |
| 130 |
% from the file. |
| 131 |
% \begin{macrocode} |
| 132 |
\GetFileInfo{classes.drv} |
| 133 |
% \end{macrocode} |
| 134 |
% Some commonly used abbreviations |
| 135 |
% \changes{v1.2w}{1994/12/01}{Use \cs{newcommand*}} |
| 136 |
% \begin{macrocode} |
| 137 |
\newcommand*{\Lopt}[1]{\textsf {#1}} |
| 138 |
\newcommand*{\file}[1]{\texttt {#1}} |
| 139 |
\newcommand*{\Lcount}[1]{\textsl {\small#1}} |
| 140 |
\newcommand*{\pstyle}[1]{\textsl {#1}} |
| 141 |
% \end{macrocode} |
| 142 |
% We also want the full details. |
| 143 |
% \begin{macrocode} |
| 144 |
\begin{document} |
| 145 |
\DocInput{classes.dtx} |
| 146 |
\PrintIndex |
| 147 |
% ^^A\PrintChanges |
| 148 |
\end{document} |
| 149 |
%</driver> |
| 150 |
% \end{macrocode} |
| 151 |
% |
| 152 |
% \fi |
| 153 |
% |
| 154 |
% \changes{v1.0d}{1993/11/30}{remove \cs{@in}, made option makeindex |
| 155 |
% a synonym for option makeidx} |
| 156 |
% \changes{v1.0d}{1993/11/30}{removed \cs{@minus}, \cs{@plus}, |
| 157 |
% \cs{@settopoint}, \cs{@setfontsize}; they are now in the |
| 158 |
% kernel} |
| 159 |
% \changes{v1.0d}{1993/11/30}{Added use of \cs{NeedsTeXFormat}} |
| 160 |
% \changes{v1.0d}{1993/11/30}{Replaced \cs{bf} with \cs{bfseries}; |
| 161 |
% \cs{rm} with \cs{rmfamily}} |
| 162 |
% \changes{v1.0d}{1993/11/30}{Made equation and eqnarray environments |
| 163 |
% in the fleqn option up to date with latex.dtx} |
| 164 |
% \changes{v1.0f}{1993/12/08}{Made all lines shorter than 72 characters} |
| 165 |
% \changes{v1.0g}{1993/12/08}{Made change in eqnarray for the fleqn |
| 166 |
% option, as suggested by Rainer.} |
| 167 |
% \changes{v1.0h}{1993/12/18}{Made the definitions of the font- and |
| 168 |
% size-changing commands use \cs{renew} rather than \cs{new}. |
| 169 |
% Defined the float parameters with \cs{renewcommand} rather than |
| 170 |
% \cs{newcommand}. Corrected some typos in the fleqn option. |
| 171 |
% Replaced two occurrences of -\cs{@secpenalty} by |
| 172 |
% \cs{@secpenalty}. ASAJ.} |
| 173 |
% \changes{v1.0j}{1993/12/20}{Added \cs{ProvidesFile} to size files} |
| 174 |
% \changes{v1.0j}{1993/12/10}{Use \cs{cmd} in change entries} |
| 175 |
% \changes{v1.0k}{1994/01/09}{Removed some typos/bugs} |
| 176 |
% \changes{v1.0l}{1994/01/11}{add the extension to the names of the |
| 177 |
% files} |
| 178 |
% \changes{v1.0l}{1994/01/10}{Changed version numbering; moved leqno |
| 179 |
% and fleqn options to an external file.} |
| 180 |
% \changes{v1.0n}{1994/01/19}{Removed code for makeidx option and made |
| 181 |
% it a separate package; removed use of \cs{setlength} from list |
| 182 |
% parameters.} |
| 183 |
% \changes{v1.0o}{1994/01/31}{Small documentation changes} |
| 184 |
% \changes{v1.0q}{1994/02/16}{Small documentation changes} |
| 185 |
% \changes{v1.1a}{1994/03/12}{Removed \cs{typeout} messages} |
| 186 |
% \changes{v1.1f}{1994/04/15}{Inserted forgotten line break} |
| 187 |
% \changes{v1.2a}{1994/03/17}{Added openright option. (LL)} |
| 188 |
% \changes{v1.2b}{1994/03/17}{Added the \ldots{}matter commands. (LL)} |
| 189 |
% \changes{v1.2c}{1994/03/17}{Fixed page numbering in titlepage |
| 190 |
% env. (LL)} |
| 191 |
% \changes{v1.2d}{1994/04/11}{Checked the file for long lines and |
| 192 |
% wrapped them when necessary; made a slight implementation |
| 193 |
% modification to the openright and openany options.} |
| 194 |
% \changes{v1.2i}{1994/04/28}{Use LaTeX instead of LaTeX2e in messages} |
| 195 |
% \changes{v1.2j}{1994/05/01}{Removed the use of \cs{fileversion} |
| 196 |
% c.s.} |
| 197 |
% \changes{v1.2l}{1994/05/11}{changed some \cs{changes} entries} |
| 198 |
% \changes{v1.2m}{1994/05/12}{Forgot a few entries} |
| 199 |
% \changes{v1.2o}{1994/05/24}{Changed file information} |
| 200 |
% \changes{v1.2p}{1994/05/27}{Moved identification and driver to the |
| 201 |
% front of the file} |
| 202 |
% \changes{v1.2t}{1994/06/22}{Rephrased a few sentences to prevent |
| 203 |
% overfull hboxes} |
| 204 |
% \changes{v1.2v}{1994/12/01}{Made the oneside option work for the |
| 205 |
% book class} |
| 206 |
% \changes{v1.2w}{1994/12/01}{Use \cs{newcommand*} for commands with |
| 207 |
% arguments} |
| 208 |
% \changes{v1.2z}{1995/05/16}{Always use \cs{cs} in \cs{changes} |
| 209 |
% entries} |
| 210 |
% \changes{v1.3a}{1995/05/17}{Replaced all \cs{hbox to} by \cs{hb@xt@}} |
| 211 |
% \changes{v1.3d}{1995/06/05}{Replaced all \cs{uppercase} by |
| 212 |
% \cs{MakeUppercase}} |
| 213 |
% \changes{v1.3l}{1995/10/20}{Disabled in compatibility mode all |
| 214 |
% options that are new in \LaTeXe.} |
| 215 |
% \changes{v1.3v}{1997/06/16}{Documentation fixes.} |
| 216 |
% \changes{v1.4j}{2019/08/27}{Various commands made robust} |
| 217 |
% \changes{v1.4m}{2020/04/10}{(JLB) prettyprinting the code} |
| 218 |
% |
| 219 |
% |
| 220 |
% \title{Standard Document Classes for \LaTeX{} version 2e\thanks{This |
| 221 |
% file has version number \fileversion, last revised \filedate.}} |
| 222 |
% |
| 223 |
% \author{% |
| 224 |
% Copyright (C) 1992 by Leslie Lamport \and |
| 225 |
% Copyright (C) 1994-2021 by Frank Mittelbach, \and Johannes Braams and |
| 226 |
% the \LaTeX\ Project Team |
| 227 |
% } |
| 228 |
% \date{\filedate} |
| 229 |
% \MaintainedByLaTeXTeam{latex} |
| 230 |
% \maketitle |
| 231 |
% \tableofcontents |
| 232 |
% |
| 233 |
% \MaybeStop{} ^^A |
| 234 |
% |
| 235 |
% \section{The {\sc docstrip} modules} |
| 236 |
% |
| 237 |
% The following modules are used in the implementation to direct |
| 238 |
% {\sc docstrip} in generating the external files: |
| 239 |
% \begin{center} |
| 240 |
% \begin{tabular}{ll} |
| 241 |
% article & produce the documentclass article\\ |
| 242 |
% report & produce the documentclass report\\ |
| 243 |
% size10 & produce the class option for 10pt\\ |
| 244 |
% size11 & produce the class option for 11pt\\ |
| 245 |
% size12 & produce the class option for 12pt\\ |
| 246 |
% book & produce the documentclass book\\ |
| 247 |
% bk10 & produce the book class option for 10pt\\ |
| 248 |
% bk11 & produce the book class option for 11pt\\ |
| 249 |
% bk12 & produce the book class option for 12pt\\ |
| 250 |
% driver & produce a documentation driver file \\ |
| 251 |
% \end{tabular} |
| 252 |
% \end{center} |
| 253 |
% |
| 254 |
% \section{Initial Code} |
| 255 |
% |
| 256 |
% In this part we define a few commands that are used later on. |
| 257 |
% |
| 258 |
% \begin{macro}{\@ptsize} |
| 259 |
% This control sequence is used to store the second digit of the |
| 260 |
% pointsize we are typesetting in. So, normally, its value is one |
| 261 |
% of 0, 1 or 2. |
| 262 |
% \begin{macrocode} |
| 263 |
%<*article|report|book> |
| 264 |
\newcommand\@ptsize{} |
| 265 |
% \end{macrocode} |
| 266 |
% \end{macro} |
| 267 |
% |
| 268 |
% \begin{macro}{\if@restonecol} |
| 269 |
% When the document has to be printed in two columns, we sometimes |
| 270 |
% have to temporarily switch to one column. This switch is used to |
| 271 |
% remember to switch back. |
| 272 |
% \begin{macrocode} |
| 273 |
\newif\if@restonecol |
| 274 |
% \end{macrocode} |
| 275 |
% \end{macro} |
| 276 |
% |
| 277 |
% \begin{macro}{\if@titlepage} |
| 278 |
% A switch to indicate if a titlepage has to be produced. For the |
| 279 |
% article document class the default is not to make a separate |
| 280 |
% titlepage. |
| 281 |
% \begin{macrocode} |
| 282 |
\newif\if@titlepage |
| 283 |
%<article>\@titlepagefalse |
| 284 |
%<!article>\@titlepagetrue |
| 285 |
% \end{macrocode} |
| 286 |
% \end{macro} |
| 287 |
% |
| 288 |
% \begin{macro}{\if@openright} |
| 289 |
% A switch to indicate if chapters must start on a right-hand page. |
| 290 |
% The default for the report class is no; for the book class it's |
| 291 |
% yes. |
| 292 |
% \begin{macrocode} |
| 293 |
%<!article>\newif\if@openright |
| 294 |
% \end{macrocode} |
| 295 |
% \end{macro} |
| 296 |
% |
| 297 |
% \changes{v1.3k}{1995/08/27}{Macro \cs{if@openbib} removed} |
| 298 |
% |
| 299 |
% \begin{macro}{\if@mainmatter} |
| 300 |
% \changes{v1.2v}{1994/12/01}{Moved the allocation of |
| 301 |
% \cs{if@mainmatter} here} |
| 302 |
% |
| 303 |
% The switch |\if@mainmatter|, only available in the document class |
| 304 |
% book, indicates whether we are processing the main material in |
| 305 |
% the book. |
| 306 |
% \begin{macrocode} |
| 307 |
%<book>\newif\if@mainmatter \@mainmattertrue |
| 308 |
% \end{macrocode} |
| 309 |
% \end{macro} |
| 310 |
% |
| 311 |
% \section{Declaration of Options} |
| 312 |
% |
| 313 |
% |
| 314 |
% \subsection{Setting Paper Sizes} |
| 315 |
% |
| 316 |
% The variables |\paperwidth| and |\paperheight| should reflect the |
| 317 |
% physical paper size after trimming. For desk printer output this |
| 318 |
% is usually the real paper size since there is no post-processing. |
| 319 |
% Classes for real book production will probably add other paper |
| 320 |
% sizes and additionally the production of crop marks for trimming. |
| 321 |
% In compatibility mode, these (and some of the subsequent) options |
| 322 |
% are disabled, as they were not present in \LaTeX 2.09. |
| 323 |
% \changes{v1.0g}{1993/12/09}{Removed typo, A4 is not 279 mm high} |
| 324 |
% \begin{macrocode} |
| 325 |
\if@compatibility\else |
| 326 |
\DeclareOption{a4paper} |
| 327 |
{\setlength\paperheight {297mm}% |
| 328 |
\setlength\paperwidth {210mm}} |
| 329 |
\DeclareOption{a5paper} |
| 330 |
{\setlength\paperheight {210mm}% |
| 331 |
\setlength\paperwidth {148mm}} |
| 332 |
\DeclareOption{b5paper} |
| 333 |
{\setlength\paperheight {250mm}% |
| 334 |
\setlength\paperwidth {176mm}} |
| 335 |
\DeclareOption{letterpaper} |
| 336 |
{\setlength\paperheight {11in}% |
| 337 |
\setlength\paperwidth {8.5in}} |
| 338 |
\DeclareOption{legalpaper} |
| 339 |
{\setlength\paperheight {14in}% |
| 340 |
\setlength\paperwidth {8.5in}} |
| 341 |
\DeclareOption{executivepaper} |
| 342 |
{\setlength\paperheight {10.5in}% |
| 343 |
\setlength\paperwidth {7.25in}} |
| 344 |
% \end{macrocode} |
| 345 |
% |
| 346 |
% The option \Lopt{landscape} switches the values of |\paperheight| |
| 347 |
% and |\paperwidth|, assuming the dimensions were given for portrait |
| 348 |
% paper. |
| 349 |
% \begin{macrocode} |
| 350 |
\DeclareOption{landscape} |
| 351 |
{\setlength\@tempdima {\paperheight}% |
| 352 |
\setlength\paperheight {\paperwidth}% |
| 353 |
\setlength\paperwidth {\@tempdima}} |
| 354 |
\fi |
| 355 |
% \end{macrocode} |
| 356 |
% |
| 357 |
% \subsection{Choosing the type size} |
| 358 |
% |
| 359 |
% The type size options are handled by defining |\@ptsize| to contain |
| 360 |
% the last digit of the size in question and branching on |\ifcase| |
| 361 |
% statements. This is done for historical reasons to stay compatible |
| 362 |
% with other packages that use the |\@ptsize| variable to select |
| 363 |
% special actions. It makes the declarations of size options less |
| 364 |
% than 10pt difficult, although one can probably use \texttt{9} |
| 365 |
% and \texttt{8} assuming that a class won't define both |
| 366 |
% \Lopt{8pt} and \Lopt{18pt} options. |
| 367 |
% |
| 368 |
% \begin{macrocode} |
| 369 |
\if@compatibility |
| 370 |
\renewcommand\@ptsize{0} |
| 371 |
\else |
| 372 |
\DeclareOption{10pt}{\renewcommand\@ptsize{0}} |
| 373 |
\fi |
| 374 |
\DeclareOption{11pt}{\renewcommand\@ptsize{1}} |
| 375 |
\DeclareOption{12pt}{\renewcommand\@ptsize{2}} |
| 376 |
% \end{macrocode} |
| 377 |
% |
| 378 |
% |
| 379 |
% \subsection{Two-side or one-side printing} |
| 380 |
% |
| 381 |
% For two-sided printing we use the switch |\if@twoside|. In |
| 382 |
% addition we have to set the |\if@mparswitch| to get any margin |
| 383 |
% paragraphs into the outside margin. |
| 384 |
% \begin{macrocode} |
| 385 |
\if@compatibility\else |
| 386 |
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} |
| 387 |
\fi |
| 388 |
\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} |
| 389 |
% \end{macrocode} |
| 390 |
% |
| 391 |
% |
| 392 |
% \subsection{Draft option} |
| 393 |
% |
| 394 |
% If the user requests \Lopt{draft} we show any overfull boxes. |
| 395 |
% We could probably add some more interesting stuff to this option. |
| 396 |
% \begin{macrocode} |
| 397 |
\DeclareOption{draft}{\setlength\overfullrule{5pt}} |
| 398 |
\if@compatibility\else |
| 399 |
\DeclareOption{final}{\setlength\overfullrule{0pt}} |
| 400 |
\fi |
| 401 |
% \end{macrocode} |
| 402 |
% |
| 403 |
% \subsection{Titlepage option} |
| 404 |
% An article usually has no separate titlepage, but the user can |
| 405 |
% request one. |
| 406 |
% \begin{macrocode} |
| 407 |
\DeclareOption{titlepage}{\@titlepagetrue} |
| 408 |
\if@compatibility\else |
| 409 |
\DeclareOption{notitlepage}{\@titlepagefalse} |
| 410 |
\fi |
| 411 |
% \end{macrocode} |
| 412 |
% |
| 413 |
% \subsection{openright option} |
| 414 |
% This option determines whether or not a chapter must start on |
| 415 |
% a right-hand page |
| 416 |
% request one. |
| 417 |
% \begin{macrocode} |
| 418 |
%<!article>\if@compatibility |
| 419 |
%<book>\@openrighttrue |
| 420 |
%<!article>\else |
| 421 |
%<!article>\DeclareOption{openright}{\@openrighttrue} |
| 422 |
%<!article>\DeclareOption{openany}{\@openrightfalse} |
| 423 |
%<!article>\fi |
| 424 |
% \end{macrocode} |
| 425 |
% |
| 426 |
% \subsection{Two-column printing} |
| 427 |
% |
| 428 |
% Two-column and one-column printing is again realized via a switch. |
| 429 |
% \begin{macrocode} |
| 430 |
\if@compatibility\else |
| 431 |
\DeclareOption{onecolumn}{\@twocolumnfalse} |
| 432 |
\fi |
| 433 |
\DeclareOption{twocolumn}{\@twocolumntrue} |
| 434 |
% \end{macrocode} |
| 435 |
% |
| 436 |
% \subsection{Equation numbering on the left} |
| 437 |
% |
| 438 |
% The option \Lopt{leqno} can be used to get the equation numbers |
| 439 |
% on the left side of the equation. It loads code which is generated |
| 440 |
% automatically from the kernel files when the format is built. |
| 441 |
% If the equation number does get a special formatting then instead |
| 442 |
% of using the kernel file the class would need to provide the code |
| 443 |
% explicitly. |
| 444 |
% \begin{macrocode} |
| 445 |
\DeclareOption{leqno}{\input{leqno.clo}} |
| 446 |
% \end{macrocode} |
| 447 |
% |
| 448 |
% \subsection{Flush left displays} |
| 449 |
% |
| 450 |
% The option \Lopt{fleqn} redefines the displayed math environments |
| 451 |
% in such a way that they come out flush left, with an indentation |
| 452 |
% of |\mathindent| from the prevailing left margin. It loads |
| 453 |
% code which is generated |
| 454 |
% automatically from the kernel files when the format is built. |
| 455 |
% \changes{v1.0h}{1993/12/18}{Corrected some typos. ASAJ.} |
| 456 |
% \begin{macrocode} |
| 457 |
\DeclareOption{fleqn}{\input{fleqn.clo}} |
| 458 |
% \end{macrocode} |
| 459 |
% |
| 460 |
% \subsection{Open bibliography} |
| 461 |
% |
| 462 |
% The option \Lopt{openbib} produces the ``open'' bibliography |
| 463 |
% style, in which each block starts on a new line, and succeeding |
| 464 |
% lines in a block are indented by |\bibindent|. |
| 465 |
% \changes{v1.3k}{1995/08/27}{openbib option reimplemented} |
| 466 |
% \begin{macrocode} |
| 467 |
\DeclareOption{openbib}{% |
| 468 |
% \end{macrocode} |
| 469 |
% First some hook into the bibliography environment is filled. |
| 470 |
% \begin{macrocode} |
| 471 |
\AtEndOfPackage{% |
| 472 |
\renewcommand\@openbib@code{% |
| 473 |
\advance\leftmargin\bibindent |
| 474 |
\itemindent -\bibindent |
| 475 |
\listparindent \itemindent |
| 476 |
\parsep \z@ |
| 477 |
}% |
| 478 |
% \end{macrocode} |
| 479 |
% In addition the definition of |\newblock| is overwritten. |
| 480 |
% \begin{macrocode} |
| 481 |
\renewcommand\newblock{\par}}% |
| 482 |
} |
| 483 |
% \end{macrocode} |
| 484 |
% |
| 485 |
% |
| 486 |
% \section{Executing Options} |
| 487 |
% |
| 488 |
% Here we execute the default options to initialize certain |
| 489 |
% variables. Note that the document class `book' always uses two |
| 490 |
% sided printing. |
| 491 |
% \begin{macrocode} |
| 492 |
%<*article> |
| 493 |
\ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final} |
| 494 |
%</article> |
| 495 |
%<*report> |
| 496 |
\ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final,openany} |
| 497 |
%</report> |
| 498 |
%<*book> |
| 499 |
\ExecuteOptions{letterpaper,10pt,twoside,onecolumn,final,openright} |
| 500 |
%</book> |
| 501 |
% \end{macrocode} |
| 502 |
% |
| 503 |
% The |\ProcessOptions| command causes the execution of the code |
| 504 |
% for every option \Lopt{FOO} |
| 505 |
% which is declared and for which the user typed |
| 506 |
% the \Lopt{FOO} option in his |
| 507 |
% |\documentclass| command. For every option \Lopt{BAR} he typed, |
| 508 |
% which is not declared, the option is assumed to be a global option. |
| 509 |
% All options will be passed as document options to any |
| 510 |
% |\usepackage| command in the document preamble. |
| 511 |
% \begin{macrocode} |
| 512 |
\ProcessOptions |
| 513 |
% \end{macrocode} |
| 514 |
% Now that all the options have been executed we can load the |
| 515 |
% chosen class option file that contains all size dependent code. |
| 516 |
% \begin{macrocode} |
| 517 |
%<!book>\input{size1\@ptsize.clo} |
| 518 |
%<book>\input{bk1\@ptsize.clo} |
| 519 |
%</article|report|book> |
| 520 |
% \end{macrocode} |
| 521 |
% |
| 522 |
% \section{Loading Packages} |
| 523 |
% |
| 524 |
% The standard class files do not load additional packages. |
| 525 |
% |
| 526 |
% |
| 527 |
% \section{Document Layout} |
| 528 |
% \label{sec:classes:maincode} |
| 529 |
% |
| 530 |
% In this section we are finally dealing with the nasty typographical |
| 531 |
% details. |
| 532 |
% |
| 533 |
% \subsection{Fonts} |
| 534 |
% |
| 535 |
% \LaTeX\ offers the user commands to change the size of the font, |
| 536 |
% relative to the `main' size. Each relative size changing command |
| 537 |
% |\size| executes the command |
| 538 |
% |\@setfontsize||\size|\meta{font-size}\meta{baselineskip} where: |
| 539 |
% |
| 540 |
% \begin{description} |
| 541 |
% \item[\meta{font-size}] The absolute size of the font to use from |
| 542 |
% now on. |
| 543 |
% |
| 544 |
% \item[\meta{baselineskip}] The normal value of |\baselineskip| |
| 545 |
% for the size of the font selected. (The actual value will be |
| 546 |
% |\baselinestretch| * \meta{baselineskip}.) |
| 547 |
% \end{description} |
| 548 |
% |
| 549 |
% A number of commands, defined in the \LaTeX{} kernel, shorten the |
| 550 |
% following definitions and are used throughout. They are: |
| 551 |
% \begin{center} |
| 552 |
% \begin{tabular}{ll@{\qquad}ll@{\qquad}ll} |
| 553 |
% \verb=\@vpt= & 5 & \verb=\@vipt= & 6 & \verb=\@viipt= & 7 \\ |
| 554 |
% \verb=\@viiipt= & 8 & \verb=\@ixpt= & 9 & \verb=\@xpt= & 10 \\ |
| 555 |
% \verb=\@xipt= & 10.95 & \verb=\@xiipt= & 12 & \verb=\@xivpt= & 14.4\\ |
| 556 |
% ... |
| 557 |
% \end{tabular} |
| 558 |
% \end{center} |
| 559 |
% |
| 560 |
% \begin{macro}{\normalsize} |
| 561 |
% \begin{macro}{\@normalsize} |
| 562 |
% \changes{v1.0o}{1994/01/31}{\cs{@normalsize} now defined in the |
| 563 |
% kernel} |
| 564 |
% |
| 565 |
% The user level command for the main size is |\normalsize|. |
| 566 |
% Internally \LaTeX{} uses |\@normalsize| when it refers to the |
| 567 |
% main size. |\@normalsize| will be defined to work like |
| 568 |
% |\normalsize| if the latter is redefined from its default |
| 569 |
% definition (that just issues an error message). Otherwise |
| 570 |
% |\@normalsize| simply selects a 10pt/12pt size. |
| 571 |
% |
| 572 |
% The |\normalsize| macro also sets new values for\\ |
| 573 |
% |\abovedisplayskip|, |\abovedisplayshortskip| and |
| 574 |
% |\belowdisplayshortskip|. |
| 575 |
% |
| 576 |
% \changes{v1.0e}{1993/12/07}{\cs{normalsize} doesn't exist, so use |
| 577 |
% \cs{newcommand}} |
| 578 |
% \changes{v1.0h}{1993/12/18}{\cs{normalsize} is now defined in the |
| 579 |
% kernel, so use \cs{renewcommand}. ASAJ.} |
| 580 |
% \begin{macrocode} |
| 581 |
%<*10pt|11pt|12pt> |
| 582 |
\renewcommand\normalsize{% |
| 583 |
%<*10pt> |
| 584 |
\@setfontsize\normalsize\@xpt\@xiipt |
| 585 |
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ |
| 586 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 587 |
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ |
| 588 |
%</10pt> |
| 589 |
%<*11pt> |
| 590 |
\@setfontsize\normalsize\@xipt{13.6}% |
| 591 |
\abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@ |
| 592 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 593 |
\belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ |
| 594 |
%</11pt> |
| 595 |
%<*12pt> |
| 596 |
\@setfontsize\normalsize\@xiipt{14.5}% |
| 597 |
\abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@ |
| 598 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 599 |
\belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ |
| 600 |
%</12pt> |
| 601 |
% \end{macrocode} |
| 602 |
% The |\belowdisplayskip| is always equal to the |
| 603 |
% |\abovedisplayskip|. The parameters of the first level list are |
| 604 |
% always given by |\@listI|. |
| 605 |
% \begin{macrocode} |
| 606 |
\belowdisplayskip \abovedisplayskip |
| 607 |
\let\@listi\@listI} |
| 608 |
% \end{macrocode} |
| 609 |
% |
| 610 |
% We initially choose the normalsize font. |
| 611 |
% \begin{macrocode} |
| 612 |
\normalsize |
| 613 |
% \end{macrocode} |
| 614 |
% We use |\MakeRobust| instead of |\DeclareRobustCommand| above to avoid a log |
| 615 |
% entry for the redefinition. But if we are running in a rollback situation |
| 616 |
% (prior to 2015) we don't touch it. |
| 617 |
% \changes{v1.4k}{2019/10/25}{Roll back handling (gh/201)} |
| 618 |
% \begin{macrocode} |
| 619 |
\ifx\MakeRobust\@undefined \else |
| 620 |
\MakeRobust\normalsize |
| 621 |
\fi |
| 622 |
% \end{macrocode} |
| 623 |
% \end{macro} |
| 624 |
% \end{macro} |
| 625 |
% |
| 626 |
% \begin{macro}{\small} |
| 627 |
% This is similar to |\normalsize|. |
| 628 |
% \changes{v1.0h}{1993/12/18}{\cs{small} is now defined in the kernel, |
| 629 |
% so use \cs{renewcommand}. ASAJ.} |
| 630 |
% \changes{v1.2e}{1994/04/14}{\cs{small} is no longer defined in the |
| 631 |
% kernel; use \cs{newcommand}} |
| 632 |
% \begin{macrocode} |
| 633 |
\DeclareRobustCommand\small{% |
| 634 |
%<*10pt> |
| 635 |
\@setfontsize\small\@ixpt{11}% |
| 636 |
\abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ |
| 637 |
\abovedisplayshortskip \z@ \@plus2\p@ |
| 638 |
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ |
| 639 |
\def\@listi{\leftmargin\leftmargini |
| 640 |
\topsep 4\p@ \@plus2\p@ \@minus2\p@ |
| 641 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 642 |
\itemsep \parsep}% |
| 643 |
%</10pt> |
| 644 |
%<*11pt> |
| 645 |
\@setfontsize\small\@xpt\@xiipt |
| 646 |
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ |
| 647 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 648 |
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ |
| 649 |
\def\@listi{\leftmargin\leftmargini |
| 650 |
\topsep 6\p@ \@plus2\p@ \@minus2\p@ |
| 651 |
\parsep 3\p@ \@plus2\p@ \@minus\p@ |
| 652 |
\itemsep \parsep}% |
| 653 |
%</11pt> |
| 654 |
%<*12pt> |
| 655 |
\@setfontsize\small\@xipt{13.6}% |
| 656 |
\abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@ |
| 657 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 658 |
\belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ |
| 659 |
\def\@listi{\leftmargin\leftmargini |
| 660 |
\topsep 9\p@ \@plus3\p@ \@minus5\p@ |
| 661 |
\parsep 4.5\p@ \@plus2\p@ \@minus\p@ |
| 662 |
\itemsep \parsep}% |
| 663 |
%</12pt> |
| 664 |
\belowdisplayskip \abovedisplayskip |
| 665 |
} |
| 666 |
% \end{macrocode} |
| 667 |
% \end{macro} |
| 668 |
% |
| 669 |
% \begin{macro}{\footnotesize} |
| 670 |
% This is similar to |\normalsize|. |
| 671 |
% \changes{v1.0h}{1993/12/18}{\cs{footnotesize} is now defined in the |
| 672 |
% kernel, so use \cs{renewcommand}. ASAJ.} |
| 673 |
% \changes{v1.2e}{1994/04/14}{use \cs{newcommand} again} |
| 674 |
% \begin{macrocode} |
| 675 |
\DeclareRobustCommand\footnotesize{% |
| 676 |
%<*10pt> |
| 677 |
\@setfontsize\footnotesize\@viiipt{9.5}% |
| 678 |
\abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@ |
| 679 |
\abovedisplayshortskip \z@ \@plus\p@ |
| 680 |
\belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@ |
| 681 |
\def\@listi{\leftmargin\leftmargini |
| 682 |
\topsep 3\p@ \@plus\p@ \@minus\p@ |
| 683 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 684 |
\itemsep \parsep}% |
| 685 |
%</10pt> |
| 686 |
%<*11pt> |
| 687 |
\@setfontsize\footnotesize\@ixpt{11}% |
| 688 |
\abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@ |
| 689 |
\abovedisplayshortskip \z@ \@plus\p@ |
| 690 |
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ |
| 691 |
\def\@listi{\leftmargin\leftmargini |
| 692 |
\topsep 4\p@ \@plus2\p@ \@minus2\p@ |
| 693 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 694 |
\itemsep \parsep}% |
| 695 |
%</11pt> |
| 696 |
%<*12pt> |
| 697 |
\@setfontsize\footnotesize\@xpt\@xiipt |
| 698 |
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ |
| 699 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 700 |
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ |
| 701 |
\def\@listi{\leftmargin\leftmargini |
| 702 |
\topsep 6\p@ \@plus2\p@ \@minus2\p@ |
| 703 |
\parsep 3\p@ \@plus2\p@ \@minus\p@ |
| 704 |
\itemsep \parsep}% |
| 705 |
%</12pt> |
| 706 |
\belowdisplayskip \abovedisplayskip |
| 707 |
} |
| 708 |
%</10pt|11pt|12pt> |
| 709 |
% \end{macrocode} |
| 710 |
% \end{macro} |
| 711 |
% |
| 712 |
% \begin{macro}{\scriptsize} |
| 713 |
% \begin{macro}{\tiny} |
| 714 |
% \begin{macro}{\large} |
| 715 |
% \begin{macro}{\Large} |
| 716 |
% \begin{macro}{\LARGE} |
| 717 |
% \begin{macro}{\huge} |
| 718 |
% \begin{macro}{\Huge} |
| 719 |
% These are all much simpler than the previous macros, they just |
| 720 |
% select a new fontsize, but leave the parameters for displays and |
| 721 |
% lists alone. |
| 722 |
% \changes{v1.0h}{1993/12/18}{These are now defined in the kernel, |
| 723 |
% so use \cs{renewcommand}. ASAJ.} |
| 724 |
% \changes{v1.2e}{1994/04/14}{use \cs{newcommand} again} |
| 725 |
% \begin{macrocode} |
| 726 |
%<*10pt> |
| 727 |
\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt} |
| 728 |
\DeclareRobustCommand\tiny{\@setfontsize\tiny\@vpt\@vipt} |
| 729 |
\DeclareRobustCommand\large{\@setfontsize\large\@xiipt{14}} |
| 730 |
\DeclareRobustCommand\Large{\@setfontsize\Large\@xivpt{18}} |
| 731 |
\DeclareRobustCommand\LARGE{\@setfontsize\LARGE\@xviipt{22}} |
| 732 |
\DeclareRobustCommand\huge{\@setfontsize\huge\@xxpt{25}} |
| 733 |
\DeclareRobustCommand\Huge{\@setfontsize\Huge\@xxvpt{30}} |
| 734 |
%</10pt> |
| 735 |
%<*11pt> |
| 736 |
\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}} |
| 737 |
\DeclareRobustCommand\tiny{\@setfontsize\tiny\@vipt\@viipt} |
| 738 |
\DeclareRobustCommand\large{\@setfontsize\large\@xiipt{14}} |
| 739 |
\DeclareRobustCommand\Large{\@setfontsize\Large\@xivpt{18}} |
| 740 |
\DeclareRobustCommand\LARGE{\@setfontsize\LARGE\@xviipt{22}} |
| 741 |
\DeclareRobustCommand\huge{\@setfontsize\huge\@xxpt{25}} |
| 742 |
\DeclareRobustCommand\Huge{\@setfontsize\Huge\@xxvpt{30}} |
| 743 |
%</11pt> |
| 744 |
%<*12pt> |
| 745 |
\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}} |
| 746 |
\DeclareRobustCommand\tiny{\@setfontsize\tiny\@vipt\@viipt} |
| 747 |
\DeclareRobustCommand\large{\@setfontsize\large\@xivpt{18}} |
| 748 |
\DeclareRobustCommand\Large{\@setfontsize\Large\@xviipt{22}} |
| 749 |
\DeclareRobustCommand\LARGE{\@setfontsize\LARGE\@xxpt{25}} |
| 750 |
\DeclareRobustCommand\huge{\@setfontsize\huge\@xxvpt{30}} |
| 751 |
\let\Huge=\huge |
| 752 |
%</12pt> |
| 753 |
% \end{macrocode} |
| 754 |
% \end{macro} |
| 755 |
% \end{macro} |
| 756 |
% \end{macro} |
| 757 |
% \end{macro} |
| 758 |
% \end{macro} |
| 759 |
% \end{macro} |
| 760 |
% \end{macro} |
| 761 |
% |
| 762 |
% |
| 763 |
% \subsection{Paragraphing} |
| 764 |
% |
| 765 |
% \begin{macro}{\lineskip} |
| 766 |
% \begin{macro}{\normallineskip} |
| 767 |
% These parameters control \TeX's behaviour when two lines tend to |
| 768 |
% come too close together. |
| 769 |
% \begin{macrocode} |
| 770 |
%<*article|report|book> |
| 771 |
\setlength\lineskip{1\p@} |
| 772 |
\setlength\normallineskip{1\p@} |
| 773 |
% \end{macrocode} |
| 774 |
% \end{macro} |
| 775 |
% \end{macro} |
| 776 |
% |
| 777 |
% \begin{macro}{\baselinestretch} |
| 778 |
% This is used as a multiplier for |\baselineskip|. The default is |
| 779 |
% to \emph{not} stretch the baselines. Note that if this command |
| 780 |
% doesn't resolve to ``empty'' any \texttt{plus} or \texttt{minus} |
| 781 |
% part in the specification of |\baselineskip| is ignored. |
| 782 |
% \begin{macrocode} |
| 783 |
\renewcommand\baselinestretch{} |
| 784 |
% \end{macrocode} |
| 785 |
% \end{macro} |
| 786 |
% |
| 787 |
% \begin{macro}{\parskip} |
| 788 |
% \begin{macro}{\parindent} |
| 789 |
% |\parskip| gives extra vertical space between paragraphs and |
| 790 |
% |\parindent| is the width of the paragraph indentation. The value |
| 791 |
% of |\parindent| depends on whether we are in two-column mode. |
| 792 |
% \changes{v1.0m}{1994/01/12}{\cs{parindent} should be different, |
| 793 |
% depending on the pointsize} |
| 794 |
% \begin{macrocode} |
| 795 |
\setlength\parskip{0\p@ \@plus \p@} |
| 796 |
%</article|report|book> |
| 797 |
%<*10pt|11pt|12pt> |
| 798 |
\if@twocolumn |
| 799 |
\setlength\parindent{1em} |
| 800 |
\else |
| 801 |
%<10pt> \setlength\parindent{15\p@} |
| 802 |
%<11pt> \setlength\parindent{17\p@} |
| 803 |
%<12pt> \setlength\parindent{1.5em} |
| 804 |
\fi |
| 805 |
%</10pt|11pt|12pt> |
| 806 |
% \end{macrocode} |
| 807 |
% \end{macro} |
| 808 |
% \end{macro} |
| 809 |
% |
| 810 |
% \begin{macro}{\smallskipamount} |
| 811 |
% \begin{macro}{\medskipamount} |
| 812 |
% \begin{macro}{\bigskipamount} |
| 813 |
% The values for these three parameters are set in the \LaTeX\ |
| 814 |
% kernel. They should perhaps vary, according to the size option |
| 815 |
% specified. But as they have always had the same value regardless |
| 816 |
% of the size option we do not change them to stay compatible with |
| 817 |
% both \LaTeX~2.09 and older releases of \LaTeXe. |
| 818 |
% \changes{v1.3n}{1995/10/29}{Added setting the values of |
| 819 |
% \cs{...skipamount}} |
| 820 |
% \begin{macrocode} |
| 821 |
%<*10pt|11pt|12pt> |
| 822 |
\setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@} |
| 823 |
\setlength\medskipamount{6\p@ \@plus 2\p@ \@minus 2\p@} |
| 824 |
\setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@} |
| 825 |
%</10pt|11pt|12pt> |
| 826 |
% \end{macrocode} |
| 827 |
% \end{macro} |
| 828 |
% \end{macro} |
| 829 |
% \end{macro} |
| 830 |
% |
| 831 |
% \begin{macro}{\@lowpenalty} |
| 832 |
% \begin{macro}{\@medpenalty} |
| 833 |
% \begin{macro}{\@highpenalty}% |
| 834 |
% The commands |\nopagebreak| and |\nolinebreak| put in penalties |
| 835 |
% to discourage these breaks at the point they are put in. |
| 836 |
% They use |\@lowpenalty|, |\@medpenalty| or |\@highpenalty|, |
| 837 |
% dependent on their argument. |
| 838 |
% \begin{macrocode} |
| 839 |
%<*article|report|book> |
| 840 |
\@lowpenalty 51 |
| 841 |
\@medpenalty 151 |
| 842 |
\@highpenalty 301 |
| 843 |
% \end{macrocode} |
| 844 |
% \end{macro} |
| 845 |
% \end{macro} |
| 846 |
% \end{macro} |
| 847 |
% |
| 848 |
% \begin{macro}{\clubpenalty} |
| 849 |
% \begin{macro}{\widowpenalty} |
| 850 |
% These penalties are use to discourage club and widow lines. |
| 851 |
% Because we use their default values we only show them here, |
| 852 |
% commented out. |
| 853 |
% \begin{macrocode} |
| 854 |
% \clubpenalty 150 |
| 855 |
% \widowpenalty 150 |
| 856 |
% \end{macrocode} |
| 857 |
% \end{macro} |
| 858 |
% \end{macro} |
| 859 |
% |
| 860 |
% \begin{macro}{\displaywidowpenalty} |
| 861 |
% \begin{macro}{\predisplaypenalty} |
| 862 |
% \begin{macro}{\postdisplaypenalty} |
| 863 |
% Discourage (but not so much) widows in front of a math display |
| 864 |
% and forbid breaking directly in front of a display. Allow break |
| 865 |
% after a display without a penalty. Again the default values are |
| 866 |
% used, therefore we only show them here. |
| 867 |
% \begin{macrocode} |
| 868 |
% \displaywidowpenalty 50 |
| 869 |
% \predisplaypenalty 10000 |
| 870 |
% \postdisplaypenalty 0 |
| 871 |
% \end{macrocode} |
| 872 |
% \end{macro} |
| 873 |
% \end{macro} |
| 874 |
% \end{macro} |
| 875 |
% |
| 876 |
% \begin{macro}{\interlinepenalty} |
| 877 |
% Allow the breaking of a page in the middle of a paragraph. |
| 878 |
% \begin{macrocode} |
| 879 |
% \interlinepenalty 0 |
| 880 |
% \end{macrocode} |
| 881 |
% \end{macro} |
| 882 |
% |
| 883 |
% |
| 884 |
% \begin{macro}{\brokenpenalty} |
| 885 |
% We allow the breaking of a page after a hyphenated line. |
| 886 |
% \changes{v1.1a}{1994/03/12}{Show correct default which is 100} |
| 887 |
% \begin{macrocode} |
| 888 |
% \brokenpenalty 100 |
| 889 |
%</article|report|book> |
| 890 |
% \end{macrocode} |
| 891 |
% \end{macro} |
| 892 |
% |
| 893 |
% |
| 894 |
% \subsection{Page Layout} |
| 895 |
% |
| 896 |
% All margin dimensions are measured from a point one inch from the |
| 897 |
% top and lefthand side of the page. |
| 898 |
% |
| 899 |
% \subsubsection{Vertical spacing} |
| 900 |
% |
| 901 |
% \begin{macro}{\headheight} |
| 902 |
% \begin{macro}{\headsep} |
| 903 |
% \begin{macro}{\topskip} |
| 904 |
% The |\headheight| is the height of the box that will contain the |
| 905 |
% running head. The |\headsep| is the distance between the bottom |
| 906 |
% of the running head and the top of the text. The |\topskip| is |
| 907 |
% the |\baselineskip| for the first line on a page; \LaTeX's output |
| 908 |
% routine will not work properly if it has the value 0pt, so do not |
| 909 |
% do that! |
| 910 |
% \begin{macrocode} |
| 911 |
%<*10pt|11pt|12pt> |
| 912 |
\setlength\headheight{12\p@} |
| 913 |
%<!bk>\setlength\headsep {25\p@} |
| 914 |
%<10pt&bk>\setlength\headsep {.25in} |
| 915 |
%<11pt&bk>\setlength\headsep {.275in} |
| 916 |
%<12pt&bk>\setlength\headsep {.275in} |
| 917 |
%<10pt>\setlength\topskip {10\p@} |
| 918 |
%<11pt>\setlength\topskip {11\p@} |
| 919 |
%<12pt>\setlength\topskip {12\p@} |
| 920 |
% \end{macrocode} |
| 921 |
% \end{macro} |
| 922 |
% \end{macro} |
| 923 |
% \end{macro} |
| 924 |
% |
| 925 |
% \begin{macro}{\footskip} |
| 926 |
% The distance from the baseline of the box which contains the |
| 927 |
% running footer to the baseline of last line of text is controlled |
| 928 |
% by the |\footskip|. |
| 929 |
% \begin{macrocode} |
| 930 |
%<!bk>\setlength\footskip{30\p@} |
| 931 |
%<10pt&bk>\setlength\footskip{.35in} |
| 932 |
%<11pt&bk>\setlength\footskip{.38in} |
| 933 |
%<12pt&bk>\setlength\footskip{30\p@} |
| 934 |
% \end{macrocode} |
| 935 |
% \end{macro} |
| 936 |
% |
| 937 |
% \begin{macro}{\maxdepth} |
| 938 |
% \changes{v1.2k}{1994/05/06}{Added setting of \cs{maxdepth} and |
| 939 |
% \cs{@maxdepth}} |
| 940 |
% \changes{v1.3j}{1995/08/16}{Take setting of |
| 941 |
% \cs{@maxdepth} out again} |
| 942 |
% The \TeX\ primitive register |\maxdepth| has a function that is |
| 943 |
% similar to that of |\topskip|. The register |\@maxdepth| should |
| 944 |
% always contain a copy of |\maxdepth|. This is achieved by setting |
| 945 |
% it internally at |\begin{document}|. In both plain \TeX\ and |
| 946 |
% \LaTeX~2.09 |\maxdepth| had a fixed value of \texttt{4pt}; in |
| 947 |
% native \LaTeX2e\ mode we let the value depend on the typesize. We |
| 948 |
% set it so that |\maxdepth| $+$ |\topskip| $=$ typesize $\times |
| 949 |
% 1.5$. As it happens, in these classes |\topskip| is equal to the |
| 950 |
% typesize, therefore we set |\maxdepth| to half the value of |
| 951 |
% |\topskip|. |
| 952 |
% \begin{macrocode} |
| 953 |
\if@compatibility \setlength\maxdepth{4\p@} \else |
| 954 |
\setlength\maxdepth{.5\topskip} \fi |
| 955 |
% \end{macrocode} |
| 956 |
% \end{macro} |
| 957 |
% |
| 958 |
% \subsubsection{The dimension of text} |
| 959 |
% |
| 960 |
% \begin{macro}{\textwidth} |
| 961 |
% When we are in compatibility mode we have to make sure that the |
| 962 |
% dimensions of the printed area are not different from what the |
| 963 |
% user was used to see. |
| 964 |
% |
| 965 |
% \begin{macrocode} |
| 966 |
\if@compatibility |
| 967 |
\if@twocolumn |
| 968 |
\setlength\textwidth{410\p@} |
| 969 |
\else |
| 970 |
%<10pt&!bk> \setlength\textwidth{345\p@} |
| 971 |
%<11pt&!bk> \setlength\textwidth{360\p@} |
| 972 |
%<12pt&!bk> \setlength\textwidth{390\p@} |
| 973 |
%<10pt&bk> \setlength\textwidth{4.5in} |
| 974 |
%<11pt&bk> \setlength\textwidth{5in} |
| 975 |
%<12pt&bk> \setlength\textwidth{5in} |
| 976 |
\fi |
| 977 |
% \end{macrocode} |
| 978 |
% When we are not in compatibility mode we can set some of the |
| 979 |
% dimensions differently, taking into account the paper size for |
| 980 |
% instance. |
| 981 |
% \begin{macrocode} |
| 982 |
\else |
| 983 |
% \end{macrocode} |
| 984 |
% First, we calculate the maximum |\textwidth|, which we will allow |
| 985 |
% on the selected paper and store it in |\@tempdima|. Then we store |
| 986 |
% the length of a line with approximately 60--70 characters in |
| 987 |
% |\@tempdimb|. The values given are more or less suitable when |
| 988 |
% Computer Modern fonts are used. |
| 989 |
% \changes{v1.1a}{1994/03/12}{Have old values for width in native mode} |
| 990 |
% \begin{macrocode} |
| 991 |
\setlength\@tempdima{\paperwidth} |
| 992 |
\addtolength\@tempdima{-2in} |
| 993 |
%<10pt> \setlength\@tempdimb{345\p@} |
| 994 |
%<11pt> \setlength\@tempdimb{360\p@} |
| 995 |
%<12pt> \setlength\@tempdimb{390\p@} |
| 996 |
% \end{macrocode} |
| 997 |
% |
| 998 |
% Now we can set the |\textwidth|, depending on whether we will be |
| 999 |
% setting one or two columns. |
| 1000 |
% |
| 1001 |
% In two-column mode each \emph{column} shouldn't be wider than |
| 1002 |
% |\@tempdimb| (which could happen on \textsc{a3} paper for |
| 1003 |
% instance). |
| 1004 |
% \begin{macrocode} |
| 1005 |
\if@twocolumn |
| 1006 |
\ifdim\@tempdima>2\@tempdimb\relax |
| 1007 |
\setlength\textwidth{2\@tempdimb} |
| 1008 |
\else |
| 1009 |
\setlength\textwidth{\@tempdima} |
| 1010 |
\fi |
| 1011 |
% \end{macrocode} |
| 1012 |
% |
| 1013 |
% In one-column mode the text should not be wider than the minimum |
| 1014 |
% of the paperwidth (minus 2 inches for the margins) and the |
| 1015 |
% maximum length of a line as defined by the number of characters. |
| 1016 |
% \begin{macrocode} |
| 1017 |
\else |
| 1018 |
\ifdim\@tempdima>\@tempdimb\relax |
| 1019 |
\setlength\textwidth{\@tempdimb} |
| 1020 |
\else |
| 1021 |
\setlength\textwidth{\@tempdima} |
| 1022 |
\fi |
| 1023 |
\fi |
| 1024 |
\fi |
| 1025 |
% \end{macrocode} |
| 1026 |
% |
| 1027 |
% Here we modify the width of the text a little to be a whole |
| 1028 |
% number of points. |
| 1029 |
% \begin{macrocode} |
| 1030 |
\if@compatibility\else |
| 1031 |
\@settopoint\textwidth |
| 1032 |
\fi |
| 1033 |
% \end{macrocode} |
| 1034 |
% \end{macro} |
| 1035 |
% |
| 1036 |
% \begin{macro}{\textheight} |
| 1037 |
% Now that we have computed the width of the text, we have to take |
| 1038 |
% care of the height. The |\textheight| is the height of text |
| 1039 |
% (including footnotes and figures, excluding running head and |
| 1040 |
% foot). |
| 1041 |
% |
| 1042 |
% First make sure that the compatibility mode gets the same |
| 1043 |
% dimensions as we had with \LaTeX2.09. The number of lines was |
| 1044 |
% calculated as the floor of the old |\textheight| minus |
| 1045 |
% |\topskip|, divided by |\baselineskip| for |\normalsize|. The |
| 1046 |
% old value of |\textheight| was 528pt. |
| 1047 |
% |
| 1048 |
% \begin{macrocode} |
| 1049 |
\if@compatibility |
| 1050 |
%<10pt&!bk> \setlength\textheight{43\baselineskip} |
| 1051 |
%<10pt&bk> \setlength\textheight{41\baselineskip} |
| 1052 |
%<11pt> \setlength\textheight{38\baselineskip} |
| 1053 |
%<12pt> \setlength\textheight{36\baselineskip} |
| 1054 |
% \end{macrocode} |
| 1055 |
% |
| 1056 |
% Again we compute this, depending on the papersize and depending |
| 1057 |
% on the baselineskip that is used, in order to have a whole number |
| 1058 |
% of lines on the page. |
| 1059 |
% \begin{macrocode} |
| 1060 |
\else |
| 1061 |
\setlength\@tempdima{\paperheight} |
| 1062 |
% \end{macrocode} |
| 1063 |
% |
| 1064 |
% We leave at least a 1 inch margin on the top and the bottom of |
| 1065 |
% the page. |
| 1066 |
% \begin{macrocode} |
| 1067 |
\addtolength\@tempdima{-2in} |
| 1068 |
% \end{macrocode} |
| 1069 |
% |
| 1070 |
% We also have to leave room for the running headers and footers. |
| 1071 |
% \begin{macrocode} |
| 1072 |
\addtolength\@tempdima{-1.5in} |
| 1073 |
% \end{macrocode} |
| 1074 |
% |
| 1075 |
% Then we divide the result by the current |\baselineskip| and |
| 1076 |
% store this in the count register |\@tempcnta|, which then |
| 1077 |
% contains the number of lines that fit on this page. |
| 1078 |
% \begin{macrocode} |
| 1079 |
\divide\@tempdima\baselineskip |
| 1080 |
\@tempcnta=\@tempdima |
| 1081 |
% \end{macrocode} |
| 1082 |
% |
| 1083 |
% From this we can calculate the height of the text. |
| 1084 |
% \begin{macrocode} |
| 1085 |
\setlength\textheight{\@tempcnta\baselineskip} |
| 1086 |
\fi |
| 1087 |
% \end{macrocode} |
| 1088 |
% |
| 1089 |
% The first line on the page has a height of |\topskip|. |
| 1090 |
% \begin{macrocode} |
| 1091 |
\addtolength\textheight{\topskip} |
| 1092 |
% \end{macrocode} |
| 1093 |
% \end{macro} |
| 1094 |
% |
| 1095 |
% |
| 1096 |
% |
| 1097 |
% \subsubsection{Margins} |
| 1098 |
% |
| 1099 |
% Most of the values of these parameters are now calculated, based |
| 1100 |
% on the papersize in use. In the calculations the |\marginparsep| |
| 1101 |
% needs to be taken into account so we give it its value first. |
| 1102 |
% |
| 1103 |
% \begin{macro}{\marginparsep} |
| 1104 |
% \begin{macro}{\marginparpush} |
| 1105 |
% The horizontal space between the main text and marginal notes is |
| 1106 |
% determined by |\marginparsep|, the minimum vertical separation |
| 1107 |
% between two marginal notes is controlled by |\marginparpush|. |
| 1108 |
% \begin{macrocode} |
| 1109 |
\if@twocolumn |
| 1110 |
\setlength\marginparsep {10\p@} |
| 1111 |
\else |
| 1112 |
%<10pt&!bk> \setlength\marginparsep{11\p@} |
| 1113 |
%<11pt&!bk> \setlength\marginparsep{10\p@} |
| 1114 |
%<12pt&!bk> \setlength\marginparsep{10\p@} |
| 1115 |
%<bk> \setlength\marginparsep{7\p@} |
| 1116 |
\fi |
| 1117 |
%<10pt|11pt>\setlength\marginparpush{5\p@} |
| 1118 |
%<12pt>\setlength\marginparpush{7\p@} |
| 1119 |
% \end{macrocode} |
| 1120 |
% \end{macro} |
| 1121 |
% \end{macro} |
| 1122 |
% |
| 1123 |
% Now we can give the values for the other margin parameters. For |
| 1124 |
% native \LaTeXe, these are calculated. |
| 1125 |
% \begin{macro}{\oddsidemargin} |
| 1126 |
% \begin{macro}{\evensidemargin} |
| 1127 |
% \begin{macro}{\marginparwidth} |
| 1128 |
% First we give the values for the compatibility mode. |
| 1129 |
% |
| 1130 |
% Values for two-sided printing: |
| 1131 |
% \begin{macrocode} |
| 1132 |
\if@compatibility |
| 1133 |
%<*bk> |
| 1134 |
%<10pt> \setlength\oddsidemargin {.5in} |
| 1135 |
%<11pt> \setlength\oddsidemargin {.25in} |
| 1136 |
%<12pt> \setlength\oddsidemargin {.25in} |
| 1137 |
%<10pt> \setlength\evensidemargin {1.5in} |
| 1138 |
%<11pt> \setlength\evensidemargin {1.25in} |
| 1139 |
%<12pt> \setlength\evensidemargin {1.25in} |
| 1140 |
%<10pt> \setlength\marginparwidth {.75in} |
| 1141 |
%<11pt> \setlength\marginparwidth {1in} |
| 1142 |
%<12pt> \setlength\marginparwidth {1in} |
| 1143 |
%</bk> |
| 1144 |
%<*!bk> |
| 1145 |
\if@twoside |
| 1146 |
%<10pt> \setlength\oddsidemargin {44\p@} |
| 1147 |
%<11pt> \setlength\oddsidemargin {36\p@} |
| 1148 |
%<12pt> \setlength\oddsidemargin {21\p@} |
| 1149 |
%<10pt> \setlength\evensidemargin {82\p@} |
| 1150 |
%<11pt> \setlength\evensidemargin {74\p@} |
| 1151 |
%<12pt> \setlength\evensidemargin {59\p@} |
| 1152 |
%<10pt> \setlength\marginparwidth {107\p@} |
| 1153 |
%<11pt> \setlength\marginparwidth {100\p@} |
| 1154 |
%<12pt> \setlength\marginparwidth {85\p@} |
| 1155 |
% \end{macrocode} |
| 1156 |
% Values for one-sided printing: |
| 1157 |
% \begin{macrocode} |
| 1158 |
\else |
| 1159 |
%<10pt> \setlength\oddsidemargin {63\p@} |
| 1160 |
%<11pt> \setlength\oddsidemargin {54\p@} |
| 1161 |
%<12pt> \setlength\oddsidemargin {39.5\p@} |
| 1162 |
%<10pt> \setlength\evensidemargin {63\p@} |
| 1163 |
%<11pt> \setlength\evensidemargin {54\p@} |
| 1164 |
%<12pt> \setlength\evensidemargin {39.5\p@} |
| 1165 |
%<10pt> \setlength\marginparwidth {90\p@} |
| 1166 |
%<11pt> \setlength\marginparwidth {83\p@} |
| 1167 |
%<12pt> \setlength\marginparwidth {68\p@} |
| 1168 |
\fi |
| 1169 |
%</!bk> |
| 1170 |
% \end{macrocode} |
| 1171 |
% And values for two-column mode: |
| 1172 |
% \begin{macrocode} |
| 1173 |
\if@twocolumn |
| 1174 |
\setlength\oddsidemargin {30\p@} |
| 1175 |
\setlength\evensidemargin {30\p@} |
| 1176 |
\setlength\marginparwidth {48\p@} |
| 1177 |
\fi |
| 1178 |
% \end{macrocode} |
| 1179 |
% |
| 1180 |
% When we are not in compatibility mode we can take the dimensions |
| 1181 |
% of the selected paper into account. |
| 1182 |
% |
| 1183 |
% The values for |\oddsidemargin| and |\marginparwidth| will be set |
| 1184 |
% depending on the status of the |\if@twoside|. |
| 1185 |
% |
| 1186 |
% If |@twoside| is true (which is always the case for book) we make |
| 1187 |
% the inner margin smaller than the outer one. |
| 1188 |
% \begin{macrocode} |
| 1189 |
\else |
| 1190 |
\if@twoside |
| 1191 |
\setlength\@tempdima {\paperwidth} |
| 1192 |
\addtolength\@tempdima {-\textwidth} |
| 1193 |
\setlength\oddsidemargin {.4\@tempdima} |
| 1194 |
\addtolength\oddsidemargin {-1in} |
| 1195 |
% \end{macrocode} |
| 1196 |
% The width of the margin for text is set to the remainder of the |
| 1197 |
% width except for a `real margin' of white space of width 0.4in. |
| 1198 |
% A check should perhaps be built in to ensure that the (text) |
| 1199 |
% margin width does not get too small! |
| 1200 |
% |
| 1201 |
% \changes{v1.1a}{1994/03/12}{New algorithm for \cs{oddsidemargin}} |
| 1202 |
% \changes{v1.1a}{1994/03/12}{New algorithm for \cs{marginparwidth}} |
| 1203 |
% \changes{v1.2z}{1995/04/14}{Also take \cs{marginparsep} into account |
| 1204 |
% here} |
| 1205 |
% \begin{macrocode} |
| 1206 |
\setlength\marginparwidth {.6\@tempdima} |
| 1207 |
\addtolength\marginparwidth {-\marginparsep} |
| 1208 |
\addtolength\marginparwidth {-0.4in} |
| 1209 |
% \end{macrocode} |
| 1210 |
% For one-sided printing we center the text on the page, by |
| 1211 |
% calculating the difference between |\textwidth| and |
| 1212 |
% |\paperwidth|. Half of that difference is than used for |
| 1213 |
% the margin (thus |\oddsidemargin| is |1in| less). |
| 1214 |
% \begin{macrocode} |
| 1215 |
\else |
| 1216 |
\setlength\@tempdima {\paperwidth} |
| 1217 |
\addtolength\@tempdima {-\textwidth} |
| 1218 |
\setlength\oddsidemargin {.5\@tempdima} |
| 1219 |
\addtolength\oddsidemargin {-1in} |
| 1220 |
\setlength\marginparwidth {.5\@tempdima} |
| 1221 |
\addtolength\marginparwidth {-\marginparsep} |
| 1222 |
\addtolength\marginparwidth {-0.4in} |
| 1223 |
\addtolength\marginparwidth {-.4in} |
| 1224 |
\fi |
| 1225 |
% \end{macrocode} |
| 1226 |
% With the above algorithm the |\marginparwidth| can come out quite |
| 1227 |
% large which we may not want. |
| 1228 |
% \begin{macrocode} |
| 1229 |
\ifdim \marginparwidth >2in |
| 1230 |
\setlength\marginparwidth{2in} |
| 1231 |
\fi |
| 1232 |
% \end{macrocode} |
| 1233 |
% Having done these calculations we make them pt values. |
| 1234 |
% \begin{macrocode} |
| 1235 |
\@settopoint\oddsidemargin |
| 1236 |
\@settopoint\marginparwidth |
| 1237 |
% \end{macrocode} |
| 1238 |
% |
| 1239 |
% The |\evensidemargin| can now be computed from the values set |
| 1240 |
% above. |
| 1241 |
% \changes{v1.0l}{1994/01/11}{Computing of \cs{evensidemargin} |
| 1242 |
% should only occur in compatibility mode} |
| 1243 |
% \begin{macrocode} |
| 1244 |
\setlength\evensidemargin {\paperwidth} |
| 1245 |
\addtolength\evensidemargin{-2in} |
| 1246 |
\addtolength\evensidemargin{-\textwidth} |
| 1247 |
\addtolength\evensidemargin{-\oddsidemargin} |
| 1248 |
% \end{macrocode} |
| 1249 |
% Setting |\evensidemargin| to a full point value may produce a |
| 1250 |
% small error. However it will lie within the error range a |
| 1251 |
% doublesided printer of today's technology can accurately print. |
| 1252 |
% \begin{macrocode} |
| 1253 |
\@settopoint\evensidemargin |
| 1254 |
\fi |
| 1255 |
% \end{macrocode} |
| 1256 |
% \end{macro} |
| 1257 |
% \end{macro} |
| 1258 |
% \end{macro} |
| 1259 |
% |
| 1260 |
% \begin{macro}{\topmargin} |
| 1261 |
% The |\topmargin| is the distance between the top of `the |
| 1262 |
% printable area'---which is 1 inch below the top of the |
| 1263 |
% paper--and the top of the box which contains the running head. |
| 1264 |
% |
| 1265 |
% It can now be computed from the values set above. |
| 1266 |
% \begin{macrocode} |
| 1267 |
\if@compatibility |
| 1268 |
%<!bk> \setlength\topmargin{27pt} |
| 1269 |
%<10pt&bk> \setlength\topmargin{.75in} |
| 1270 |
%<11pt&bk> \setlength\topmargin{.73in} |
| 1271 |
%<12pt&bk> \setlength\topmargin{.73in} |
| 1272 |
\else |
| 1273 |
\setlength\topmargin{\paperheight} |
| 1274 |
\addtolength\topmargin{-2in} |
| 1275 |
\addtolength\topmargin{-\headheight} |
| 1276 |
\addtolength\topmargin{-\headsep} |
| 1277 |
\addtolength\topmargin{-\textheight} |
| 1278 |
\addtolength\topmargin{-\footskip} % this might be wrong! |
| 1279 |
% \end{macrocode} |
| 1280 |
% By changing the factor in the next line the complete page |
| 1281 |
% can be shifted vertically. |
| 1282 |
% \changes{v1.2u}{1994/07/13}{Moved rounding of \cs{topmargin} to |
| 1283 |
% native mode} |
| 1284 |
% \begin{macrocode} |
| 1285 |
\addtolength\topmargin{-.5\topmargin} |
| 1286 |
\@settopoint\topmargin |
| 1287 |
\fi |
| 1288 |
% \end{macrocode} |
| 1289 |
% \end{macro} |
| 1290 |
% |
| 1291 |
% |
| 1292 |
% \subsubsection{Footnotes} |
| 1293 |
% |
| 1294 |
% \begin{macro}{\footnotesep} |
| 1295 |
% |\footnotesep| is the height of the strut placed at the beginning |
| 1296 |
% of every footnote. It equals the height of a normal |
| 1297 |
% |\footnotesize| strut in this |
| 1298 |
% class, thus no extra space occurs between footnotes. |
| 1299 |
% \begin{macrocode} |
| 1300 |
%<10pt>\setlength\footnotesep{6.65\p@} |
| 1301 |
%<11pt>\setlength\footnotesep{7.7\p@} |
| 1302 |
%<12pt>\setlength\footnotesep{8.4\p@} |
| 1303 |
% \end{macrocode} |
| 1304 |
% \end{macro} |
| 1305 |
% |
| 1306 |
% \begin{macro}{\footins} |
| 1307 |
% |\skip\footins| is the space between the last line of the main |
| 1308 |
% text and the top of the first footnote. |
| 1309 |
% \begin{macrocode} |
| 1310 |
%<10pt>\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@} |
| 1311 |
%<11pt>\setlength{\skip\footins}{10\p@ \@plus 4\p@ \@minus 2\p@} |
| 1312 |
%<12pt>\setlength{\skip\footins}{10.8\p@ \@plus 4\p@ \@minus 2\p@} |
| 1313 |
%</10pt|11pt|12pt> |
| 1314 |
% \end{macrocode} |
| 1315 |
% \end{macro} |
| 1316 |
% |
| 1317 |
% \subsubsection{Float placement parameters} |
| 1318 |
% |
| 1319 |
% All float parameters are given default values in the \LaTeXe{} |
| 1320 |
% kernel. For this reason parameters that are not counters |
| 1321 |
% need to be set with |\renewcommand|. |
| 1322 |
% |
| 1323 |
% \paragraph{Limits for the placement of floating objects} |
| 1324 |
% |
| 1325 |
% \begin{macro}{\c@topnumber} |
| 1326 |
% The \Lcount{topnumber} counter holds the maximum number of |
| 1327 |
% floats that can appear on the top of a text page. |
| 1328 |
% \begin{macrocode} |
| 1329 |
%<*article|report|book> |
| 1330 |
\setcounter{topnumber}{2} |
| 1331 |
% \end{macrocode} |
| 1332 |
% \end{macro} |
| 1333 |
% |
| 1334 |
% \begin{macro}{\topfraction} |
| 1335 |
% This indicates the maximum part of a text page that can be |
| 1336 |
% occupied by floats at the top. |
| 1337 |
% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with |
| 1338 |
% \cs{renewcommand}. ASAJ.} |
| 1339 |
% \begin{macrocode} |
| 1340 |
\renewcommand\topfraction{.7} |
| 1341 |
% \end{macrocode} |
| 1342 |
% \end{macro} |
| 1343 |
% |
| 1344 |
% \begin{macro}{\c@bottomnumber} |
| 1345 |
% The \Lcount{bottomnumber} counter holds the maximum number of |
| 1346 |
% floats that can appear on the bottom of a text page. |
| 1347 |
% \begin{macrocode} |
| 1348 |
\setcounter{bottomnumber}{1} |
| 1349 |
% \end{macrocode} |
| 1350 |
% \end{macro} |
| 1351 |
% |
| 1352 |
% \begin{macro}{\bottomfraction} |
| 1353 |
% This indicates the maximum part of a text page that can be |
| 1354 |
% occupied by floats at the bottom. |
| 1355 |
% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with |
| 1356 |
% \cs{renewcommand}. ASAJ.} |
| 1357 |
% \begin{macrocode} |
| 1358 |
\renewcommand\bottomfraction{.3} |
| 1359 |
% \end{macrocode} |
| 1360 |
% \end{macro} |
| 1361 |
% |
| 1362 |
% \begin{macro}{\c@totalnumber} |
| 1363 |
% This indicates the maximum number of floats that can appear on |
| 1364 |
% any text page. |
| 1365 |
% \begin{macrocode} |
| 1366 |
\setcounter{totalnumber}{3} |
| 1367 |
% \end{macrocode} |
| 1368 |
% \end{macro} |
| 1369 |
% |
| 1370 |
% \begin{macro}{\textfraction} |
| 1371 |
% This indicates the minimum part of a text page that has to be |
| 1372 |
% occupied by text. |
| 1373 |
% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with |
| 1374 |
% \cs{renewcommand}. ASAJ.} |
| 1375 |
% \begin{macrocode} |
| 1376 |
\renewcommand\textfraction{.2} |
| 1377 |
% \end{macrocode} |
| 1378 |
% \end{macro} |
| 1379 |
% |
| 1380 |
% \begin{macro}{\floatpagefraction} |
| 1381 |
% This indicates the minimum part of a page that has to be |
| 1382 |
% occupied by floating objects before a `float page' is produced. |
| 1383 |
% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with |
| 1384 |
% \cs{renewcommand}. ASAJ.} |
| 1385 |
% \begin{macrocode} |
| 1386 |
\renewcommand\floatpagefraction{.5} |
| 1387 |
% \end{macrocode} |
| 1388 |
% \end{macro} |
| 1389 |
% |
| 1390 |
% \begin{macro}{\c@dbltopnumber} |
| 1391 |
% The \Lcount{dbltopnumber} counter holds the maximum number of |
| 1392 |
% two-column floats that can appear on the top of a two-column text |
| 1393 |
% page. |
| 1394 |
% \begin{macrocode} |
| 1395 |
\setcounter{dbltopnumber}{2} |
| 1396 |
% \end{macrocode} |
| 1397 |
% \end{macro} |
| 1398 |
% |
| 1399 |
% \begin{macro}{\dbltopfraction} |
| 1400 |
% This indicates the maximum part of a two-column text page that |
| 1401 |
% can be occupied by two-column floats at the top. |
| 1402 |
% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with |
| 1403 |
% \cs{renewcommand}. ASAJ.} |
| 1404 |
% \begin{macrocode} |
| 1405 |
\renewcommand\dbltopfraction{.7} |
| 1406 |
% \end{macrocode} |
| 1407 |
% \end{macro} |
| 1408 |
% |
| 1409 |
% \begin{macro}{\dblfloatpagefraction} |
| 1410 |
% This indicates the minimum part of a page that has to be |
| 1411 |
% occupied by two-column wide floating objects before a `float |
| 1412 |
% page' is produced. |
| 1413 |
% \changes{v1.0h}{1993/12/18}{Replaced \cs{newcommand} with |
| 1414 |
% \cs{renewcommand}. ASAJ.} |
| 1415 |
% \begin{macrocode} |
| 1416 |
\renewcommand\dblfloatpagefraction{.5} |
| 1417 |
%</article|report|book> |
| 1418 |
% \end{macrocode} |
| 1419 |
% \end{macro} |
| 1420 |
% |
| 1421 |
% \paragraph{Floats on a text page} |
| 1422 |
% |
| 1423 |
% \begin{macro}{\floatsep} |
| 1424 |
% \begin{macro}{\textfloatsep} |
| 1425 |
% \begin{macro}{\intextsep} |
| 1426 |
% When a floating object is placed on a page with text, these |
| 1427 |
% parameters control the separation between the float and the other |
| 1428 |
% objects on the page. These parameters are used for both |
| 1429 |
% one-column mode and single-column floats in two-column mode. |
| 1430 |
% |
| 1431 |
% |\floatsep| is the space between adjacent floats that are moved |
| 1432 |
% to the top or bottom of the text page. |
| 1433 |
% |
| 1434 |
% |\textfloatsep| is the space between the main text and floats |
| 1435 |
% at the top or bottom of the page. |
| 1436 |
% |
| 1437 |
% |\intextsep| is the space between in-text floats and the text. |
| 1438 |
% \begin{macrocode} |
| 1439 |
%<*10pt> |
| 1440 |
\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 1441 |
\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} |
| 1442 |
\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 1443 |
%</10pt> |
| 1444 |
%<*11pt> |
| 1445 |
\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 1446 |
\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} |
| 1447 |
\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 1448 |
%</11pt> |
| 1449 |
%<*12pt> |
| 1450 |
\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 4\p@} |
| 1451 |
\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} |
| 1452 |
\setlength\intextsep {14\p@ \@plus 4\p@ \@minus 4\p@} |
| 1453 |
%</12pt> |
| 1454 |
% \end{macrocode} |
| 1455 |
% \end{macro} |
| 1456 |
% \end{macro} |
| 1457 |
% \end{macro} |
| 1458 |
% |
| 1459 |
% \begin{macro}{\dblfloatsep} |
| 1460 |
% \begin{macro}{\dbltextfloatsep} |
| 1461 |
% When floating objects that span the whole |\textwidth| are placed |
| 1462 |
% on a text page when we are in two-column mode the separation |
| 1463 |
% between the float and the text is controlled by |\dblfloatsep| |
| 1464 |
% and |\dbltextfloatsep|. |
| 1465 |
% |
| 1466 |
% |\dblfloatsep| is the space between adjacent floats that are moved |
| 1467 |
% to the top or bottom of the text page. |
| 1468 |
% |
| 1469 |
% |\dbltextfloatsep| is the space between the main text and floats |
| 1470 |
% at the top or bottom of the page. |
| 1471 |
% |
| 1472 |
% \begin{macrocode} |
| 1473 |
%<*10pt> |
| 1474 |
\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 1475 |
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} |
| 1476 |
%</10pt> |
| 1477 |
%<*11pt> |
| 1478 |
\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 1479 |
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} |
| 1480 |
%</11pt> |
| 1481 |
%<*12pt> |
| 1482 |
\setlength\dblfloatsep {14\p@ \@plus 2\p@ \@minus 4\p@} |
| 1483 |
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} |
| 1484 |
%</12pt> |
| 1485 |
% \end{macrocode} |
| 1486 |
% \end{macro} |
| 1487 |
% \end{macro} |
| 1488 |
% |
| 1489 |
% \paragraph{Floats on their own page or column} |
| 1490 |
% |
| 1491 |
% \begin{macro}{\@fptop} |
| 1492 |
% \begin{macro}{\@fpsep} |
| 1493 |
% \begin{macro}{\@fpbot} |
| 1494 |
% When floating objects are placed on separate pages the layout of |
| 1495 |
% such pages is controlled by these parameters. At the top of the |
| 1496 |
% page |\@fptop| amount of stretchable whitespace is inserted, at |
| 1497 |
% the bottom of the page we get an |\@fpbot| amount of stretchable |
| 1498 |
% whitespace. Between adjacent floats the |\@fpsep| is inserted. |
| 1499 |
% |
| 1500 |
% These parameters are used for the placement of floating objects |
| 1501 |
% in one-column mode, or in single-column floats in two-column |
| 1502 |
% mode. |
| 1503 |
% |
| 1504 |
% Note that at least one of the two parameters |\@fptop| and |
| 1505 |
% |\@fpbot| should contain a |plus ...fil| to allow filling the |
| 1506 |
% remaining empty space. |
| 1507 |
% \begin{macrocode} |
| 1508 |
%<*10pt> |
| 1509 |
\setlength\@fptop{0\p@ \@plus 1fil} |
| 1510 |
\setlength\@fpsep{8\p@ \@plus 2fil} |
| 1511 |
\setlength\@fpbot{0\p@ \@plus 1fil} |
| 1512 |
%</10pt> |
| 1513 |
%<*11pt> |
| 1514 |
\setlength\@fptop{0\p@ \@plus 1fil} |
| 1515 |
\setlength\@fpsep{8\p@ \@plus 2fil} |
| 1516 |
\setlength\@fpbot{0\p@ \@plus 1fil} |
| 1517 |
%</11pt> |
| 1518 |
%<*12pt> |
| 1519 |
\setlength\@fptop{0\p@ \@plus 1fil} |
| 1520 |
\setlength\@fpsep{10\p@ \@plus 2fil} |
| 1521 |
\setlength\@fpbot{0\p@ \@plus 1fil} |
| 1522 |
%</12pt> |
| 1523 |
% \end{macrocode} |
| 1524 |
% \end{macro} |
| 1525 |
% \end{macro} |
| 1526 |
% \end{macro} |
| 1527 |
% |
| 1528 |
% \begin{macro}{\@dblfptop} |
| 1529 |
% \begin{macro}{\@dblfpsep} |
| 1530 |
% \begin{macro}{\@dblfpbot} |
| 1531 |
% Double-column floats in two-column mode are handled with similar |
| 1532 |
% parameters. |
| 1533 |
% \begin{macrocode} |
| 1534 |
%<*10pt> |
| 1535 |
\setlength\@dblfptop{0\p@ \@plus 1fil} |
| 1536 |
\setlength\@dblfpsep{8\p@ \@plus 2fil} |
| 1537 |
\setlength\@dblfpbot{0\p@ \@plus 1fil} |
| 1538 |
%</10pt> |
| 1539 |
%<*11pt> |
| 1540 |
\setlength\@dblfptop{0\p@ \@plus 1fil} |
| 1541 |
\setlength\@dblfpsep{8\p@ \@plus 2fil} |
| 1542 |
\setlength\@dblfpbot{0\p@ \@plus 1fil} |
| 1543 |
%</11pt> |
| 1544 |
%<*12pt> |
| 1545 |
\setlength\@dblfptop{0\p@ \@plus 1fil} |
| 1546 |
\setlength\@dblfpsep{10\p@ \@plus 2fil} |
| 1547 |
\setlength\@dblfpbot{0\p@ \@plus 1fil} |
| 1548 |
%</12pt> |
| 1549 |
%<*article|report|book> |
| 1550 |
% \end{macrocode} |
| 1551 |
% \end{macro} |
| 1552 |
% \end{macro} |
| 1553 |
% \end{macro} |
| 1554 |
% |
| 1555 |
% \subsection{Page Styles} |
| 1556 |
% |
| 1557 |
% The page style \pstyle{foo} is defined by defining the command |
| 1558 |
% |\ps@foo|. This command should make only local definitions. |
| 1559 |
% There should be no stray spaces in the definition, since they |
| 1560 |
% could lead to mysterious extra spaces in the output (well, that's |
| 1561 |
% something that should be always avoided). |
| 1562 |
% |
| 1563 |
% \begin{macro}{\@evenhead} |
| 1564 |
% \begin{macro}{\@oddhead} |
| 1565 |
% \begin{macro}{\@evenfoot} |
| 1566 |
% \begin{macro}{\@oddfoot} |
| 1567 |
% The |\ps@...| command defines the macros |\@oddhead|, |
| 1568 |
% |\@oddfoot|, |\@evenhead|, and |\@evenfoot| to define the running |
| 1569 |
% heads and feet---e.g., |\@oddhead| is the macro to produce the |
| 1570 |
% contents of the heading box for odd-numbered pages. It is called |
| 1571 |
% inside an |\hbox| of width |\textwidth|. |
| 1572 |
% \end{macro} |
| 1573 |
% \end{macro} |
| 1574 |
% \end{macro} |
| 1575 |
% \end{macro} |
| 1576 |
% |
| 1577 |
% \subsubsection{Marking conventions} |
| 1578 |
% |
| 1579 |
% To make headings determined by the sectioning commands, the page |
| 1580 |
% style defines the commands |\chaptermark|, |\sectionmark|, |
| 1581 |
% \ldots,\\ |
| 1582 |
% where |\chaptermark{|\meta{TEXT}|}| is called by |
| 1583 |
% |\chapter| to set a mark, and so on. |
| 1584 |
% |
| 1585 |
% The |\...mark| commands and the |\...head| macros are defined |
| 1586 |
% with the help of the following macros. (All the |\...mark| |
| 1587 |
% commands should be initialized to no-ops.) |
| 1588 |
% |
| 1589 |
% \LaTeX{} extends \TeX's |\mark| facility by producing two kinds |
| 1590 |
% of marks, a `left' and a `right' mark, using the following |
| 1591 |
% commands: |
| 1592 |
% \begin{flushleft} |
| 1593 |
% |\markboth{|\meta{LEFT}|}{|\meta{RIGHT}|}|: Adds both marks. |
| 1594 |
% |
| 1595 |
% |\markright{|\meta{RIGHT}|}|: Adds a `right' mark. |
| 1596 |
% |
| 1597 |
% |\leftmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead| |
| 1598 |
% or |\@evenfoot| macros, it gets the current `left' |
| 1599 |
% mark. |\leftmark| works like \TeX's |\botmark| |
| 1600 |
% command. |
| 1601 |
% |
| 1602 |
% |\rightmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead| |
| 1603 |
% or |\@evenfoot| macros, it gets the current |
| 1604 |
% `right' mark. |\rightmark| works like \TeX's |
| 1605 |
% |\firstmark| command. |
| 1606 |
% \end{flushleft} |
| 1607 |
% |
| 1608 |
% The marking commands work reasonably well for right marks |
| 1609 |
% `numbered within' left marks---e.g., the left mark is changed by a |
| 1610 |
% |\chapter| command and the right mark is changed by a |\section| |
| 1611 |
% command. However, it does produce somewhat anomalous results if |
| 1612 |
% two |\markboth|'s occur on the same page. |
| 1613 |
% |
| 1614 |
% |
| 1615 |
% Commands like |\tableofcontents| that should set the marks in some |
| 1616 |
% page styles use a |\@mkboth| command, which is |\let| by the |
| 1617 |
% pagestyle command (|\ps@...|) to |\markboth| for setting the |
| 1618 |
% heading or to |\@gobbletwo| to do nothing. |
| 1619 |
% |
| 1620 |
% |
| 1621 |
% \subsubsection{Defining the page styles} |
| 1622 |
% \label{sec:classes:pagestyle} |
| 1623 |
% |
| 1624 |
% The pagestyles \pstyle{empty} and \pstyle{plain} are defined in |
| 1625 |
% the \LaTeX{} format. |
| 1626 |
% |
| 1627 |
% \begin{macro}{\ps@headings} |
| 1628 |
% The definition of the page style \pstyle{headings} has to be |
| 1629 |
% different for two sided printing than it is for one sided |
| 1630 |
% printing. |
| 1631 |
% |
| 1632 |
% \begin{macrocode} |
| 1633 |
\if@twoside |
| 1634 |
\def\ps@headings{% |
| 1635 |
% \end{macrocode} |
| 1636 |
% The running feet are empty in this page style, the running head |
| 1637 |
% contains the page number and one of the marks. |
| 1638 |
% \begin{macrocode} |
| 1639 |
\let\@oddfoot\@empty\let\@evenfoot\@empty |
| 1640 |
\def\@evenhead{\thepage\hfil\slshape\leftmark}% |
| 1641 |
\def\@oddhead{{\slshape\rightmark}\hfil\thepage}% |
| 1642 |
% \end{macrocode} |
| 1643 |
% |
| 1644 |
% When using this page style, the contents of the running head is |
| 1645 |
% determined by the chapter and section titles. So we |\let| |
| 1646 |
% |\@mkboth| to |\markboth|. |
| 1647 |
% \begin{macrocode} |
| 1648 |
\let\@mkboth\markboth |
| 1649 |
% \end{macrocode} |
| 1650 |
% |
| 1651 |
% For the article document class we define |\sectionmark| to clear |
| 1652 |
% the right mark and put the number of the section (when it is |
| 1653 |
% numbered) and its title in the left mark. The rightmark is set by |
| 1654 |
% |\subsectionmark| to contain the subsection titles. |
| 1655 |
% |
| 1656 |
% Note the use of |##1| for the parameter of the |\sectionmark| |
| 1657 |
% command, which will be defined when |\ps@headings| is executed. |
| 1658 |
% |
| 1659 |
% \changes{v1.2z}{1995/04/03}{Removed extra dot after \cs{thesection} |
| 1660 |
% (PR 1519)} |
| 1661 |
% \changes{v1.3c}{1995/05/25}{Replace \cs{hskip} |
| 1662 |
% \texttt{1em}\cs{relax} with \cs{quad}} |
| 1663 |
% \begin{macrocode} |
| 1664 |
%<*article> |
| 1665 |
\def\sectionmark##1{% |
| 1666 |
\markboth {\MakeUppercase{% |
| 1667 |
\ifnum \c@secnumdepth >\z@ |
| 1668 |
\thesection\quad |
| 1669 |
\fi |
| 1670 |
##1}}{}}% |
| 1671 |
\def\subsectionmark##1{% |
| 1672 |
\markright {% |
| 1673 |
\ifnum \c@secnumdepth >\@ne |
| 1674 |
\thesubsection\quad |
| 1675 |
\fi |
| 1676 |
##1}}} |
| 1677 |
%</article> |
| 1678 |
% \end{macrocode} |
| 1679 |
% |
| 1680 |
% In the report and book document classes we use the |\chaptermark| |
| 1681 |
% and |\sectionmark| macros to fill the running heads. |
| 1682 |
% |
| 1683 |
% Note the use of |##1| for the parameter of the |\chaptermark| |
| 1684 |
% command, which will be defined when |\ps@headings| is executed. |
| 1685 |
% |
| 1686 |
% \begin{macrocode} |
| 1687 |
%<*report|book> |
| 1688 |
\def\chaptermark##1{% |
| 1689 |
\markboth {\MakeUppercase{% |
| 1690 |
\ifnum \c@secnumdepth >\m@ne |
| 1691 |
%<book> \if@mainmatter |
| 1692 |
\@chapapp\ \thechapter. \ % |
| 1693 |
%<book> \fi |
| 1694 |
\fi |
| 1695 |
##1}}{}}% |
| 1696 |
\def\sectionmark##1{% |
| 1697 |
\markright {\MakeUppercase{% |
| 1698 |
\ifnum \c@secnumdepth >\z@ |
| 1699 |
\thesection. \ % |
| 1700 |
\fi |
| 1701 |
##1}}}} |
| 1702 |
%</report|book> |
| 1703 |
% \end{macrocode} |
| 1704 |
% |
| 1705 |
% The definition of |\ps@headings| for one sided printing can be |
| 1706 |
% much simpler, because we treat even and odd pages the same. |
| 1707 |
% Therefore we don't need to define |\@even...|. |
| 1708 |
% \begin{macrocode} |
| 1709 |
\else |
| 1710 |
\def\ps@headings{% |
| 1711 |
\let\@oddfoot\@empty |
| 1712 |
\def\@oddhead{{\slshape\rightmark}\hfil\thepage}% |
| 1713 |
\let\@mkboth\markboth |
| 1714 |
% \end{macrocode} |
| 1715 |
% We use |\markright| now instead of |\markboth| as we did for two |
| 1716 |
% sided printing. |
| 1717 |
% \begin{macrocode} |
| 1718 |
%<*article> |
| 1719 |
\def\sectionmark##1{% |
| 1720 |
\markright {\MakeUppercase{% |
| 1721 |
\ifnum \c@secnumdepth >\m@ne |
| 1722 |
\thesection\quad |
| 1723 |
\fi |
| 1724 |
##1}}}} |
| 1725 |
%</article> |
| 1726 |
% \end{macrocode} |
| 1727 |
% |
| 1728 |
% \begin{macrocode} |
| 1729 |
%<*report|book> |
| 1730 |
\def\chaptermark##1{% |
| 1731 |
\markright {\MakeUppercase{% |
| 1732 |
\ifnum \c@secnumdepth >\m@ne |
| 1733 |
%<book> \if@mainmatter |
| 1734 |
\@chapapp\ \thechapter. \ % |
| 1735 |
%<book> \fi |
| 1736 |
\fi |
| 1737 |
##1}}}} |
| 1738 |
%</report|book> |
| 1739 |
\fi |
| 1740 |
% \end{macrocode} |
| 1741 |
% \end{macro} |
| 1742 |
% |
| 1743 |
% \begin{macro}{\ps@myheadings} |
| 1744 |
% The definition of the page style \pstyle{myheadings} is fairly |
| 1745 |
% simple because the user determines the contents of the running |
| 1746 |
% head himself by using the |\markboth| and |\markright| commands. |
| 1747 |
% |
| 1748 |
% \begin{macrocode} |
| 1749 |
\def\ps@myheadings{% |
| 1750 |
\let\@oddfoot\@empty\let\@evenfoot\@empty |
| 1751 |
\def\@evenhead{\thepage\hfil\slshape\leftmark}% |
| 1752 |
\def\@oddhead{{\slshape\rightmark}\hfil\thepage}% |
| 1753 |
% \end{macrocode} |
| 1754 |
% |
| 1755 |
% We have to make sure that the marking commands that are used by |
| 1756 |
% the chapter and section headings are disabled. We do this |
| 1757 |
% |\let|ting them to a macro that gobbles its argument(s). |
| 1758 |
% \begin{macrocode} |
| 1759 |
\let\@mkboth\@gobbletwo |
| 1760 |
%<!article> \let\chaptermark\@gobble |
| 1761 |
\let\sectionmark\@gobble |
| 1762 |
%<article> \let\subsectionmark\@gobble |
| 1763 |
} |
| 1764 |
% \end{macrocode} |
| 1765 |
% \end{macro} |
| 1766 |
% |
| 1767 |
% \section{Document Markup} |
| 1768 |
% |
| 1769 |
% \subsection{The title} |
| 1770 |
% |
| 1771 |
% \begin{macro}{\title} |
| 1772 |
% \begin{macro}{\author} |
| 1773 |
% \begin{macro}{\date} |
| 1774 |
% These three macros are provided by the \LaTeX{} format to provide |
| 1775 |
% information about the title, author(s) and date of the document. |
| 1776 |
% The information is stored away in internal control sequences. |
| 1777 |
% It is the task of the |\maketitle| command to use the |
| 1778 |
% information provided. The definitions of these macros are shown |
| 1779 |
% here for information. |
| 1780 |
% \begin{macrocode} |
| 1781 |
% \DeclareRobustCommand*{\title}[1]{\gdef\@title{#1}} |
| 1782 |
% \DeclareRobustCommand*{\author}[1]{\gdef\@author{#1}} |
| 1783 |
% \DeclareRobustCommand*{\date}[1]{\gdef\@date{#1}} |
| 1784 |
% \end{macrocode} |
| 1785 |
% The |\date| macro gets today's date by default. |
| 1786 |
% \begin{macrocode} |
| 1787 |
% \date{\today} |
| 1788 |
% \end{macrocode} |
| 1789 |
% \end{macro} |
| 1790 |
% \end{macro} |
| 1791 |
% \end{macro} |
| 1792 |
% |
| 1793 |
% \begin{macro}{\maketitle} |
| 1794 |
% The definition of |\maketitle| depends on whether a separate |
| 1795 |
% title page is made. This is the default for the report and book |
| 1796 |
% document classes, but for the article class it is optional. |
| 1797 |
% |
| 1798 |
% When we are making a title page, we locally redefine |
| 1799 |
% |\footnotesize| and |footnoterule| to change the appearance of |
| 1800 |
% the footnotes that are produced by the |\thanks| command; |
| 1801 |
% these changes affect all footnotes. |
| 1802 |
% \changes{v1.3o}{1995/11/02}{(CAR) Make \cs{footnote} always work in |
| 1803 |
% title, etc} |
| 1804 |
% \begin{macrocode} |
| 1805 |
\if@titlepage |
| 1806 |
\newcommand\maketitle{\begin{titlepage}% |
| 1807 |
\let\footnotesize\small |
| 1808 |
\let\footnoterule\relax |
| 1809 |
\let \footnote \thanks |
| 1810 |
% \end{macrocode} |
| 1811 |
% We center the entire title vertically; the centering is set off a |
| 1812 |
% little by adding a |\vskip|. (In compatibility mode the page number |
| 1813 |
% is set to 0 by the titlepage environment to keep the behaviour |
| 1814 |
% of \LaTeX\ 2.09 style files.) |
| 1815 |
% \changes{v1.0g}{1993/12/09}{Removed the setting of the page number, |
| 1816 |
% when not in compatibility mode} |
| 1817 |
% \changes{v1.2c}{1994/03/17}{Removed setting of page number, now done |
| 1818 |
% in titlepage environment} |
| 1819 |
% \begin{macrocode} |
| 1820 |
\null\vfil |
| 1821 |
\vskip 60\p@ |
| 1822 |
% \end{macrocode} |
| 1823 |
% Then we set the title, in a |\LARGE| font; leave a little space |
| 1824 |
% and set the author(s) in a |\large| font. We do this inside a |
| 1825 |
% tabular environment to get them in a single column. |
| 1826 |
% Before the date we leave a little whitespace again. |
| 1827 |
% \begin{macrocode} |
| 1828 |
\begin{center}% |
| 1829 |
{\LARGE \@title \par}% |
| 1830 |
\vskip 3em% |
| 1831 |
{\large |
| 1832 |
\lineskip .75em% |
| 1833 |
\begin{tabular}[t]{c}% |
| 1834 |
\@author |
| 1835 |
\end{tabular}\par}% |
| 1836 |
\vskip 1.5em% |
| 1837 |
{\large \@date \par}% % Set date in \large size. |
| 1838 |
\end{center}\par |
| 1839 |
% \end{macrocode} |
| 1840 |
% Then we call |\@thanks| to print the information that goes into |
| 1841 |
% the footnote and finish the page. |
| 1842 |
% \begin{macrocode} |
| 1843 |
\@thanks |
| 1844 |
\vfil\null |
| 1845 |
\end{titlepage}% |
| 1846 |
% \end{macrocode} |
| 1847 |
% We reset the \Lcount{footnote} counter, disable |\thanks| and |
| 1848 |
% |\maketitle| and save some storage space by emptying the internal |
| 1849 |
% information macros. |
| 1850 |
% \changes{v1.3j}{1995/08/16}{use \cs{let} to save space} |
| 1851 |
% \changes{v1.3n}{1995/10/29}{Empty \cs{@date} as well} |
| 1852 |
% \begin{macrocode} |
| 1853 |
\setcounter{footnote}{0}% |
| 1854 |
\global\let\thanks\relax |
| 1855 |
\global\let\maketitle\relax |
| 1856 |
\global\let\@thanks\@empty |
| 1857 |
\global\let\@author\@empty |
| 1858 |
\global\let\@date\@empty |
| 1859 |
\global\let\@title\@empty |
| 1860 |
% \end{macrocode} |
| 1861 |
% After the title is set the declaration commands |\title|, etc.\ |
| 1862 |
% can vanish. |
| 1863 |
% The definition of |\and| makes only sense within the argument of |
| 1864 |
% |\author| so this can go as well. |
| 1865 |
% \changes{v1.3k}{1995/08/27}{Disable \cs{title} and similar decls} |
| 1866 |
% \begin{macrocode} |
| 1867 |
\global\let\title\relax |
| 1868 |
\global\let\author\relax |
| 1869 |
\global\let\date\relax |
| 1870 |
\global\let\and\relax |
| 1871 |
} |
| 1872 |
% \end{macrocode} |
| 1873 |
% When the title is not on a page of its own, the layout of the |
| 1874 |
% title is a little different. We use symbols to mark the footnotes |
| 1875 |
% and we have to deal with two-column documents. |
| 1876 |
% |
| 1877 |
% Therefore we first start a new group to keep changes local. Then |
| 1878 |
% we redefine |\thefootnote| to use |\fnsymbol|; and change |
| 1879 |
% |\@makefnmark| so that footnotemarks have zero width (to make the |
| 1880 |
% centering of the author names look better). |
| 1881 |
% \changes{v1.2s}{1994/06/02}{Reset \cs{@makefntext}} |
| 1882 |
% \changes{v1.3a}{1995/05/17}{Use \cs{@makefnmark} in definition of |
| 1883 |
% \cs{@makefntext}} |
| 1884 |
% \changes{v1.3g}{1995/06/26}{Fix definition of \cs{@makefnmark} and |
| 1885 |
% \cs{@makefntext} to (a) work and (b) without using math} |
| 1886 |
% \begin{macrocode} |
| 1887 |
\else |
| 1888 |
\newcommand\maketitle{\par |
| 1889 |
\begingroup |
| 1890 |
\renewcommand\thefootnote{\@fnsymbol\c@footnote}% |
| 1891 |
\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% |
| 1892 |
\long\def\@makefntext##1{\parindent 1em\noindent |
| 1893 |
\hb@[email protected]{% |
| 1894 |
\hss\@textsuperscript{\normalfont\@thefnmark}}##1}% |
| 1895 |
% \end{macrocode} |
| 1896 |
% If this is a two-column document we start a new page in two-column |
| 1897 |
% mode, with the title set to the full width of the text. The |
| 1898 |
% actual printing of the title information is left to |
| 1899 |
% |\@maketitle|. |
| 1900 |
% \changes{v1.2k}{1994/05/06}{Added check on number of columns in use |
| 1901 |
% locally} |
| 1902 |
% \begin{macrocode} |
| 1903 |
\if@twocolumn |
| 1904 |
\ifnum \col@number=\@ne |
| 1905 |
\@maketitle |
| 1906 |
\else |
| 1907 |
\twocolumn[\@maketitle]% |
| 1908 |
\fi |
| 1909 |
\else |
| 1910 |
% \end{macrocode} |
| 1911 |
% When this is not a two-column document we just start a new page, |
| 1912 |
% prevent floating objects from appearing on the top of this page |
| 1913 |
% and print the title information. |
| 1914 |
% \begin{macrocode} |
| 1915 |
\newpage |
| 1916 |
\global\@topnum\z@ % Prevents figures from going at top of page. |
| 1917 |
\@maketitle |
| 1918 |
\fi |
| 1919 |
% \end{macrocode} |
| 1920 |
% This page gets a \pstyle{plain} layout. We call |\@thanks| to |
| 1921 |
% produce the footnotes. |
| 1922 |
% \begin{macrocode} |
| 1923 |
\thispagestyle{plain}\@thanks |
| 1924 |
% \end{macrocode} |
| 1925 |
% Now we can close the group, reset the \Lcount{footnote} counter, |
| 1926 |
% disable |\thanks|, |\maketitle| and |\@maketitle| and save some |
| 1927 |
% storage space by emptying the internal information macros. |
| 1928 |
% \changes{v1.3j}{1995/08/16}{use \cs{let} to save space} |
| 1929 |
% \changes{v1.3k}{1995/08/27}{Disable \cs{title} and similar decls} |
| 1930 |
% \changes{v1.3n}{1995/10/29}{Empty \cs{@date} as well} |
| 1931 |
% \begin{macrocode} |
| 1932 |
\endgroup |
| 1933 |
\setcounter{footnote}{0}% |
| 1934 |
\global\let\thanks\relax |
| 1935 |
\global\let\maketitle\relax |
| 1936 |
\global\let\@maketitle\relax |
| 1937 |
\global\let\@thanks\@empty |
| 1938 |
\global\let\@author\@empty |
| 1939 |
\global\let\@date\@empty |
| 1940 |
\global\let\@title\@empty |
| 1941 |
\global\let\title\relax |
| 1942 |
\global\let\author\relax |
| 1943 |
\global\let\date\relax |
| 1944 |
\global\let\and\relax |
| 1945 |
} |
| 1946 |
% \end{macrocode} |
| 1947 |
% \end{macro} |
| 1948 |
% |
| 1949 |
% \begin{macro}{\@maketitle} |
| 1950 |
% This macro takes care of formatting the title information when we |
| 1951 |
% have no separate title page. |
| 1952 |
% |
| 1953 |
% We always start a new page, leave some white space and center the |
| 1954 |
% information. The title is set in a |\LARGE| font, the author |
| 1955 |
% names and the date in a |\large| font. |
| 1956 |
% \changes{v1.3o}{1995/11/02}{(CAR) Make \cs{footnote} always work in |
| 1957 |
% title, etc} |
| 1958 |
% \begin{macrocode} |
| 1959 |
\def\@maketitle{% |
| 1960 |
\newpage |
| 1961 |
\null |
| 1962 |
\vskip 2em% |
| 1963 |
\begin{center}% |
| 1964 |
\let \footnote \thanks |
| 1965 |
{\LARGE \@title \par}% |
| 1966 |
\vskip 1.5em% |
| 1967 |
{\large |
| 1968 |
\lineskip .5em% |
| 1969 |
\begin{tabular}[t]{c}% |
| 1970 |
\@author |
| 1971 |
\end{tabular}\par}% |
| 1972 |
\vskip 1em% |
| 1973 |
{\large \@date}% |
| 1974 |
\end{center}% |
| 1975 |
\par |
| 1976 |
\vskip 1.5em} |
| 1977 |
\fi |
| 1978 |
% \end{macrocode} |
| 1979 |
% \end{macro} |
| 1980 |
% |
| 1981 |
% \subsection{Chapters and Sections} |
| 1982 |
% |
| 1983 |
% \subsubsection{Building blocks} The definitions in this part of the |
| 1984 |
% class file make use of two internal macros, |\@startsection| and |
| 1985 |
% |\secdef|. To understand |
| 1986 |
% what is going on here, we describe their syntax. |
| 1987 |
% |
| 1988 |
% The macro |\@startsection| has 6 required arguments, optionally |
| 1989 |
% followed by a $*$, an optional argument and a required argument: |
| 1990 |
% |
| 1991 |
% |\@startsection|\meta{name}\meta{level}\meta{indent}^^A |
| 1992 |
% \meta{beforeskip}\meta{afterskip}\meta{style} |
| 1993 |
% optional *\\ |
| 1994 |
% \null\hphantom{\bslash @startsection}^^A |
| 1995 |
% |[|\meta{altheading}|]|\meta{heading} |
| 1996 |
% |
| 1997 |
% It is a generic command to start a section, the arguments have |
| 1998 |
% the following meaning: |
| 1999 |
% |
| 2000 |
% \begin{description} |
| 2001 |
% \item[\meta{name}] The name of the user level command, e.g., |
| 2002 |
% `section'. |
| 2003 |
% \item[\meta{level}] A number, denoting the depth of the section |
| 2004 |
% -- e.g., chapter=1, section = 2, etc. A section number |
| 2005 |
% will be printed if and only if \meta{level} $\leq$ the value |
| 2006 |
% of the \Lcount{secnumdepth} counter. |
| 2007 |
% \item[\meta{indent}] The indentation of the heading from the left |
| 2008 |
% margin |
| 2009 |
% \item[\meta{beforeskip}] The absolute value of this argument |
| 2010 |
% gives the skip to leave above the heading. If it is |
| 2011 |
% negative, then the paragraph indent of the text following |
| 2012 |
% the heading is suppressed. |
| 2013 |
% \item[\meta{afterskip}] If positive, this gives the skip to leave |
| 2014 |
% below the heading, else it gives the skip to leave to the |
| 2015 |
% right of a run-in heading. |
| 2016 |
% \item[\meta{style}] Commands to set the style of the heading. |
| 2017 |
% \item[$*$] When this is missing the heading is numbered and the |
| 2018 |
% corresponding counter is incremented. |
| 2019 |
% \item[\meta{altheading}] Gives an alternative heading to use in |
| 2020 |
% the table of contents and in the running heads. This should |
| 2021 |
% not be present when the $*$ form is used. |
| 2022 |
% \item[\meta{heading}] The heading of the new section. |
| 2023 |
% \end{description} |
| 2024 |
% A sectioning command is normally defined to |\@startsection| and |
| 2025 |
% its first six arguments. |
| 2026 |
% |
| 2027 |
% The macro |\secdef| can be used when a sectioning command is |
| 2028 |
% defined without using |\@startsection|. It has two arguments: |
| 2029 |
% |
| 2030 |
% |\secdef|\meta{unstarcmds}\meta{starcmds} |
| 2031 |
% |
| 2032 |
% \begin{description} |
| 2033 |
% \item[\meta{unstarcmds}] Used for the normal form of the |
| 2034 |
% sectioning command. |
| 2035 |
% \item[\meta{starcmds}] Used for the $*$-form of the |
| 2036 |
% sectioning command. |
| 2037 |
% \end{description} |
| 2038 |
% |
| 2039 |
% You can use |\secdef| as follows: |
| 2040 |
% \begin{verbatim} |
| 2041 |
% \def\chapter { ... \secdef \CMDA \CMDB } |
| 2042 |
% \def\CMDA [#1]#2{ ... } % Command to define |
| 2043 |
% % \chapter[...]{...} |
| 2044 |
% \def\CMDB #1{ ... } % Command to define |
| 2045 |
% % \chapter*{...} |
| 2046 |
% \end{verbatim} |
| 2047 |
% |
| 2048 |
% \subsubsection{Mark commands} |
| 2049 |
% |
| 2050 |
% \begin{macro}{\chaptermark} |
| 2051 |
% \begin{macro}{\sectionmark} |
| 2052 |
% \begin{macro}{\subsectionmark} |
| 2053 |
% \begin{macro}{\subsubsectionmark} |
| 2054 |
% \begin{macro}{\paragraphmark} |
| 2055 |
% \begin{macro}{\subparagraphmark} |
| 2056 |
% Default initializations of |\...mark| commands. These commands |
| 2057 |
% are used in the definition of the page styles (see |
| 2058 |
% section~\ref{sec:classes:pagestyle}) Most of them are already defined by |
| 2059 |
% the \LaTeX{} format, so they are only shown here. |
| 2060 |
% |
| 2061 |
% \begin{macrocode} |
| 2062 |
%<!article>\newcommand*\chaptermark[1]{} |
| 2063 |
% \newcommand*\sectionmark[1]{} |
| 2064 |
% \newcommand*\subsectionmark[1]{} |
| 2065 |
% \newcommand*\subsubsectionmark[1]{} |
| 2066 |
% \newcommand*\paragraphmark[1]{} |
| 2067 |
% \newcommand*\subparagraphmark[1]{} |
| 2068 |
% \end{macrocode} |
| 2069 |
% \end{macro} |
| 2070 |
% \end{macro} |
| 2071 |
% \end{macro} |
| 2072 |
% \end{macro} |
| 2073 |
% \end{macro} |
| 2074 |
% \end{macro} |
| 2075 |
% |
| 2076 |
% \subsubsection{Define Counters} |
| 2077 |
% |
| 2078 |
% \begin{macro}{\c@secnumdepth} |
| 2079 |
% The value of the counter \Lcount{secnumdepth} gives the depth of |
| 2080 |
% the highest-level sectioning command that is to produce section |
| 2081 |
% numbers. |
| 2082 |
% \begin{macrocode} |
| 2083 |
%<article>\setcounter{secnumdepth}{3} |
| 2084 |
%<!article>\setcounter{secnumdepth}{2} |
| 2085 |
% \end{macrocode} |
| 2086 |
% \end{macro} |
| 2087 |
% |
| 2088 |
% \begin{macro}{\c@part} |
| 2089 |
% \begin{macro}{\c@chapter} |
| 2090 |
% \begin{macro}{\c@section} |
| 2091 |
% \begin{macro}{\c@subsection} |
| 2092 |
% \begin{macro}{\c@subsubsection} |
| 2093 |
% \begin{macro}{\c@paragraph} |
| 2094 |
% \begin{macro}{\c@subparagraph} |
| 2095 |
% These counters are used for the section numbers. The macro\\ |
| 2096 |
% |\newcounter{|\meta{newctr}|}[|\meta{oldctr}|]|\\ |
| 2097 |
% defines\meta{newctr} to be a counter, which is reset to zero when |
| 2098 |
% counter \meta{oldctr} is stepped. Counter \meta{oldctr} must |
| 2099 |
% already be defined. |
| 2100 |
% |
| 2101 |
% \begin{macrocode} |
| 2102 |
\newcounter {part} |
| 2103 |
%<article>\newcounter {section} |
| 2104 |
%<*report|book> |
| 2105 |
\newcounter {chapter} |
| 2106 |
\newcounter {section}[chapter] |
| 2107 |
%</report|book> |
| 2108 |
\newcounter {subsection}[section] |
| 2109 |
\newcounter {subsubsection}[subsection] |
| 2110 |
\newcounter {paragraph}[subsubsection] |
| 2111 |
\newcounter {subparagraph}[paragraph] |
| 2112 |
% \end{macrocode} |
| 2113 |
% \end{macro} |
| 2114 |
% \end{macro} |
| 2115 |
% \end{macro} |
| 2116 |
% \end{macro} |
| 2117 |
% \end{macro} |
| 2118 |
% \end{macro} |
| 2119 |
% \end{macro} |
| 2120 |
% |
| 2121 |
% \begin{macro}{\thepart} |
| 2122 |
% \begin{macro}{\thechapter} |
| 2123 |
% \begin{macro}{\thesection} |
| 2124 |
% \begin{macro}{\thesubsection} |
| 2125 |
% \begin{macro}{\thesubsubsection} |
| 2126 |
% \begin{macro}{\theparagraph} |
| 2127 |
% \begin{macro}{\thesubparagraph} |
| 2128 |
% For any counter \Lcount{CTR}, |\theCTR| is a macro that defines |
| 2129 |
% the printed version of counter \Lcount{CTR}. It is defined in |
| 2130 |
% terms of the following macros: |
| 2131 |
% |
| 2132 |
% |\arabic{|\Lcount{COUNTER}|}| prints the value of |
| 2133 |
% \Lcount{COUNTER} as an arabic numeral. |
| 2134 |
% |
| 2135 |
% |\roman{|\Lcount{COUNTER}|}| prints the value of |
| 2136 |
% \Lcount{COUNTER} as a lowercase roman numeral. |
| 2137 |
% |
| 2138 |
% |\Roman{|\Lcount{COUNTER}|}| prints the value of |
| 2139 |
% \Lcount{COUNTER} as an uppercase roman numeral. |
| 2140 |
% |
| 2141 |
% |\alph{|\Lcount{COUNTER}|}| prints the value of \Lcount{COUNTER} |
| 2142 |
% as a lowercase letter: $1 =$~a, $2 =$~ b, etc. |
| 2143 |
% |
| 2144 |
% |\Alph{|\Lcount{COUNTER}|}| prints the value of \Lcount{COUNTER} |
| 2145 |
% as an uppercase letter: $1 =$~A, $2 =$~B, etc. |
| 2146 |
% |
| 2147 |
% Actually to save space the internal counter representations |
| 2148 |
% and the commands operating on those are used. |
| 2149 |
% \begin{macrocode} |
| 2150 |
\renewcommand \thepart {\@Roman\c@part} |
| 2151 |
%<article>\renewcommand \thesection {\@arabic\c@section} |
| 2152 |
%<*report|book> |
| 2153 |
\renewcommand \thechapter {\@arabic\c@chapter} |
| 2154 |
\renewcommand \thesection {\thechapter.\@arabic\c@section} |
| 2155 |
%</report|book> |
| 2156 |
\renewcommand\thesubsection {\thesection.\@arabic\c@subsection} |
| 2157 |
\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection} |
| 2158 |
\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} |
| 2159 |
\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} |
| 2160 |
% \end{macrocode} |
| 2161 |
% \end{macro} |
| 2162 |
% \end{macro} |
| 2163 |
% \end{macro} |
| 2164 |
% \end{macro} |
| 2165 |
% \end{macro} |
| 2166 |
% \end{macro} |
| 2167 |
% \end{macro} |
| 2168 |
% |
| 2169 |
% \begin{macro}{\@chapapp} |
| 2170 |
% |\@chapapp| is initially defined to be `|\chaptername|'. The |
| 2171 |
% |\appendix| command redefines it to be `|\appendixname|'. |
| 2172 |
% |
| 2173 |
% \begin{macrocode} |
| 2174 |
%<report|book>\newcommand\@chapapp{\chaptername} |
| 2175 |
% \end{macrocode} |
| 2176 |
% \end{macro} |
| 2177 |
% |
| 2178 |
% \subsubsection{Front Matter, Main Matter, and Back Matter} |
| 2179 |
% |
| 2180 |
% A book contains these three (logical) sections. The switch |
| 2181 |
% |\@mainmatter| is true iff we are processing Main Matter. When |
| 2182 |
% this switch is false, the |\chapter| command does not print |
| 2183 |
% chapter numbers. |
| 2184 |
% |
| 2185 |
% Here we define the commands that start these sections. |
| 2186 |
% \begin{macro}{\frontmatter} |
| 2187 |
% This command starts Roman page numbering and turns off chapter |
| 2188 |
% numbering. Since this restarts the page numbering from 1, it |
| 2189 |
% should also ensure that a recto page is used. |
| 2190 |
% \changes{v1.3r}{1996/05/26}{Make this command react to the option |
| 2191 |
% \texttt{openany}} |
| 2192 |
% \changes{v1.3y}{1998/05/05}{Two years on: Make this command not |
| 2193 |
% react to the option \texttt{openany} as this makes the |
| 2194 |
% verso/recto numbering wrong: see pr/2754 for discussion} |
| 2195 |
% \begin{macrocode} |
| 2196 |
%<*book> |
| 2197 |
\newcommand\frontmatter{% |
| 2198 |
% \if@openright |
| 2199 |
\cleardoublepage |
| 2200 |
% \else |
| 2201 |
% \clearpage |
| 2202 |
% \fi |
| 2203 |
\@mainmatterfalse |
| 2204 |
\pagenumbering{roman}} |
| 2205 |
% \end{macrocode} |
| 2206 |
% \end{macro} |
| 2207 |
% |
| 2208 |
% \begin{macro}{\mainmatter} |
| 2209 |
% This command clears the page, starts arabic page numbering and |
| 2210 |
% turns on chapter numbering. Since this restarts the page numbering |
| 2211 |
% from 1, it should also ensure that a recto page is used. |
| 2212 |
% \changes{v1.3r}{1996/05/26}{Make this command react to the option |
| 2213 |
% \texttt{openany}} |
| 2214 |
% \changes{v1.3y}{1998/05/05}{Two years on: Make this command not |
| 2215 |
% react to the option \texttt{openany} as this makes the |
| 2216 |
% verso/recto numbering wrong: see pr/2754 for discussion} |
| 2217 |
% \begin{macrocode} |
| 2218 |
\newcommand\mainmatter{% |
| 2219 |
% \if@openright |
| 2220 |
\cleardoublepage |
| 2221 |
% \else |
| 2222 |
% \clearpage |
| 2223 |
% \fi |
| 2224 |
\@mainmattertrue |
| 2225 |
\pagenumbering{arabic}} |
| 2226 |
% \end{macrocode} |
| 2227 |
% \end{macro} |
| 2228 |
% |
| 2229 |
% \begin{macro}{\backmatter} |
| 2230 |
% This clears the page, turns off chapter numbering and leaves page |
| 2231 |
% numbering unchanged. |
| 2232 |
% \begin{macrocode} |
| 2233 |
\newcommand\backmatter{% |
| 2234 |
\if@openright |
| 2235 |
\cleardoublepage |
| 2236 |
\else |
| 2237 |
\clearpage |
| 2238 |
\fi |
| 2239 |
\@mainmatterfalse} |
| 2240 |
%</book> |
| 2241 |
% \end{macrocode} |
| 2242 |
% \end{macro} |
| 2243 |
% |
| 2244 |
% \subsubsection{Parts} |
| 2245 |
% |
| 2246 |
% \begin{macro}{\part} |
| 2247 |
% The command to start a new part of our document. |
| 2248 |
% |
| 2249 |
% In the article class the definition of |\part| is rather simple; |
| 2250 |
% we start a new paragraph, add a little white space, suppress the |
| 2251 |
% indentation of the first paragraph and make use of |\secdef|. |
| 2252 |
% As in other sectioning commands (cf.\ |\@startsection| in the |
| 2253 |
% {\LaTeXe} kernel), we need to check the |@noskipsec| switch and |
| 2254 |
% force horizontal mode if it is set. |
| 2255 |
% \changes{v1.4a}{1999/01/07}{Check \texttt{@noskipsec} switch and |
| 2256 |
% possibly force horizontal mode; see PR/2889.} |
| 2257 |
% \begin{macrocode} |
| 2258 |
%<*article> |
| 2259 |
\newcommand\part{% |
| 2260 |
\if@noskipsec \leavevmode \fi |
| 2261 |
\par |
| 2262 |
\addvspace{4ex}% |
| 2263 |
\@afterindentfalse |
| 2264 |
\secdef\@part\@spart} |
| 2265 |
%</article> |
| 2266 |
% \end{macrocode} |
| 2267 |
% |
| 2268 |
% For the report and book classes we things a bit different. |
| 2269 |
% |
| 2270 |
% We start a new (righthand) page and use the \pstyle{plain} |
| 2271 |
% pagestyle. |
| 2272 |
% \changes{v1.3r}{1996/05/26}{Make this command react to the option |
| 2273 |
% \texttt{openany}} |
| 2274 |
% \begin{macrocode} |
| 2275 |
%<*report|book> |
| 2276 |
\newcommand\part{% |
| 2277 |
\if@openright |
| 2278 |
\cleardoublepage |
| 2279 |
\else |
| 2280 |
\clearpage |
| 2281 |
\fi |
| 2282 |
\thispagestyle{plain}% |
| 2283 |
% \end{macrocode} |
| 2284 |
% When we are making a two-column document, this will be a one |
| 2285 |
% column page. We use |@tempswa| to remember to switch back to two |
| 2286 |
% columns. |
| 2287 |
% \begin{macrocode} |
| 2288 |
\if@twocolumn |
| 2289 |
\onecolumn |
| 2290 |
\@tempswatrue |
| 2291 |
\else |
| 2292 |
\@tempswafalse |
| 2293 |
\fi |
| 2294 |
% \end{macrocode} |
| 2295 |
% We need an empty box to prevent the fil glue from disappearing. |
| 2296 |
% \changes{v1.3j}{1995/08/16}{Replace \cs{hbox} by \cs{null}} |
| 2297 |
% \begin{macrocode} |
| 2298 |
\null\vfil |
| 2299 |
% \end{macrocode} |
| 2300 |
% Here we use |\secdef| to indicate which commands to use to make |
| 2301 |
% the actual heading. |
| 2302 |
% \begin{macrocode} |
| 2303 |
\secdef\@part\@spart} |
| 2304 |
%</report|book> |
| 2305 |
% \end{macrocode} |
| 2306 |
% |
| 2307 |
% \begin{macro}{\@part} |
| 2308 |
% This macro does the actual formatting of the title of the part. |
| 2309 |
% Again the macro is differently defined for the article document |
| 2310 |
% class than for the document classes report and book. |
| 2311 |
|
| 2312 |
% When \Lcount{secnumdepth} is larger than $-1$ for the |
| 2313 |
% document class article, we have a numbered |
| 2314 |
% part, otherwise it is unnumbered. |
| 2315 |
% \begin{macrocode} |
| 2316 |
%<*article> |
| 2317 |
\def\@part[#1]#2{% |
| 2318 |
\ifnum \c@secnumdepth >\m@ne |
| 2319 |
\refstepcounter{part}% |
| 2320 |
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% |
| 2321 |
\else |
| 2322 |
\addcontentsline{toc}{part}{#1}% |
| 2323 |
\fi |
| 2324 |
% \end{macrocode} |
| 2325 |
% We print the title flush left in the article class. |
| 2326 |
% Also we prevent breaking between lines and reset the font. |
| 2327 |
% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with |
| 2328 |
% \cs{normalfont}} |
| 2329 |
% \begin{macrocode} |
| 2330 |
{\parindent \z@ \raggedright |
| 2331 |
\interlinepenalty \@M |
| 2332 |
\normalfont |
| 2333 |
% \end{macrocode} |
| 2334 |
% When this is a numbered part we have to print the number and the |
| 2335 |
% title. The |\nobreak| should prevent a page break here. |
| 2336 |
% \changes{v1.4e}{2001/05/24}{Replaced tilde with \cs{nobreakspace} |
| 2337 |
% (pr/3310)} |
| 2338 |
% \begin{macrocode} |
| 2339 |
\ifnum \c@secnumdepth >\m@ne |
| 2340 |
\Large\bfseries \partname\nobreakspace\thepart |
| 2341 |
\par\nobreak |
| 2342 |
\fi |
| 2343 |
\huge \bfseries #2% |
| 2344 |
% \end{macrocode} |
| 2345 |
% Now we empty the mark registers, leave some white space and let |
| 2346 |
% |\@afterheading| take care of suppressing the indentation. |
| 2347 |
% \begin{macrocode} |
| 2348 |
\markboth{}{}\par}% |
| 2349 |
\nobreak |
| 2350 |
\vskip 3ex |
| 2351 |
\@afterheading} |
| 2352 |
%</article> |
| 2353 |
% \end{macrocode} |
| 2354 |
% |
| 2355 |
% When \Lcount{secnumdepth} is larger than $-2$ for the |
| 2356 |
% document class report and book, we have a numbered |
| 2357 |
% part, otherwise it is unnumbered. |
| 2358 |
% \begin{macrocode} |
| 2359 |
%<*report|book> |
| 2360 |
\def\@part[#1]#2{% |
| 2361 |
\ifnum \c@secnumdepth >-2\relax |
| 2362 |
\refstepcounter{part}% |
| 2363 |
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% |
| 2364 |
\else |
| 2365 |
\addcontentsline{toc}{part}{#1}% |
| 2366 |
\fi |
| 2367 |
% \end{macrocode} |
| 2368 |
% We empty the mark registers and center the title on the page in the |
| 2369 |
% report and book document classes. |
| 2370 |
% Also we prevent breaking between lines and reset the font. |
| 2371 |
% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with |
| 2372 |
% \cs{normalfont}} |
| 2373 |
% \changes{v1.3j}{1995/08/16}{add missing percent} |
| 2374 |
% \begin{macrocode} |
| 2375 |
\markboth{}{}% |
| 2376 |
{\centering |
| 2377 |
\interlinepenalty \@M |
| 2378 |
\normalfont |
| 2379 |
% \end{macrocode} |
| 2380 |
% When this is a numbered part we have to print the number. |
| 2381 |
% \changes{v1.4e}{2001/05/24}{Replaced tilde with \cs{nobreakspace} |
| 2382 |
% (pr/3310)} |
| 2383 |
% \begin{macrocode} |
| 2384 |
\ifnum \c@secnumdepth >-2\relax |
| 2385 |
\huge\bfseries \partname\nobreakspace\thepart |
| 2386 |
\par |
| 2387 |
% \end{macrocode} |
| 2388 |
% We leave some space before we print the title and leave the |
| 2389 |
% finishing up to |\@endpart|. |
| 2390 |
% \begin{macrocode} |
| 2391 |
\vskip 20\p@ |
| 2392 |
\fi |
| 2393 |
\Huge \bfseries #2\par}% |
| 2394 |
\@endpart} |
| 2395 |
%</report|book> |
| 2396 |
% \end{macrocode} |
| 2397 |
% \end{macro} |
| 2398 |
% |
| 2399 |
% \begin{macro}{\@spart} |
| 2400 |
% This macro does the actual formatting of the title of the part |
| 2401 |
% when the star form of the user command was used. In this case we |
| 2402 |
% \emph{never} print a number. Otherwise the formatting is the |
| 2403 |
% same. |
| 2404 |
% |
| 2405 |
% The differences between the definition of this macro in the |
| 2406 |
% article document class and in the report and book document |
| 2407 |
% classes are similar as they were for |\@part|. |
| 2408 |
% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with |
| 2409 |
% \cs{normalfont}} |
| 2410 |
% \begin{macrocode} |
| 2411 |
%<*article> |
| 2412 |
\def\@spart#1{% |
| 2413 |
{\parindent \z@ \raggedright |
| 2414 |
\interlinepenalty \@M |
| 2415 |
\normalfont |
| 2416 |
\huge \bfseries #1\par}% |
| 2417 |
\nobreak |
| 2418 |
\vskip 3ex |
| 2419 |
\@afterheading} |
| 2420 |
%</article> |
| 2421 |
%<*report|book> |
| 2422 |
\def\@spart#1{% |
| 2423 |
{\centering |
| 2424 |
\interlinepenalty \@M |
| 2425 |
\normalfont |
| 2426 |
\Huge \bfseries #1\par}% |
| 2427 |
\@endpart} |
| 2428 |
%</report|book> |
| 2429 |
% \end{macrocode} |
| 2430 |
% \end{macro} |
| 2431 |
% |
| 2432 |
% \begin{macro}{\@endpart} |
| 2433 |
% \changes{v1.3j}{1995/08/16}{move docstrip guard to avoid defining |
| 2434 |
% \cs{@endpart} in article} |
| 2435 |
% This macro finishes the part page, for both |\@part| and |
| 2436 |
% |\@spart|. |
| 2437 |
% |
| 2438 |
% First we fill the current page. |
| 2439 |
% \begin{macrocode} |
| 2440 |
%<*report|book> |
| 2441 |
\def\@endpart{\vfil\newpage |
| 2442 |
% \end{macrocode} |
| 2443 |
% Then, when we are in twosided mode and chapters are supposed to |
| 2444 |
% be on right hand sides, we produce a completely blank page. |
| 2445 |
% \changes{v1.4b}{2000/05/19}{Only add empty page after part if |
| 2446 |
% twoside and openright (pr/3155)} |
| 2447 |
% \begin{macrocode} |
| 2448 |
\if@twoside |
| 2449 |
\if@openright |
| 2450 |
\null |
| 2451 |
\thispagestyle{empty}% |
| 2452 |
\newpage |
| 2453 |
\fi |
| 2454 |
\fi |
| 2455 |
% \end{macrocode} |
| 2456 |
% When this was a two-column document we have to switch back to |
| 2457 |
% two-column mode. |
| 2458 |
% \begin{macrocode} |
| 2459 |
\if@tempswa |
| 2460 |
\twocolumn |
| 2461 |
\fi} |
| 2462 |
%</report|book> |
| 2463 |
% \end{macrocode} |
| 2464 |
% \end{macro} |
| 2465 |
% \end{macro} |
| 2466 |
% |
| 2467 |
% \subsubsection{Chapters} |
| 2468 |
% |
| 2469 |
% \begin{macro}{\chapter} |
| 2470 |
% A chapter should always start on a new page therefore we start by |
| 2471 |
% calling |\clearpage| and setting the pagestyle for this page to |
| 2472 |
% \pstyle{plain}. |
| 2473 |
% \begin{macrocode} |
| 2474 |
%<*report|book> |
| 2475 |
\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi |
| 2476 |
\thispagestyle{plain}% |
| 2477 |
% \end{macrocode} |
| 2478 |
% Then we prevent floats from appearing at the top of this page |
| 2479 |
% because it looks weird to see a floating object above a chapter |
| 2480 |
% title. |
| 2481 |
% \begin{macrocode} |
| 2482 |
\global\@topnum\z@ |
| 2483 |
% \end{macrocode} |
| 2484 |
% Then we suppress the indentation of the first paragraph by |
| 2485 |
% setting the switch |\@afterindent| to |false|. We use |\secdef| |
| 2486 |
% to specify the macros to use for actually setting the chapter |
| 2487 |
% title. |
| 2488 |
% \begin{macrocode} |
| 2489 |
\@afterindentfalse |
| 2490 |
\secdef\@chapter\@schapter} |
| 2491 |
% \end{macrocode} |
| 2492 |
% |
| 2493 |
% \begin{macro}{\@chapter} |
| 2494 |
% This macro is called when we have a numbered chapter. When |
| 2495 |
% \Lcount{secnumdepth} is larger than $-1$ and, in the book |
| 2496 |
% class, |\@mainmatter| is true, we display the chapter |
| 2497 |
% number. We also inform the user that a new chapter is about to be |
| 2498 |
% typeset by writing a message to the terminal. |
| 2499 |
% \begin{macrocode} |
| 2500 |
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne |
| 2501 |
%<book> \if@mainmatter |
| 2502 |
\refstepcounter{chapter}% |
| 2503 |
\typeout{\@chapapp\space\thechapter.}% |
| 2504 |
\addcontentsline{toc}{chapter}% |
| 2505 |
{\protect\numberline{\thechapter}#1}% |
| 2506 |
%<*book> |
| 2507 |
\else |
| 2508 |
\addcontentsline{toc}{chapter}{#1}% |
| 2509 |
\fi |
| 2510 |
%</book> |
| 2511 |
\else |
| 2512 |
\addcontentsline{toc}{chapter}{#1}% |
| 2513 |
\fi |
| 2514 |
% \end{macrocode} |
| 2515 |
% After having written an entry to the table of contents we store |
| 2516 |
% the (alternative) title of this chapter with |\chaptermark| and |
| 2517 |
% add some white space to the lists of figures and tables. |
| 2518 |
% \begin{macrocode} |
| 2519 |
\chaptermark{#1}% |
| 2520 |
\addtocontents{lof}{\protect\addvspace{10\p@}}% |
| 2521 |
\addtocontents{lot}{\protect\addvspace{10\p@}}% |
| 2522 |
% \end{macrocode} |
| 2523 |
% Then we call upon |\@makechapterhead| to format the actual |
| 2524 |
% chapter title. We have to do this in a special way when we are in |
| 2525 |
% two-column mode in order to have the chapter title use the entire |
| 2526 |
% |\textwidth|. In one-column mode we call |\@afterheading| which |
| 2527 |
% takes care of suppressing the indentation. |
| 2528 |
% \begin{macrocode} |
| 2529 |
\if@twocolumn |
| 2530 |
\@topnewpage[\@makechapterhead{#2}]% |
| 2531 |
\else |
| 2532 |
\@makechapterhead{#2}% |
| 2533 |
\@afterheading |
| 2534 |
\fi} |
| 2535 |
% \end{macrocode} |
| 2536 |
% |
| 2537 |
% \begin{macro}{\@makechapterhead} |
| 2538 |
% The macro above uses |\@makechapterhead|\meta{text} to format the |
| 2539 |
% heading of the chapter. |
| 2540 |
% |
| 2541 |
% We begin by leaving some white space. Then we open a group in |
| 2542 |
% which we have a paragraph indent of 0pt, and in which we have the |
| 2543 |
% text set ragged right. We also reset the font. |
| 2544 |
% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with |
| 2545 |
% \cs{normalfont}} |
| 2546 |
% \begin{macrocode} |
| 2547 |
\def\@makechapterhead#1{% |
| 2548 |
\vspace*{50\p@}% |
| 2549 |
{\parindent \z@ \raggedright \normalfont |
| 2550 |
% \end{macrocode} |
| 2551 |
% Then we check whether the number of the chapter has to be printed. |
| 2552 |
% If so we leave some whitespace between the chapternumber and its |
| 2553 |
% title. |
| 2554 |
% \changes{v1.2v}{1994/11/30}{Added a \cs{nobreak} to prevent a |
| 2555 |
% pagebreak between the chapternumber and the chaptertitle} |
| 2556 |
% \changes{v1.3j}{1995/08/16}{replace braces by \cs{space}} |
| 2557 |
% \begin{macrocode} |
| 2558 |
\ifnum \c@secnumdepth >\m@ne |
| 2559 |
%<book> \if@mainmatter |
| 2560 |
\huge\bfseries \@chapapp\space \thechapter |
| 2561 |
\par\nobreak |
| 2562 |
\vskip 20\p@ |
| 2563 |
%<book> \fi |
| 2564 |
\fi |
| 2565 |
% \end{macrocode} |
| 2566 |
% Now we set the title in a large bold font. We prevent a pagebreak |
| 2567 |
% from occurring in the middle of or after the title. Finally we |
| 2568 |
% leave some whitespace before the text begins. |
| 2569 |
% \changes{v1.2v}{1994/11/30}{Added \cs{interlinepenalty}\cs{@M} to |
| 2570 |
% prevent a pagebreak in the middle of a title} |
| 2571 |
% \begin{macrocode} |
| 2572 |
\interlinepenalty\@M |
| 2573 |
\Huge \bfseries #1\par\nobreak |
| 2574 |
\vskip 40\p@ |
| 2575 |
}} |
| 2576 |
% \end{macrocode} |
| 2577 |
% \end{macro} |
| 2578 |
% \end{macro} |
| 2579 |
% |
| 2580 |
% \begin{macro}{\@schapter} |
| 2581 |
% This macro is called when we have an unnumbered chapter. It is |
| 2582 |
% much simpler than |\@chapter| because it only needs to typeset |
| 2583 |
% the chapter title. |
| 2584 |
% \begin{macrocode} |
| 2585 |
\def\@schapter#1{\if@twocolumn |
| 2586 |
\@topnewpage[\@makeschapterhead{#1}]% |
| 2587 |
\else |
| 2588 |
\@makeschapterhead{#1}% |
| 2589 |
\@afterheading |
| 2590 |
\fi} |
| 2591 |
% \end{macrocode} |
| 2592 |
% |
| 2593 |
% \begin{macro}{\@makeschapterhead} |
| 2594 |
% The macro above uses |\@makeschapterhead|\meta{text}to format |
| 2595 |
% the heading of the chapter. It is similar to |\@makechapterhead| |
| 2596 |
% except that it never has to print a chapter number. |
| 2597 |
% |
| 2598 |
% \changes{v1.2v}{1994/11/30}{Added \cs{interlinepenalty}\cs{@M} to |
| 2599 |
% prevent a pagebreak in the middle of a title} |
| 2600 |
% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with |
| 2601 |
% \cs{normalfont}} |
| 2602 |
% \begin{macrocode} |
| 2603 |
\def\@makeschapterhead#1{% |
| 2604 |
\vspace*{50\p@}% |
| 2605 |
{\parindent \z@ \raggedright |
| 2606 |
\normalfont |
| 2607 |
\interlinepenalty\@M |
| 2608 |
\Huge \bfseries #1\par\nobreak |
| 2609 |
\vskip 40\p@ |
| 2610 |
}} |
| 2611 |
%</report|book> |
| 2612 |
% \end{macrocode} |
| 2613 |
% \end{macro} |
| 2614 |
% \end{macro} |
| 2615 |
% \end{macro} |
| 2616 |
% |
| 2617 |
% |
| 2618 |
% \subsubsection{Lower level headings} |
| 2619 |
% |
| 2620 |
% These commands all make use of |\@startsection|. |
| 2621 |
% \begin{macro}{\section} |
| 2622 |
% This gives a normal heading with white space above and below the |
| 2623 |
% heading, the title set in |\Large\bfseries|, and no indentation |
| 2624 |
% on the first paragraph. |
| 2625 |
% \changes{v1.3c}{1995/05/25}{replace \cs{reset@font} with |
| 2626 |
% \cs{normalfont}} |
| 2627 |
% \begin{macrocode} |
| 2628 |
\newcommand\section{\@startsection {section}{1}{\z@}% |
| 2629 |
{-3.5ex \@plus -1ex \@minus -.2ex}% |
| 2630 |
{2.3ex \@plus.2ex}% |
| 2631 |
{\normalfont\Large\bfseries}} |
| 2632 |
% \end{macrocode} |
| 2633 |
% \end{macro} |
| 2634 |
% |
| 2635 |
% \begin{macro}{\subsection} |
| 2636 |
% This gives a normal heading with white space above and below the |
| 2637 |
% heading, the title set in |\large\bfseries|, and no indentation |
| 2638 |
% on the first paragraph. |
| 2639 |
% \begin{macrocode} |
| 2640 |
\newcommand\subsection{\@startsection{subsection}{2}{\z@}% |
| 2641 |
{-3.25ex\@plus -1ex \@minus -.2ex}% |
| 2642 |
{1.5ex \@plus .2ex}% |
| 2643 |
{\normalfont\large\bfseries}} |
| 2644 |
% \end{macrocode} |
| 2645 |
% \end{macro} |
| 2646 |
% |
| 2647 |
% \begin{macro}{\subsubsection} |
| 2648 |
% This gives a normal heading with white space above and below the |
| 2649 |
% heading, the title set in |\normalsize\bfseries|, and no |
| 2650 |
% indentation on the first paragraph. |
| 2651 |
% \begin{macrocode} |
| 2652 |
\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% |
| 2653 |
{-3.25ex\@plus -1ex \@minus -.2ex}% |
| 2654 |
{1.5ex \@plus .2ex}% |
| 2655 |
{\normalfont\normalsize\bfseries}} |
| 2656 |
% \end{macrocode} |
| 2657 |
% \end{macro} |
| 2658 |
% |
| 2659 |
% \begin{macro}{\paragraph} |
| 2660 |
% This gives a run-in heading with white space above and to the |
| 2661 |
% right of the heading, the title set in |\normalsize\bfseries|. |
| 2662 |
% \begin{macrocode} |
| 2663 |
\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% |
| 2664 |
{3.25ex \@plus1ex \@minus.2ex}% |
| 2665 |
{-1em}% |
| 2666 |
{\normalfont\normalsize\bfseries}} |
| 2667 |
% \end{macrocode} |
| 2668 |
% \end{macro} |
| 2669 |
% |
| 2670 |
% \begin{macro}{\subparagraph} |
| 2671 |
% This gives an indented run-in heading with white space above and |
| 2672 |
% to the right of the heading, the title set in |
| 2673 |
% |\normalsize\bfseries|. |
| 2674 |
% \begin{macrocode} |
| 2675 |
\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% |
| 2676 |
{3.25ex \@plus1ex \@minus .2ex}% |
| 2677 |
{-1em}% |
| 2678 |
{\normalfont\normalsize\bfseries}} |
| 2679 |
% \end{macrocode} |
| 2680 |
% \end{macro} |
| 2681 |
% |
| 2682 |
% \subsection{Lists} |
| 2683 |
% |
| 2684 |
% \subsubsection{General List Parameters} |
| 2685 |
% |
| 2686 |
% The following commands are used to set the default values for the list |
| 2687 |
% environment's parameters. See the \LaTeX{} manual for an explanation |
| 2688 |
% of the meanings of the parameters. Defaults for the list |
| 2689 |
% environment are set as follows. First, |\rightmargin|, |
| 2690 |
% |\listparindent| and |\itemindent| are set to 0pt. Then, for a Kth |
| 2691 |
% level list, the command |\@listK| is called, where `K' denotes `i', |
| 2692 |
% '`i', ... , `vi'. (I.e., |\@listiii| is called for a third-level |
| 2693 |
% list.) By convention, |\@listK| should set |\leftmargin| to |
| 2694 |
% |\leftmarginK|. |
| 2695 |
% |
| 2696 |
% \begin{macro}{\leftmargin} |
| 2697 |
% \begin{macro}{\leftmargini} |
| 2698 |
% \begin{macro}{\leftmarginii} |
| 2699 |
% \begin{macro}{\leftmarginiii} |
| 2700 |
% \begin{macro}{\leftmarginiv} |
| 2701 |
% \begin{macro}{\leftmarginv} |
| 2702 |
% \begin{macro}{\leftmarginvi} |
| 2703 |
% \changes{v1.0m}{1994/01/12}{Use em instead of pt to remain |
| 2704 |
% compatible with old styles} |
| 2705 |
% \changes{v1.3q}{1995/12/20}{Temporary(?) fix: revert to setting |
| 2706 |
% \cs{leftmargin} at outer level} |
| 2707 |
% |
| 2708 |
% When we are in two-column mode some of the margins are set somewhat |
| 2709 |
% smaller. |
| 2710 |
% \begin{macrocode} |
| 2711 |
\if@twocolumn |
| 2712 |
\setlength\leftmargini {2em} |
| 2713 |
\else |
| 2714 |
\setlength\leftmargini {2.5em} |
| 2715 |
\fi |
| 2716 |
% \end{macrocode} |
| 2717 |
% Until the whole of the parameter setting in these files is |
| 2718 |
% rationalised, we need to set the value of |\leftmargin| at this |
| 2719 |
% outer level. |
| 2720 |
% \begin{macrocode} |
| 2721 |
\leftmargin \leftmargini |
| 2722 |
% \end{macrocode} |
| 2723 |
% The following three are calculated so that they are larger than |
| 2724 |
% the sum of |\labelsep| and the width of the default labels (which |
| 2725 |
% are `(m)', `vii.' and `M.'). |
| 2726 |
% \begin{macrocode} |
| 2727 |
\setlength\leftmarginii {2.2em} |
| 2728 |
\setlength\leftmarginiii {1.87em} |
| 2729 |
\setlength\leftmarginiv {1.7em} |
| 2730 |
\if@twocolumn |
| 2731 |
\setlength\leftmarginv {.5em} |
| 2732 |
\setlength\leftmarginvi {.5em} |
| 2733 |
\else |
| 2734 |
\setlength\leftmarginv {1em} |
| 2735 |
\setlength\leftmarginvi {1em} |
| 2736 |
\fi |
| 2737 |
% \end{macrocode} |
| 2738 |
% \end{macro} |
| 2739 |
% \end{macro} |
| 2740 |
% \end{macro} |
| 2741 |
% \end{macro} |
| 2742 |
% \end{macro} |
| 2743 |
% \end{macro} |
| 2744 |
% \end{macro} |
| 2745 |
% |
| 2746 |
% \begin{macro}{\labelsep} |
| 2747 |
% \begin{macro}{\labelwidth} |
| 2748 |
% \changes{v1.0m}{1994/01/12}{Use em instead of pt to remain |
| 2749 |
% compatible with old styles} |
| 2750 |
% |\labelsep| is the distance between the label and the text of an |
| 2751 |
% item; |\labelwidth| is the width of the label. |
| 2752 |
% \begin{macrocode} |
| 2753 |
\setlength \labelsep {.5em} |
| 2754 |
\setlength \labelwidth{\leftmargini} |
| 2755 |
\addtolength\labelwidth{-\labelsep} |
| 2756 |
% \end{macrocode} |
| 2757 |
% \end{macro} |
| 2758 |
% \end{macro} |
| 2759 |
% |
| 2760 |
% \begin{macro}{\partopsep} |
| 2761 |
% When the user leaves a blank line before the environment an extra |
| 2762 |
% vertical space of |\partopsep| is inserted, in addition to |
| 2763 |
% |\parskip| and |\topsep|. |
| 2764 |
% \changes{v1.0m}{1994/01/12}{\cs{partopsep} should be different, |
| 2765 |
% depending on the pointsize} |
| 2766 |
% \begin{macrocode} |
| 2767 |
%</article|report|book> |
| 2768 |
%<10pt>\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@} |
| 2769 |
%<11pt>\setlength\partopsep{3\p@ \@plus 1\p@ \@minus 1\p@} |
| 2770 |
%<12pt>\setlength\partopsep{3\p@ \@plus 2\p@ \@minus 2\p@} |
| 2771 |
% \end{macrocode} |
| 2772 |
% \end{macro} |
| 2773 |
% |
| 2774 |
% \begin{macro}{\@beginparpenalty} |
| 2775 |
% \begin{macro}{\@endparpenalty} |
| 2776 |
% These penalties are inserted before and after a list or paragraph |
| 2777 |
% environment. They are set to a bonus value to encourage page |
| 2778 |
% breaking at these points. |
| 2779 |
% \begin{macro}{\@itempenalty} |
| 2780 |
% This penalty is inserted between list items. |
| 2781 |
% \begin{macrocode} |
| 2782 |
%<*article|report|book> |
| 2783 |
\@beginparpenalty -\@lowpenalty |
| 2784 |
\@endparpenalty -\@lowpenalty |
| 2785 |
\@itempenalty -\@lowpenalty |
| 2786 |
%</article|report|book> |
| 2787 |
% \end{macrocode} |
| 2788 |
% \end{macro} |
| 2789 |
% \end{macro} |
| 2790 |
% \end{macro} |
| 2791 |
% |
| 2792 |
% \begin{macro}{\@listi} |
| 2793 |
% \begin{macro}{\@listI} |
| 2794 |
% |\@listi| defines the values of |
| 2795 |
% |\leftmargin|, |\parsep|, |\topsep|, |\itemsep|, etc.\ for the |
| 2796 |
% lists that appear on top-level. Its definition is modified by the |
| 2797 |
% font-size commands (eg within |\small| the list parameters get |
| 2798 |
% ``smaller'' values). |
| 2799 |
% |
| 2800 |
% For this reason \@listI is defined to hold a saved copy of \@listi |
| 2801 |
% so that |\normalsize| can switch all parameters back. |
| 2802 |
% |
| 2803 |
% \begin{macrocode} |
| 2804 |
%<*10pt|11pt|12pt> |
| 2805 |
\def\@listi{\leftmargin\leftmargini |
| 2806 |
%<*10pt> |
| 2807 |
\parsep 4\p@ \@plus2\p@ \@minus\p@ |
| 2808 |
\topsep 8\p@ \@plus2\p@ \@minus4\p@ |
| 2809 |
\itemsep4\p@ \@plus2\p@ \@minus\p@} |
| 2810 |
%</10pt> |
| 2811 |
%<*11pt> |
| 2812 |
\parsep 4.5\p@ \@plus2\p@ \@minus\p@ |
| 2813 |
\topsep 9\p@ \@plus3\p@ \@minus5\p@ |
| 2814 |
\itemsep4.5\p@ \@plus2\p@ \@minus\p@} |
| 2815 |
%</11pt> |
| 2816 |
%<*12pt> |
| 2817 |
\parsep 5\p@ \@plus2.5\p@ \@minus\p@ |
| 2818 |
\topsep 10\p@ \@plus4\p@ \@minus6\p@ |
| 2819 |
\itemsep5\p@ \@plus2.5\p@ \@minus\p@} |
| 2820 |
%</12pt> |
| 2821 |
\let\@listI\@listi |
| 2822 |
% \end{macrocode} |
| 2823 |
% We initialise the parameters although strictly speaking that |
| 2824 |
% is not necessary. |
| 2825 |
% \begin{macrocode} |
| 2826 |
\@listi |
| 2827 |
% \end{macrocode} |
| 2828 |
% \end{macro} |
| 2829 |
% \end{macro} |
| 2830 |
% |
| 2831 |
% \begin{macro}{\@listii} |
| 2832 |
% \begin{macro}{\@listiii} |
| 2833 |
% \begin{macro}{\@listiv} |
| 2834 |
% \begin{macro}{\@listv} |
| 2835 |
% \begin{macro}{\@listvi} |
| 2836 |
% Here are the same macros for the higher level lists. Note that |
| 2837 |
% they don't have saved versions and are not modified by the font |
| 2838 |
% size commands. In other words this class assumes that nested |
| 2839 |
% lists only appear in |\normalsize|, i.e.\ the main document size. |
| 2840 |
% \begin{macrocode} |
| 2841 |
\def\@listii {\leftmargin\leftmarginii |
| 2842 |
\labelwidth\leftmarginii |
| 2843 |
\advance\labelwidth-\labelsep |
| 2844 |
%<*10pt> |
| 2845 |
\topsep 4\p@ \@plus2\p@ \@minus\p@ |
| 2846 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 2847 |
%</10pt> |
| 2848 |
%<*11pt> |
| 2849 |
\topsep 4.5\p@ \@plus2\p@ \@minus\p@ |
| 2850 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 2851 |
%</11pt> |
| 2852 |
%<*12pt> |
| 2853 |
\topsep 5\p@ \@plus2.5\p@ \@minus\p@ |
| 2854 |
\parsep 2.5\p@ \@plus\p@ \@minus\p@ |
| 2855 |
%</12pt> |
| 2856 |
\itemsep \parsep} |
| 2857 |
\def\@listiii{\leftmargin\leftmarginiii |
| 2858 |
\labelwidth\leftmarginiii |
| 2859 |
\advance\labelwidth-\labelsep |
| 2860 |
%<10pt> \topsep 2\p@ \@plus\p@\@minus\p@ |
| 2861 |
%<11pt> \topsep 2\p@ \@plus\p@\@minus\p@ |
| 2862 |
%<12pt> \topsep 2.5\p@\@plus\p@\@minus\p@ |
| 2863 |
\parsep \z@ |
| 2864 |
\partopsep \p@ \@plus\z@ \@minus\p@ |
| 2865 |
\itemsep \topsep} |
| 2866 |
\def\@listiv {\leftmargin\leftmarginiv |
| 2867 |
\labelwidth\leftmarginiv |
| 2868 |
\advance\labelwidth-\labelsep} |
| 2869 |
\def\@listv {\leftmargin\leftmarginv |
| 2870 |
\labelwidth\leftmarginv |
| 2871 |
\advance\labelwidth-\labelsep} |
| 2872 |
\def\@listvi {\leftmargin\leftmarginvi |
| 2873 |
\labelwidth\leftmarginvi |
| 2874 |
\advance\labelwidth-\labelsep} |
| 2875 |
%</10pt|11pt|12pt> |
| 2876 |
% \end{macrocode} |
| 2877 |
% \end{macro} |
| 2878 |
% \end{macro} |
| 2879 |
% \end{macro} |
| 2880 |
% \end{macro} |
| 2881 |
% \end{macro} |
| 2882 |
% |
| 2883 |
% \subsubsection{Enumerate} |
| 2884 |
% |
| 2885 |
% The enumerate environment uses four counters: \Lcount{enumi}, |
| 2886 |
% \Lcount{enumii}, \Lcount{enumiii} and \Lcount{enumiv}, where |
| 2887 |
% \Lcount{enumN} controls the numbering of the Nth level |
| 2888 |
% enumeration. |
| 2889 |
% |
| 2890 |
% \begin{macro}{\theenumi} |
| 2891 |
% \begin{macro}{\theenumii} |
| 2892 |
% \begin{macro}{\theenumiii} |
| 2893 |
% \begin{macro}{\theenumiv} |
| 2894 |
% The counters are already defined in the \LaTeX{} format, but their |
| 2895 |
% representation is changed here. |
| 2896 |
% |
| 2897 |
% \begin{macrocode} |
| 2898 |
%<*article|report|book> |
| 2899 |
\renewcommand\theenumi{\@arabic\c@enumi} |
| 2900 |
\renewcommand\theenumii{\@alph\c@enumii} |
| 2901 |
\renewcommand\theenumiii{\@roman\c@enumiii} |
| 2902 |
\renewcommand\theenumiv{\@Alph\c@enumiv} |
| 2903 |
% \end{macrocode} |
| 2904 |
% \end{macro} |
| 2905 |
% \end{macro} |
| 2906 |
% \end{macro} |
| 2907 |
% \end{macro} |
| 2908 |
% |
| 2909 |
% \begin{macro}{\labelenumi} |
| 2910 |
% \begin{macro}{\labelenumii} |
| 2911 |
% \begin{macro}{\labelenumiii} |
| 2912 |
% \begin{macro}{\labelenumiv} |
| 2913 |
% The label for each item is generated by the commands\\ |
| 2914 |
% |\labelenumi| \ldots\ |\labelenumiv|. |
| 2915 |
% \begin{macrocode} |
| 2916 |
\newcommand\labelenumi{\theenumi.} |
| 2917 |
\newcommand\labelenumii{(\theenumii)} |
| 2918 |
\newcommand\labelenumiii{\theenumiii.} |
| 2919 |
\newcommand\labelenumiv{\theenumiv.} |
| 2920 |
% \end{macrocode} |
| 2921 |
% \end{macro} |
| 2922 |
% \end{macro} |
| 2923 |
% \end{macro} |
| 2924 |
% \end{macro} |
| 2925 |
% |
| 2926 |
% \begin{macro}{\p@enumii} |
| 2927 |
% \begin{macro}{\p@enumiii} |
| 2928 |
% \begin{macro}{\p@enumiv} |
| 2929 |
% The expansion of |\p@enumN||\theenumN| defines the output of a |
| 2930 |
% |\ref| command when referencing an item of the Nth level of an |
| 2931 |
% enumerated list. |
| 2932 |
% \begin{macrocode} |
| 2933 |
\renewcommand\p@enumii{\theenumi} |
| 2934 |
\renewcommand\p@enumiii{\theenumi(\theenumii)} |
| 2935 |
\renewcommand\p@enumiv{\p@enumiii\theenumiii} |
| 2936 |
% \end{macrocode} |
| 2937 |
% \end{macro} |
| 2938 |
% \end{macro} |
| 2939 |
% \end{macro} |
| 2940 |
% |
| 2941 |
% \subsubsection{Itemize} |
| 2942 |
% |
| 2943 |
% \begin{macro}{\labelitemi} |
| 2944 |
% \begin{macro}{\labelitemii} |
| 2945 |
% \changes{v1.2k}{1994/05/06}{Inserted \cs{normalfont}} |
| 2946 |
% \changes{v1.3s}{1996/08/24}{Replaced -{}- with \cs{textendash}} |
| 2947 |
% \changes{v1.3u}{1996/10/31}{Changed to \cs{textbullet}, |
| 2948 |
% \cs{textasteriskcentered} and \cs{textperiodcentered}} |
| 2949 |
% \begin{macro}{\labelitemiii} |
| 2950 |
% \begin{macro}{\labelitemiv} |
| 2951 |
% Itemization is controlled by four commands: |\labelitemi|, |
| 2952 |
% |\labelitemii|, |\labelitemiii|, and |\labelitemiv|, which define |
| 2953 |
% the labels of the various itemization levels: the symbols used are |
| 2954 |
% bullet, bold en-dash, centered asterisk and centred dot. |
| 2955 |
% |
| 2956 |
% \changes{v1.4n}{2021/06/11}{Drop incorrect space in \cs{labelitemiv} (gh/496)} |
| 2957 |
% \begin{macrocode} |
| 2958 |
\newcommand\labelitemi {\labelitemfont \textbullet} |
| 2959 |
\newcommand\labelitemii {\labelitemfont \bfseries \textendash} |
| 2960 |
\newcommand\labelitemiii{\labelitemfont \textasteriskcentered} |
| 2961 |
\newcommand\labelitemiv {\labelitemfont \textperiodcentered} |
| 2962 |
% \end{macrocode} |
| 2963 |
% |
| 2964 |
% \begin{macro}{\labelitemfont} |
| 2965 |
% The default definition for \cs{labelitemfont} is to reset the |
| 2966 |
% font to \cs{normalfont} so that always the same symbol is |
| 2967 |
% produced regardless of surrounding conditions. |
| 2968 |
% |
| 2969 |
% \changes{v1.4l}{2019/12/20}{Normalize label fonts} |
| 2970 |
% Possible alternatives would be, for example, |
| 2971 |
%\begin{verbatim} |
| 2972 |
% \renewcommand\labelitemfont |
| 2973 |
% {\normalfont\fontfamily{lmss}\selectfont} |
| 2974 |
% \renewcommand\labelitemfont |
| 2975 |
% {\rmfamily\normalshape} |
| 2976 |
%\end{verbatim} |
| 2977 |
% the first would use symbols from Latin Modern Sans, the second |
| 2978 |
% would only allow changes in the font series so that an |
| 2979 |
% \texttt{itemize} in a bold context would produce bolder symbols. |
| 2980 |
% \begin{macrocode} |
| 2981 |
\newcommand\labelitemfont{\normalfont} |
| 2982 |
% \end{macrocode} |
| 2983 |
% \end{macro} |
| 2984 |
% \end{macro} |
| 2985 |
% \end{macro} |
| 2986 |
% \end{macro} |
| 2987 |
% \end{macro} |
| 2988 |
% |
| 2989 |
% \subsubsection{Description} |
| 2990 |
% |
| 2991 |
% \begin{environment}{description} |
| 2992 |
% The description environment is defined here -- while the itemize |
| 2993 |
% and enumerate environments are defined in the \LaTeX{} format. |
| 2994 |
% |
| 2995 |
% \begin{macrocode} |
| 2996 |
\newenvironment{description} |
| 2997 |
{\list{}{\labelwidth\z@ \itemindent-\leftmargin |
| 2998 |
\let\makelabel\descriptionlabel}} |
| 2999 |
{\endlist} |
| 3000 |
% \end{macrocode} |
| 3001 |
% \end{environment} |
| 3002 |
% |
| 3003 |
% \begin{macro}{\descriptionlabel} |
| 3004 |
% To change the formatting of the label, you must redefine |
| 3005 |
% |\descriptionlabel|. |
| 3006 |
% |
| 3007 |
% \changes{v1.2k}{1994/05/06}{Inserted \cs{normalfont}} |
| 3008 |
% \changes{v1.2y}{1995/01/31}{made command short} |
| 3009 |
% \begin{macrocode} |
| 3010 |
\newcommand*\descriptionlabel[1]{\hspace\labelsep |
| 3011 |
\normalfont\bfseries #1} |
| 3012 |
% \end{macrocode} |
| 3013 |
% \end{macro} |
| 3014 |
% |
| 3015 |
% \subsection{Defining new environments} |
| 3016 |
% |
| 3017 |
% \subsubsection{Abstract} |
| 3018 |
% |
| 3019 |
% \begin{environment}{abstract} |
| 3020 |
% When we are producing a separate titlepage we also put the |
| 3021 |
% abstract on a page of its own. It will be centred vertically on |
| 3022 |
% the page. |
| 3023 |
% |
| 3024 |
% Note that this environment is not defined for books. |
| 3025 |
% \changes{v1.3e}{1995/06/19}{Added setting of \cs{@endparpenalty} |
| 3026 |
% to avoid page break after abstract heading.} |
| 3027 |
% \changes{v1.3m}{1995/10/23}{Added setting of \cs{@beginparpenalty} to |
| 3028 |
% discourage page break before abstract heading.} |
| 3029 |
% \begin{macrocode} |
| 3030 |
%<*article|report> |
| 3031 |
\if@titlepage |
| 3032 |
\newenvironment{abstract}{% |
| 3033 |
\titlepage |
| 3034 |
\null\vfil |
| 3035 |
\@beginparpenalty\@lowpenalty |
| 3036 |
\begin{center}% |
| 3037 |
\bfseries \abstractname |
| 3038 |
\@endparpenalty\@M |
| 3039 |
\end{center}}% |
| 3040 |
{\par\vfil\null\endtitlepage} |
| 3041 |
% \end{macrocode} |
| 3042 |
% When we are not making a separate titlepage --the default for the |
| 3043 |
% article document class-- we have to check if we are in two-column |
| 3044 |
% mode. In that case the abstract is as a |\section*|, otherwise |
| 3045 |
% the quotation environment is used to typeset the abstract. |
| 3046 |
% \begin{macrocode} |
| 3047 |
\else |
| 3048 |
\newenvironment{abstract}{% |
| 3049 |
\if@twocolumn |
| 3050 |
\section*{\abstractname}% |
| 3051 |
\else |
| 3052 |
\small |
| 3053 |
\begin{center}% |
| 3054 |
{\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% |
| 3055 |
\end{center}% |
| 3056 |
\quotation |
| 3057 |
\fi} |
| 3058 |
{\if@twocolumn\else\endquotation\fi} |
| 3059 |
\fi |
| 3060 |
%</article|report> |
| 3061 |
% \end{macrocode} |
| 3062 |
% \end{environment} |
| 3063 |
% |
| 3064 |
% \subsubsection{Verse} |
| 3065 |
% |
| 3066 |
% \begin{environment}{verse} |
| 3067 |
% The verse environment is defined by making clever use of the |
| 3068 |
% list environment's parameters. The user types |\\| to end a line. |
| 3069 |
% This is implemented by |\let|'ing |\\| equal |\@centercr|. |
| 3070 |
% |
| 3071 |
% \changes{v1.3j}{1995/08/16}{stop \cs{item} scanning for [ with ^^A ] |
| 3072 |
% \cs{relax}} |
| 3073 |
% \begin{macrocode} |
| 3074 |
\newenvironment{verse} |
| 3075 |
{\let\\\@centercr |
| 3076 |
\list{}{\itemsep \z@ |
| 3077 |
\itemindent -1.5em% |
| 3078 |
\listparindent\itemindent |
| 3079 |
\rightmargin \leftmargin |
| 3080 |
\advance\leftmargin 1.5em}% |
| 3081 |
\item\relax} |
| 3082 |
{\endlist} |
| 3083 |
% \end{macrocode} |
| 3084 |
% \end{environment} |
| 3085 |
% |
| 3086 |
% \subsubsection{Quotation} |
| 3087 |
% |
| 3088 |
% \begin{environment}{quotation} |
| 3089 |
% The quotation environment is also defined by making clever use of |
| 3090 |
% the list environment's parameters. The lines in the environment |
| 3091 |
% are set smaller than |\textwidth|. The first line of a paragraph |
| 3092 |
% inside this environment is indented. |
| 3093 |
% |
| 3094 |
% \changes{v1.3j}{1995/08/16}{stop \cs{item} scanning for [ with ^^A ] |
| 3095 |
% \cs{relax}} |
| 3096 |
% \begin{macrocode} |
| 3097 |
\newenvironment{quotation} |
| 3098 |
{\list{}{\listparindent 1.5em% |
| 3099 |
\itemindent \listparindent |
| 3100 |
\rightmargin \leftmargin |
| 3101 |
\parsep \z@ \@plus\p@}% |
| 3102 |
\item\relax} |
| 3103 |
{\endlist} |
| 3104 |
% \end{macrocode} |
| 3105 |
% \end{environment} |
| 3106 |
% |
| 3107 |
% \subsubsection{Quote} |
| 3108 |
% |
| 3109 |
% \begin{environment}{quote} |
| 3110 |
% The quote environment is like the quotation environment except |
| 3111 |
% that paragraphs are not indented. |
| 3112 |
% |
| 3113 |
% \changes{v1.3j}{1995/08/16}{stop \cs{item} scanning for [ with ^^A ] |
| 3114 |
% \cs{relax}} |
| 3115 |
% \begin{macrocode} |
| 3116 |
\newenvironment{quote} |
| 3117 |
{\list{}{\rightmargin\leftmargin}% |
| 3118 |
\item\relax} |
| 3119 |
{\endlist} |
| 3120 |
% \end{macrocode} |
| 3121 |
% \end{environment} |
| 3122 |
% |
| 3123 |
% \subsubsection{Theorem} |
| 3124 |
% |
| 3125 |
% This document class does not define its own theorem environments, |
| 3126 |
% the defaults, supplied by the \LaTeX{} format are available. |
| 3127 |
% |
| 3128 |
% \subsubsection{Titlepage} |
| 3129 |
% |
| 3130 |
% \begin{environment}{titlepage} |
| 3131 |
% In the normal environments, the titlepage environment does nothing |
| 3132 |
% but start and end a page, and inhibit page numbers. When \LaTeX\ is |
| 3133 |
% in two-column mode, the environment temporarily switches to |
| 3134 |
% one-column mode. |
| 3135 |
% In the report class, it also resets the page number to one, and |
| 3136 |
% then, in two-column mode, sets it back to one at the end. |
| 3137 |
% For the book class the environment makes sure that the title page |
| 3138 |
% is on a recto page by issuing a \cs{cleardoublepage}-command. |
| 3139 |
% In compatibility mode, it sets the page number to zero. This is |
| 3140 |
% incorrect since it results in using the page parameters for a |
| 3141 |
% right-hand page but it is the way it was. |
| 3142 |
% |
| 3143 |
% \changes{v1.0g}{1993/12/09}{Moved the setting of |
| 3144 |
% \cs{@restonecolfalse}} |
| 3145 |
% \changes{v1.2c}{1994/03/17}{page :!= 0 only in compatibility mode |
| 3146 |
% (LL)} |
| 3147 |
% \changes{v1.2d}{1994/04/11}{Moved \cs{cleardoublepage} inside |
| 3148 |
% definition of titlepage environment} |
| 3149 |
% \changes{v1.3i}{1995/08/08}{New implementation with support for |
| 3150 |
% twoside and openright option} |
| 3151 |
% |
| 3152 |
% First we do give the definition for compatibility mode. |
| 3153 |
% \begin{macrocode} |
| 3154 |
\if@compatibility |
| 3155 |
\newenvironment{titlepage} |
| 3156 |
{% |
| 3157 |
%<book> \cleardoublepage |
| 3158 |
\if@twocolumn |
| 3159 |
\@restonecoltrue\onecolumn |
| 3160 |
\else |
| 3161 |
\@restonecolfalse\newpage |
| 3162 |
\fi |
| 3163 |
\thispagestyle{empty}% |
| 3164 |
\setcounter{page}\z@ |
| 3165 |
}% |
| 3166 |
{\if@restonecol\twocolumn \else \newpage \fi |
| 3167 |
} |
| 3168 |
% \end{macrocode} |
| 3169 |
% |
| 3170 |
% And here is the one for native \LaTeXe{}. |
| 3171 |
% \begin{macrocode} |
| 3172 |
\else |
| 3173 |
\newenvironment{titlepage} |
| 3174 |
{% |
| 3175 |
%<book> \cleardoublepage |
| 3176 |
\if@twocolumn |
| 3177 |
\@restonecoltrue\onecolumn |
| 3178 |
\else |
| 3179 |
\@restonecolfalse\newpage |
| 3180 |
\fi |
| 3181 |
\thispagestyle{empty}% |
| 3182 |
\setcounter{page}\@ne |
| 3183 |
}% |
| 3184 |
{\if@restonecol\twocolumn \else \newpage \fi |
| 3185 |
% \end{macrocode} |
| 3186 |
% If we are not in two-side mode the first page after the title page |
| 3187 |
% should also get page number 1. |
| 3188 |
% \begin{macrocode} |
| 3189 |
\if@twoside\else |
| 3190 |
\setcounter{page}\@ne |
| 3191 |
\fi |
| 3192 |
} |
| 3193 |
\fi |
| 3194 |
% \end{macrocode} |
| 3195 |
% \end{environment} |
| 3196 |
% |
| 3197 |
% \subsubsection{Appendix} |
| 3198 |
% |
| 3199 |
% \begin{macro}{\appendix} |
| 3200 |
% |
| 3201 |
% The |\appendix| command is not really an environment, it is a |
| 3202 |
% macro that makes some changes in the way things are done. |
| 3203 |
% |
| 3204 |
% In the article document class the |\appendix| command must do the |
| 3205 |
% following: |
| 3206 |
% \begin{itemize} |
| 3207 |
% \item reset the section and subsection counters to zero, |
| 3208 |
% \item redefine |\thesection| to produce alphabetic appendix |
| 3209 |
% numbers. This redefinition is done globally to ensure that it |
| 3210 |
% survives even if |\appendix| is issued within an environment such |
| 3211 |
% as \texttt{multicols}. |
| 3212 |
% \end{itemize} |
| 3213 |
% |
| 3214 |
% \changes{1.3z}{1998/09/19}{Redefine \cs{thesection} globally (pr/2862)} |
| 3215 |
% \begin{macrocode} |
| 3216 |
%<*article> |
| 3217 |
\newcommand\appendix{\par |
| 3218 |
\setcounter{section}{0}% |
| 3219 |
\setcounter{subsection}{0}% |
| 3220 |
\gdef\thesection{\@Alph\c@section}} |
| 3221 |
%</article> |
| 3222 |
% \end{macrocode} |
| 3223 |
% |
| 3224 |
% In the report and book document classes the |\appendix| command |
| 3225 |
% must do the following: |
| 3226 |
% \begin{itemize} |
| 3227 |
% \item reset the chapter and section counters to zero, |
| 3228 |
% \item set |\@chapapp| to |\appendixname| (for messages), |
| 3229 |
% \item redefine the chapter counter to produce appendix numbers, |
| 3230 |
% \item possibly redefine the |\chapter| command if appendix titles |
| 3231 |
% and headings are to look different from chapter titles and |
| 3232 |
% headings. This redefinition is done globally to ensure that it |
| 3233 |
% survives even if |\appendix| is issued within an environment such |
| 3234 |
% as \texttt{multicols}. |
| 3235 |
% \end{itemize} |
| 3236 |
% |
| 3237 |
% \changes{1.3z}{1998/09/19}{Redefine \cs{thechapter} and |
| 3238 |
% \cs{@chapapp} globally (pr/2862)} |
| 3239 |
% \begin{macrocode} |
| 3240 |
%<*report|book> |
| 3241 |
\newcommand\appendix{\par |
| 3242 |
\setcounter{chapter}{0}% |
| 3243 |
\setcounter{section}{0}% |
| 3244 |
\gdef\@chapapp{\appendixname}% |
| 3245 |
\gdef\thechapter{\@Alph\c@chapter}} |
| 3246 |
%</report|book> |
| 3247 |
% \end{macrocode} |
| 3248 |
% \end{macro} |
| 3249 |
% |
| 3250 |
% \subsection{Setting parameters for existing environments} |
| 3251 |
% |
| 3252 |
% \subsubsection{Array and tabular} |
| 3253 |
% |
| 3254 |
% \begin{macro}{\arraycolsep} |
| 3255 |
% The columns in an array environment are separated by |
| 3256 |
% 2|\arraycolsep|. |
| 3257 |
% \begin{macrocode} |
| 3258 |
\setlength\arraycolsep{5\p@} |
| 3259 |
% \end{macrocode} |
| 3260 |
% \end{macro} |
| 3261 |
% |
| 3262 |
% \begin{macro}{\tabcolsep} |
| 3263 |
% The columns in an tabular environment are separated by |
| 3264 |
% 2|\tabcolsep|. |
| 3265 |
% \begin{macrocode} |
| 3266 |
\setlength\tabcolsep{6\p@} |
| 3267 |
% \end{macrocode} |
| 3268 |
% \end{macro} |
| 3269 |
% |
| 3270 |
% \begin{macro}{\arrayrulewidth} |
| 3271 |
% The width of rules in the array and tabular environments is given |
| 3272 |
% by\\ |\arrayrulewidth|. |
| 3273 |
% \begin{macrocode} |
| 3274 |
\setlength\arrayrulewidth{.4\p@} |
| 3275 |
% \end{macrocode} |
| 3276 |
% \end{macro} |
| 3277 |
% |
| 3278 |
% \begin{macro}{\doublerulesep} |
| 3279 |
% The space between adjacent rules in the array and tabular |
| 3280 |
% environments is given by |\doublerulesep|. |
| 3281 |
% \begin{macrocode} |
| 3282 |
\setlength\doublerulesep{2\p@} |
| 3283 |
% \end{macrocode} |
| 3284 |
% \end{macro} |
| 3285 |
% |
| 3286 |
% \subsubsection{Tabbing} |
| 3287 |
% |
| 3288 |
% \begin{macro}{\tabbingsep} |
| 3289 |
% This controls the space that the |\'| command puts in. (See |
| 3290 |
% \LaTeX{} manual for an explanation.) |
| 3291 |
% \begin{macrocode} |
| 3292 |
\setlength\tabbingsep{\labelsep} |
| 3293 |
% \end{macrocode} |
| 3294 |
% \end{macro} |
| 3295 |
% |
| 3296 |
% \subsubsection{Minipage} |
| 3297 |
% |
| 3298 |
% \begin{macro}{\@minipagerestore} |
| 3299 |
% The macro |\@minipagerestore| is called upon entry to a minipage |
| 3300 |
% environment to set up things that are to be handled differently |
| 3301 |
% inside a minipage environment. In the current classes, it does |
| 3302 |
% nothing. |
| 3303 |
% \end{macro} |
| 3304 |
% |
| 3305 |
% \begin{macro}{\@mpfootins} |
| 3306 |
% Minipages have their own footnotes; |\skip||\@mpfootins| plays |
| 3307 |
% same r\^ole for footnotes in a minipage as |\skip||\footins| does |
| 3308 |
% for ordinary footnotes. |
| 3309 |
% |
| 3310 |
% \begin{macrocode} |
| 3311 |
\skip\@mpfootins = \skip\footins |
| 3312 |
% \end{macrocode} |
| 3313 |
% \end{macro} |
| 3314 |
% |
| 3315 |
% \subsubsection{Framed boxes} |
| 3316 |
% |
| 3317 |
% \begin{macro}{\fboxsep} |
| 3318 |
% The space left by |\fbox| and |\framebox| between the box and the |
| 3319 |
% text in it. |
| 3320 |
% \begin{macro}{\fboxrule} |
| 3321 |
% The width of the rules in the box made by |\fbox| and |\framebox|. |
| 3322 |
% \begin{macrocode} |
| 3323 |
\setlength\fboxsep{3\p@} |
| 3324 |
\setlength\fboxrule{.4\p@} |
| 3325 |
% \end{macrocode} |
| 3326 |
% \end{macro} |
| 3327 |
% \end{macro} |
| 3328 |
% |
| 3329 |
% \subsubsection{Equation and eqnarray} |
| 3330 |
% |
| 3331 |
% \begin{macro}{\theequation} |
| 3332 |
% When within chapters, the equation counter will be reset at |
| 3333 |
% the beginning of a new chapter and the equation number will |
| 3334 |
% be prefixed by the chapter number. |
| 3335 |
% \changes{v1.3u}{1996/10/31}{Added test for non-zero chapter number} |
| 3336 |
% |
| 3337 |
% This code must follow the |\chapter| definition or, more exactly, |
| 3338 |
% the definition of the chapter counter. |
| 3339 |
% \begin{macrocode} |
| 3340 |
%<article>\renewcommand \theequation {\@arabic\c@equation} |
| 3341 |
%<*report|book> |
| 3342 |
\@addtoreset {equation}{chapter} |
| 3343 |
\renewcommand\theequation |
| 3344 |
{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation} |
| 3345 |
%</report|book> |
| 3346 |
% \end{macrocode} |
| 3347 |
% \end{macro} |
| 3348 |
% |
| 3349 |
% \begin{macro}{\jot} |
| 3350 |
% |\jot| is the extra space added between lines of an eqnarray |
| 3351 |
% environment. The default value is used. |
| 3352 |
% \begin{macrocode} |
| 3353 |
% \setlength\jot{3pt} |
| 3354 |
% \end{macrocode} |
| 3355 |
% \end{macro} |
| 3356 |
% |
| 3357 |
% \begin{macro}{\@eqnnum} |
| 3358 |
% The macro |\@eqnnum| defines how equation numbers are to appear in |
| 3359 |
% equations. Again the default is used. |
| 3360 |
% |
| 3361 |
% \begin{macrocode} |
| 3362 |
% \def\@eqnnum{(\theequation)} |
| 3363 |
% \end{macrocode} |
| 3364 |
% \end{macro} |
| 3365 |
% |
| 3366 |
% \subsection{Floating objects} |
| 3367 |
% |
| 3368 |
% The \LaTeX{} format only defines a number of tools with |
| 3369 |
% which floating objects can be defined. This is done in the |
| 3370 |
% document class. It needs to define the following macros for each |
| 3371 |
% floating object of type \texttt{TYPE} (e.g., \texttt{TYPE} = |
| 3372 |
% figure). |
| 3373 |
% |
| 3374 |
% \begin{description} |
| 3375 |
% \item[\texttt{\bslash fps@TYPE}] |
| 3376 |
% The default placement specifier for floats of type |
| 3377 |
% \texttt{TYPE}. |
| 3378 |
% |
| 3379 |
% \item[\texttt{\bslash ftype@TYPE}] |
| 3380 |
% The type number for floats of type \texttt{TYPE}. Each |
| 3381 |
% \texttt{TYPE} has associated a unique positive \texttt |
| 3382 |
% {TYPE} number, which is a power of two. E.g., figures might |
| 3383 |
% have type number 1, tables type number 2, programs type |
| 3384 |
% number 4, etc. |
| 3385 |
% |
| 3386 |
% \item[\texttt{\bslash ext@TYPE}] |
| 3387 |
% The file extension indicating the file on which the contents |
| 3388 |
% list for float type \texttt{TYPE} is stored. For example, |
| 3389 |
% |\ext@figure| = `lof'. |
| 3390 |
% |
| 3391 |
% \item[\texttt{\bslash fnum@TYPE}] |
| 3392 |
% A macro to generate the figure number for a caption. For |
| 3393 |
% example, |\fnum@TYPE| == `Figure |\thefigure|'. |
| 3394 |
% |
| 3395 |
% \item[\texttt{\bslash @makecaption}{\meta{num}}{\meta{text}}] |
| 3396 |
% A macro to make a caption, with \meta{num} the value produced |
| 3397 |
% by |\fnum@...| and \meta{text} the text of the caption. It |
| 3398 |
% can assume it's in a |\parbox| of the appropriate width. |
| 3399 |
% This will be used for \emph{all} floating objects. |
| 3400 |
% |
| 3401 |
% \end{description} |
| 3402 |
% |
| 3403 |
% The actual environment that implements a floating object such as |
| 3404 |
% a figure is defined using the macros |\@float| and |\end@float|, |
| 3405 |
% which are defined in the \LaTeX{} format. |
| 3406 |
% |
| 3407 |
% An environment that implements a single-column floating object is |
| 3408 |
% started with |\@float{|\texttt{TYPE}|}[|\meta{placement}|]| of type |
| 3409 |
% \texttt{TYPE} with \meta{placement} as the placement specifier. |
| 3410 |
% The default value of \meta{PLACEMENT} is defined by |\fps@TYPE|. |
| 3411 |
% |
| 3412 |
% The environment is ended by |\end@float|. E.g., |\figure| == |
| 3413 |
% |\@float|{figure}, |\endfigure| == |\end@float|. |
| 3414 |
% |
| 3415 |
% \subsubsection{Figure} |
| 3416 |
% |
| 3417 |
% Here is the implementation of the figure environment. |
| 3418 |
% |
| 3419 |
% \begin{macro}{\c@figure} |
| 3420 |
% First we have to allocate a counter to number the figures. |
| 3421 |
% |
| 3422 |
% In the report and book document classes figures within chapters are |
| 3423 |
% numbered per chapter. |
| 3424 |
% \changes{v1.3u}{1996/10/31}{Added test for non-zero chapter number} |
| 3425 |
% \begin{macrocode} |
| 3426 |
%<*article> |
| 3427 |
\newcounter{figure} |
| 3428 |
\renewcommand \thefigure {\@arabic\c@figure} |
| 3429 |
%</article> |
| 3430 |
%<*report|book> |
| 3431 |
\newcounter{figure}[chapter] |
| 3432 |
\renewcommand \thefigure |
| 3433 |
{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure} |
| 3434 |
%</report|book> |
| 3435 |
% \end{macrocode} |
| 3436 |
% \end{macro} |
| 3437 |
% |
| 3438 |
% \begin{macro}{\fps@figure} |
| 3439 |
% \begin{macro}{\ftype@figure} |
| 3440 |
% \begin{macro}{\ext@figure} |
| 3441 |
% \begin{macro}{\num@figure} |
| 3442 |
% Here are the parameters for the floating objects of type `figure'. |
| 3443 |
% \changes{v1.4e}{2001/05/24}{Replaced tilde with \cs{nobreakspace} |
| 3444 |
% (pr/3310)} |
| 3445 |
% \begin{macrocode} |
| 3446 |
\def\fps@figure{tbp} |
| 3447 |
\def\ftype@figure{1} |
| 3448 |
\def\ext@figure{lof} |
| 3449 |
\def\fnum@figure{\figurename\nobreakspace\thefigure} |
| 3450 |
% \end{macrocode} |
| 3451 |
% \end{macro} |
| 3452 |
% \end{macro} |
| 3453 |
% \end{macro} |
| 3454 |
% \end{macro} |
| 3455 |
% |
| 3456 |
% \begin{environment}{figure} |
| 3457 |
% \begin{environment}{figure*} |
| 3458 |
% And the definition of the actual environment. The form with the |
| 3459 |
% |*| is used for double-column figures. |
| 3460 |
% \begin{macrocode} |
| 3461 |
\newenvironment{figure} |
| 3462 |
{\@float{figure}} |
| 3463 |
{\end@float} |
| 3464 |
\newenvironment{figure*} |
| 3465 |
{\@dblfloat{figure}} |
| 3466 |
{\end@dblfloat} |
| 3467 |
% \end{macrocode} |
| 3468 |
% \end{environment} |
| 3469 |
% \end{environment} |
| 3470 |
% |
| 3471 |
% \subsubsection{Table} |
| 3472 |
% |
| 3473 |
% Here is the implementation of the table environment. It is very |
| 3474 |
% much the same as the figure environment. |
| 3475 |
% |
| 3476 |
% \begin{macro}{\c@table} |
| 3477 |
% First we have to allocate a counter to number the tables. |
| 3478 |
% |
| 3479 |
% In the report and book document classes tables within chapters are |
| 3480 |
% numbered per chapter. |
| 3481 |
% \changes{v1.3u}{1996/10/31}{Added test for non-zero chapter number} |
| 3482 |
% \begin{macrocode} |
| 3483 |
%<*article> |
| 3484 |
\newcounter{table} |
| 3485 |
\renewcommand\thetable{\@arabic\c@table} |
| 3486 |
%</article> |
| 3487 |
%<*report|book> |
| 3488 |
\newcounter{table}[chapter] |
| 3489 |
\renewcommand \thetable |
| 3490 |
{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@table} |
| 3491 |
%</report|book> |
| 3492 |
% \end{macrocode} |
| 3493 |
% \end{macro} |
| 3494 |
% |
| 3495 |
% \begin{macro}{\fps@table} |
| 3496 |
% \begin{macro}{\ftype@table} |
| 3497 |
% \begin{macro}{\ext@table} |
| 3498 |
% \begin{macro}{\num@table} |
| 3499 |
% Here are the parameters for the floating objects of type `table'. |
| 3500 |
% \changes{v1.4e}{2001/05/24}{Replaced tilde with \cs{nobreakspace} |
| 3501 |
% (pr/3310)} |
| 3502 |
% \begin{macrocode} |
| 3503 |
\def\fps@table{tbp} |
| 3504 |
\def\ftype@table{2} |
| 3505 |
\def\ext@table{lot} |
| 3506 |
\def\fnum@table{\tablename\nobreakspace\thetable} |
| 3507 |
% \end{macrocode} |
| 3508 |
% \end{macro} |
| 3509 |
% \end{macro} |
| 3510 |
% \end{macro} |
| 3511 |
% \end{macro} |
| 3512 |
% |
| 3513 |
% \begin{environment}{table} |
| 3514 |
% \begin{environment}{table*} |
| 3515 |
% And the definition of the actual environment. The form with the |
| 3516 |
% |*| is used for double-column tables. |
| 3517 |
% \begin{macrocode} |
| 3518 |
\newenvironment{table} |
| 3519 |
{\@float{table}} |
| 3520 |
{\end@float} |
| 3521 |
\newenvironment{table*} |
| 3522 |
{\@dblfloat{table}} |
| 3523 |
{\end@dblfloat} |
| 3524 |
% \end{macrocode} |
| 3525 |
% \end{environment} |
| 3526 |
% \end{environment} |
| 3527 |
% |
| 3528 |
% \subsubsection{Captions} |
| 3529 |
% |
| 3530 |
% \begin{macro}{\@makecaption} |
| 3531 |
% The |\caption| command calls |\@makecaption| to format the |
| 3532 |
% caption of floating objects. It gets two arguments, |
| 3533 |
% \meta{number}, the number of the floating object and \meta{text}, |
| 3534 |
% the text of the caption. Usually \meta{number} contains a string |
| 3535 |
% such as `Figure 3.2'. The macro can assume it is called inside a |
| 3536 |
% |\parbox| of right width, with |\normalsize|. |
| 3537 |
% |
| 3538 |
% \begin{macro}{\abovecaptionskip} |
| 3539 |
% \begin{macro}{\belowcaptionskip} |
| 3540 |
% These lengths contain the amount of white space to leave above |
| 3541 |
% and below the caption. |
| 3542 |
% \begin{macrocode} |
| 3543 |
\newlength\abovecaptionskip |
| 3544 |
\newlength\belowcaptionskip |
| 3545 |
\setlength\abovecaptionskip{10\p@} |
| 3546 |
\setlength\belowcaptionskip{0\p@} |
| 3547 |
% \end{macrocode} |
| 3548 |
% \end{macro} |
| 3549 |
% \end{macro} |
| 3550 |
% |
| 3551 |
% The definition of this macro is |\long| in order to allow more |
| 3552 |
% then one paragraph in a caption. |
| 3553 |
% \begin{macrocode} |
| 3554 |
\long\def\@makecaption#1#2{% |
| 3555 |
\vskip\abovecaptionskip |
| 3556 |
% \end{macrocode} |
| 3557 |
% We want to see if the caption fits on one line on the page, |
| 3558 |
% therefore we first typeset it in a temporary box. |
| 3559 |
% \changes{v1.2q}{1994/05/29}{Use \cs{sbox}\cs{@tempboxa} instead of |
| 3560 |
% \cs{setbox}\cs{@tempboxa}\cs{hbox} to make this colour safe} |
| 3561 |
% \begin{macrocode} |
| 3562 |
\sbox\@tempboxa{#1: #2}% |
| 3563 |
% \end{macrocode} |
| 3564 |
% We can the measure its width. It that is larger than the current |
| 3565 |
% |\hsize| we typeset the caption as an ordinary paragraph. |
| 3566 |
% \begin{macrocode} |
| 3567 |
\ifdim \wd\@tempboxa >\hsize |
| 3568 |
#1: #2\par |
| 3569 |
% \end{macrocode} |
| 3570 |
% If the caption fits, we center it. Because this uses an |\hbox| |
| 3571 |
% directly in vertical mode, it does not execute the |\everypar| |
| 3572 |
% tokens; the only thing that could be needed here is resetting the |
| 3573 |
% `minipage flag' so we do this explicitly. |
| 3574 |
% \changes{v1.2x}{1994/12/09}{Due to a change in the way floats are |
| 3575 |
% handled we need to set the \cs{if@minipage} switch to false} |
| 3576 |
% \begin{macrocode} |
| 3577 |
\else |
| 3578 |
\global \@minipagefalse |
| 3579 |
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% |
| 3580 |
\fi |
| 3581 |
\vskip\belowcaptionskip} |
| 3582 |
% \end{macrocode} |
| 3583 |
% \end{macro} |
| 3584 |
% |
| 3585 |
% \subsection{Font changing} |
| 3586 |
% |
| 3587 |
% Here we supply the declarative font changing commands that were |
| 3588 |
% common in \LaTeX\ version 2.09 and earlier. These commands work |
| 3589 |
% in text mode \emph{and} in math mode. They are provided for |
| 3590 |
% compatibility, but one should start using the |\text...| and |
| 3591 |
% |\math...| commands instead. These commands are defined using |
| 3592 |
% |\DeclareTextFontCommand|, a command with three arguments: the |
| 3593 |
% user command to be defined; \LaTeX\ commands to execute in text |
| 3594 |
% mode and \LaTeX\ commands to execute in math mode. |
| 3595 |
% |
| 3596 |
% \changes{v1.0g}{1993/12/12}{Distinguished between compatibility and |
| 3597 |
% `normal' mode for the font changing commands.} |
| 3598 |
% \changes{v1.0h}{1993/12/18}{These are now defined in the kernel, so |
| 3599 |
% use \cs{@renewfontswitch}. Compatibility mode defines |
| 3600 |
% \cs{@renewfontswitch} to do nothing, so we don't need to check |
| 3601 |
% for compatibility mode any more.} |
| 3602 |
% \changes{v1.0j}{1993/12/20}{Added \cs{normalfont} back in the |
| 3603 |
% definitions of \cs{rm} etc. as this should be the default |
| 3604 |
% behaviour} |
| 3605 |
% \changes{v1.2e}{1994/04/14}{\cs{@renewfontswitch} has become |
| 3606 |
% \cs{DeclareOldFontCommand}} |
| 3607 |
% |
| 3608 |
% \begin{macro}{\rm} |
| 3609 |
% \changes{v1.0f}{1993/12/08}{Macro added} |
| 3610 |
% \begin{macro}{\tt} |
| 3611 |
% \changes{v1.0f}{1993/12/08}{Macro added} |
| 3612 |
% \begin{macro}{\sf} |
| 3613 |
% \changes{v1.0f}{1993/12/08}{Macro added} |
| 3614 |
% |
| 3615 |
% The commands to change the family. When in compatibility mode we |
| 3616 |
% select the `default' font first, to get \LaTeX2.09 behaviour. |
| 3617 |
% \begin{macrocode} |
| 3618 |
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} |
| 3619 |
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} |
| 3620 |
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} |
| 3621 |
% \end{macrocode} |
| 3622 |
% \end{macro} |
| 3623 |
% \end{macro} |
| 3624 |
% \end{macro} |
| 3625 |
% |
| 3626 |
% \begin{macro}{\bf} |
| 3627 |
% \changes{v1.0f}{1993/12/08}{Macro added} |
| 3628 |
% The command to change to the bold series. One should use |
| 3629 |
% |\mdseries| to explicitly switch back to medium series. |
| 3630 |
% \begin{macrocode} |
| 3631 |
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} |
| 3632 |
% \end{macrocode} |
| 3633 |
% \end{macro} |
| 3634 |
% |
| 3635 |
% \begin{macro}{\sl} |
| 3636 |
% \changes{v1.0f}{1993/12/08}{Macro added} |
| 3637 |
% \changes{v1.2g}{1994/04/24}{Added warning if used in math mode} |
| 3638 |
% \begin{macro}{\it} |
| 3639 |
% \changes{v1.0f}{1993/12/08}{Macro added} |
| 3640 |
% \begin{macro}{\sc} |
| 3641 |
% \changes{v1.0f}{1993/12/08}{Macro added} |
| 3642 |
% \changes{v1.2g}{1994/04/24}{Added warning if used in math mode} |
| 3643 |
% |
| 3644 |
% And the commands to change the shape of the font. The slanted and |
| 3645 |
% small caps shapes are not available by default as math alphabets, |
| 3646 |
% so those changes do nothing in math mode. However, we do warn the |
| 3647 |
% user that the selection will not have any effect.One should use |
| 3648 |
% |\upshape| to explicitly change back to the upright shape. |
| 3649 |
% \begin{macrocode} |
| 3650 |
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} |
| 3651 |
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} |
| 3652 |
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} |
| 3653 |
% \end{macrocode} |
| 3654 |
% \end{macro} |
| 3655 |
% \end{macro} |
| 3656 |
% \end{macro} |
| 3657 |
% |
| 3658 |
% \begin{macro}{\cal} |
| 3659 |
% \changes{v1.0g}{1993/12/12}{Macro added} |
| 3660 |
% \begin{macro}{\mit} |
| 3661 |
% \changes{v1.0g}{1993/12/12}{Macro added} |
| 3662 |
% |
| 3663 |
% The commands |\cal| and |\mit| should only be used in math mode, |
| 3664 |
% outside math mode they have no effect. Currently the New Font |
| 3665 |
% Selection Scheme defines these commands to generate warning |
| 3666 |
% messages. Therefore we have to define them `by hand'. |
| 3667 |
% \changes{v1.2w}{1994/12/01}{Now define \cs{cal} and \cs{mit} using |
| 3668 |
% \cs{DeclareRobustCommand*}} |
| 3669 |
% \changes{v1.3j}{1995/08/16}{Remove surplus braces} |
| 3670 |
% \begin{macrocode} |
| 3671 |
\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} |
| 3672 |
\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} |
| 3673 |
% \end{macrocode} |
| 3674 |
% \end{macro} |
| 3675 |
% \end{macro} |
| 3676 |
% |
| 3677 |
% \section{Cross Referencing} |
| 3678 |
% \subsection{Table of Contents, etc.} |
| 3679 |
% |
| 3680 |
% A |\section| command writes a |
| 3681 |
% |\contentsline{section}{|\meta{title}|}{|\meta{page}|}| command |
| 3682 |
% on the \file{.toc} file, where \meta{title} contains the |
| 3683 |
% contents of the entry and \meta{page} is the page number. If |
| 3684 |
% sections are being numbered, then \meta{title} will be of the |
| 3685 |
% form |\numberline{|\meta{num}|}{|\meta{heading}|}| where |
| 3686 |
% \meta{num} is the number produced by |\thesection|. Other |
| 3687 |
% sectioning commands work similarly. |
| 3688 |
% |
| 3689 |
% A |\caption| command in a `figure' environment writes |
| 3690 |
% |
| 3691 |
% |\contentsline{figure}{\numberline{|\meta{num}|}{|^^A |
| 3692 |
% \meta{caption}|}}{|\meta{page}|}| |
| 3693 |
% on the .\file{lof} file, where \meta{num} is the number produced |
| 3694 |
% by |\thefigure| and \meta{caption} is the figure caption. It |
| 3695 |
% works similarly for a `table' environment. |
| 3696 |
% |
| 3697 |
% The command |\contentsline{|\meta{name}|}| expands to |
| 3698 |
% |\l@|\meta{name}. So, to specify the table of contents, we must |
| 3699 |
% define |\l@chapter|, |\l@section|, |\l@subsection|, ... ; to |
| 3700 |
% specify the list of figures, we must define |\l@figure|; and so |
| 3701 |
% on. Most of these can be defined with the |\@dottedtocline| |
| 3702 |
% command, which works as follows. |
| 3703 |
% |
| 3704 |
% |\@dottedtocline{|\meta{level}|}{|\meta{indent}|}{|^^A |
| 3705 |
% \meta{numwidth}|}{|^^A |
| 3706 |
% \meta{title}|}{|\meta{page}|}| |
| 3707 |
% |
| 3708 |
% \begin{description} |
| 3709 |
% \item[\meta{level}] An entry is produced only if \meta{level} |
| 3710 |
% $\leq$ value of the \Lcount{tocdepth} counter. Note, |
| 3711 |
% |\chapter| is level 0, |\section| is level 1, etc. |
| 3712 |
% \item[\meta{indent}] The indentation from the outer left margin |
| 3713 |
% of the start of the contents line. |
| 3714 |
% \item[\meta{numwidth}] The width of a box in which the section |
| 3715 |
% number is to go, if \meta{title} includes a |\numberline| |
| 3716 |
% command. |
| 3717 |
% \end{description} |
| 3718 |
% |
| 3719 |
% \begin{macro}{\@pnumwidth} |
| 3720 |
% \begin{macro}{\@tocrmarg} |
| 3721 |
% \begin{macro}{\@dotsep} |
| 3722 |
% This command uses the following three parameters, which are set |
| 3723 |
% with a |\newcommand| (so em's can be used to make them depend upon |
| 3724 |
% the font). |
| 3725 |
% \begin{description} |
| 3726 |
% \item[\texttt{\bslash @pnumwidth}] The width of a box in which the |
| 3727 |
% page number is put. |
| 3728 |
% \changes{v1.2v}{1994/10/29}{Changed documentation from $!>$ or $!=$ to |
| 3729 |
% $\ge$} |
| 3730 |
% \item[\texttt{\bslash @tocrmarg}] The right margin for multiple |
| 3731 |
% line entries. One wants |\@tocrmarg| $\ge$ |\@pnumwidth| |
| 3732 |
% \item[\texttt{\bslash @dotsep}] Separation between dots, in mu |
| 3733 |
% units. Should be defined as a number like 2 or 1.7 |
| 3734 |
% \end{description} |
| 3735 |
% |
| 3736 |
% \begin{macrocode} |
| 3737 |
\newcommand\@pnumwidth{1.55em} |
| 3738 |
\newcommand\@tocrmarg{2.55em} |
| 3739 |
\newcommand\@dotsep{4.5} |
| 3740 |
%<article>\setcounter{tocdepth}{3} |
| 3741 |
%<!article>\setcounter{tocdepth}{2} |
| 3742 |
% \end{macrocode} |
| 3743 |
% \end{macro} |
| 3744 |
% \end{macro} |
| 3745 |
% \end{macro} |
| 3746 |
% |
| 3747 |
% \subsubsection{Table of Contents} |
| 3748 |
% |
| 3749 |
% \begin{macro}{\tableofcontents} |
| 3750 |
% This macro is used to request that \LaTeX{} produces a table of |
| 3751 |
% contents. In the report and book document classes the tables of |
| 3752 |
% contents, figures etc. are always set in single-column mode. |
| 3753 |
% |
| 3754 |
% \changes{v1.0g}{1993/12/09}{Moved the setting of |
| 3755 |
% \cs{@restonecolfalse}} |
| 3756 |
% \changes{v1.4h}{2007/10/19}{Explain why \cs{@mkboth} is inside the heading |
| 3757 |
% arg for \cs{tableofcontents} (pr/3285 and pr/3984)} |
| 3758 |
% \begin{macrocode} |
| 3759 |
\newcommand\tableofcontents{% |
| 3760 |
%<*report|book> |
| 3761 |
\if@twocolumn |
| 3762 |
\@restonecoltrue\onecolumn |
| 3763 |
\else |
| 3764 |
\@restonecolfalse |
| 3765 |
\fi |
| 3766 |
% \end{macrocode} |
| 3767 |
% The title is set using the |\chapter*| command, making sure that |
| 3768 |
% the running head --if one is required-- contains the right |
| 3769 |
% information. |
| 3770 |
% \begin{macrocode} |
| 3771 |
\chapter*{\contentsname |
| 3772 |
%</report|book> |
| 3773 |
%<article> \section*{\contentsname |
| 3774 |
% \end{macrocode} |
| 3775 |
% The code for |\@mkboth| is placed inside the heading to avoid any |
| 3776 |
% influence on vertical spacing after the heading (in some cases). For |
| 3777 |
% other commands, such as |\listoffigures| below this has been changed from |
| 3778 |
% the \LaTeX{}2.09 version as it will produce a serious bug if used in |
| 3779 |
% two-column mode (see, pr/3285). However |\tableofcontents| is always |
| 3780 |
% typeset in one-column mode in these classes, therefore the somewhat |
| 3781 |
% inconsistent setting has been retained for compatibility reasons. |
| 3782 |
% \begin{macrocode} |
| 3783 |
\@mkboth{% |
| 3784 |
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% |
| 3785 |
% \end{macrocode} |
| 3786 |
% The actual table of contents is made by calling |
| 3787 |
% |\@starttoc{toc}|. After that we restore two-column mode if |
| 3788 |
% necessary. |
| 3789 |
% \begin{macrocode} |
| 3790 |
\@starttoc{toc}% |
| 3791 |
%<!article> \if@restonecol\twocolumn\fi |
| 3792 |
} |
| 3793 |
% \end{macrocode} |
| 3794 |
% \end{macro} |
| 3795 |
% |
| 3796 |
% \begin{macro}{\l@part} |
| 3797 |
% Each sectioning command needs an additional macro to format its |
| 3798 |
% entry in the table of contents, as described above. The macro for |
| 3799 |
% the entry for parts is defined in a special way. |
| 3800 |
% |
| 3801 |
% First we make sure that if a pagebreak should occur, it occurs |
| 3802 |
% \emph{before} this entry. Also a little whitespace is added and a |
| 3803 |
% group begun to keep changes local. |
| 3804 |
% \changes{v1.0h}{1993/12/18}{Replaced -\cs{@secpenalty} by |
| 3805 |
% \cs{@secpenalty}. ASAJ.} |
| 3806 |
% \changes{v1.2i}{1994/04/28}{Don't print a toc line when the tocdepth |
| 3807 |
% counter is less then -1} |
| 3808 |
% \changes{v1.3b}{1995/05/23}{Added missing braces around argument |
| 3809 |
% to \cs{addpenalty}.} |
| 3810 |
% \changes{v1.3x}{1997/10/10}{Removed setting of \cs{@tempdima} as |
| 3811 |
% this macro does not use \cs{numberline} to set the toc line.} |
| 3812 |
% \changes{v1.4a}{1998/10/12}{we should use \cs{@tocrmarg}; see PR/2881.} |
| 3813 |
% \begin{macrocode} |
| 3814 |
\newcommand*\l@part[2]{% |
| 3815 |
\ifnum \c@tocdepth >-2\relax |
| 3816 |
%<article> \addpenalty\@secpenalty |
| 3817 |
%<!article> \addpenalty{-\@highpenalty}% |
| 3818 |
\addvspace{2.25em \@plus\p@}% |
| 3819 |
% \end{macrocode} |
| 3820 |
% The macro |\numberline| requires that the width of the box that |
| 3821 |
% holds the part number is stored in \LaTeX's scratch register |
| 3822 |
% |\@tempdima|. Therefore we initialize it there even though we do |
| 3823 |
% not use |\numberline| internally---the value used is quite large |
| 3824 |
% so that something like |\numberline{VIII}| would still work. |
| 3825 |
% \changes{v1.4d}{2001/04/21}{Initialize \cs{@tempdima} to some |
| 3826 |
% sensible value (pr/3327)} |
| 3827 |
% \begin{macrocode} |
| 3828 |
\setlength\@tempdima{3em}% |
| 3829 |
\begingroup |
| 3830 |
% \end{macrocode} |
| 3831 |
% We set |\parindent| to 0pt and use |\rightskip| to leave |
| 3832 |
% enough room for the page numbers.\footnote{^^A |
| 3833 |
% We should really set \cs{rightskip} to \cs{@tocrmarg} instead |
| 3834 |
% of \cs{@pnumwidth} (no version of {\LaTeX} ever did this), |
| 3835 |
% otherwise the \cs{rightskip} is too small. |
| 3836 |
% Unfortunately this can't be changed in {\LaTeXe} as we don't |
| 3837 |
% want to create different versions of {\LaTeXe} which produce |
| 3838 |
% different typeset output unless this is absolutely necessary; |
| 3839 |
% instead we suspend it for \LaTeX3.} |
| 3840 |
% To prevent overfull box messages the |\parfillskip| is set to a |
| 3841 |
% negative value. |
| 3842 |
% \begin{macrocode} |
| 3843 |
\parindent \z@ \rightskip \@pnumwidth |
| 3844 |
\parfillskip -\@pnumwidth |
| 3845 |
% \end{macrocode} |
| 3846 |
% Now we can set the entry, in a large bold font. We make sure to |
| 3847 |
% leave vertical mode, set the part title and add the page number, |
| 3848 |
% set flush right. |
| 3849 |
% \begin{macrocode} |
| 3850 |
{\leavevmode |
| 3851 |
\large \bfseries #1\hfil |
| 3852 |
\hb@xt@\@pnumwidth{\hss #2% |
| 3853 |
% \end{macrocode} |
| 3854 |
% |
| 3855 |
% \changes{v1.4i}{2018/09/03}{Prevent protrusion |
| 3856 |
% (\url{https://tex.stackexchange.com/q/172785/10109})} |
| 3857 |
% \begin{macrocode} |
| 3858 |
\kern-\p@\kern\p@}}\par |
| 3859 |
% \end{macrocode} |
| 3860 |
% Prevent a pagebreak immediately after this entry, but use |
| 3861 |
% |\everypar| to reset the |\if@nobreak| switch. Finally we close |
| 3862 |
% the group. |
| 3863 |
% \changes{v1.3j}{1995/08/16}{Add missing percent} |
| 3864 |
% \begin{macrocode} |
| 3865 |
\nobreak |
| 3866 |
%<article> \if@compatibility |
| 3867 |
\global\@nobreaktrue |
| 3868 |
\everypar{\global\@nobreakfalse\everypar{}}% |
| 3869 |
%<article> \fi |
| 3870 |
\endgroup |
| 3871 |
\fi} |
| 3872 |
% \end{macrocode} |
| 3873 |
% \end{macro} |
| 3874 |
% |
| 3875 |
% \begin{macro}{\l@chapter} |
| 3876 |
% This macro formats the entries in the table of contents for |
| 3877 |
% chapters. It is very similar to |\l@part| |
| 3878 |
% |
| 3879 |
% First we make sure that if a pagebreak should occur, it occurs |
| 3880 |
% \emph{before} this entry. Also a little whitespace is added and a |
| 3881 |
% group begun to keep changes local. |
| 3882 |
% \changes{v1.2i}{1994/04/28}{Don't print a toc line when the tocdepth |
| 3883 |
% counter is less than 0} |
| 3884 |
% \changes{v1.3b}{1995/05/23}{Added missing braces around argument |
| 3885 |
% to \cs{addpenalty}.} |
| 3886 |
% \changes{v1.4a}{1998/10/12}{we should use \cs{@tocrmarg}; see PR/2881.} |
| 3887 |
% \begin{macrocode} |
| 3888 |
%<*report|book> |
| 3889 |
\newcommand*\l@chapter[2]{% |
| 3890 |
\ifnum \c@tocdepth >\m@ne |
| 3891 |
\addpenalty{-\@highpenalty}% |
| 3892 |
\vskip 1.0em \@plus\p@ |
| 3893 |
% \end{macrocode} |
| 3894 |
% |
| 3895 |
% The macro |\numberline| requires that the width of the box that |
| 3896 |
% holds the part number is stored in \LaTeX's scratch register |
| 3897 |
% |\@tempdima|. Therefore we initialize it there even though we do |
| 3898 |
% not use |\numberline| internally (the position as well as the |
| 3899 |
% values seems questionable but can't be changed without producing |
| 3900 |
% compatibility problems). We begin a group, and change |
| 3901 |
% some of the paragraph parameters (see also the remark at |
| 3902 |
% \cs{l@part} regarding \cs{rightskip}). |
| 3903 |
% \begin{macrocode} |
| 3904 |
\setlength\@tempdima{1.5em}% |
| 3905 |
\begingroup |
| 3906 |
\parindent \z@ \rightskip \@pnumwidth |
| 3907 |
\parfillskip -\@pnumwidth |
| 3908 |
% \end{macrocode} |
| 3909 |
% Then we leave vertical mode and switch to a bold font. |
| 3910 |
% \begin{macrocode} |
| 3911 |
\leavevmode \bfseries |
| 3912 |
% \end{macrocode} |
| 3913 |
% Because we do not use |\numberline| here, we have do some fine |
| 3914 |
% tuning `by hand', before we can set the entry. We discourage but |
| 3915 |
% not disallow a pagebreak immediately after a chapter entry. |
| 3916 |
% \begin{macrocode} |
| 3917 |
\advance\leftskip\@tempdima |
| 3918 |
\hskip -\leftskip |
| 3919 |
#1\nobreak\hfil |
| 3920 |
\nobreak\hb@xt@\@pnumwidth{\hss #2% |
| 3921 |
% \end{macrocode} |
| 3922 |
% |
| 3923 |
% \changes{v1.4i}{2018/09/03}{Prevent protrusion |
| 3924 |
% (\url{https://tex.stackexchange.com/q/172785/10109})} |
| 3925 |
% \begin{macrocode} |
| 3926 |
\kern-\p@\kern\p@}\par |
| 3927 |
\penalty\@highpenalty |
| 3928 |
\endgroup |
| 3929 |
\fi} |
| 3930 |
%</report|book> |
| 3931 |
% \end{macrocode} |
| 3932 |
% \end{macro} |
| 3933 |
% |
| 3934 |
% \begin{macro}{\l@section} |
| 3935 |
% In the article document class the entry in the table of contents |
| 3936 |
% for sections looks much like the chapter entries for the report |
| 3937 |
% and book document classes. |
| 3938 |
% |
| 3939 |
% First we make sure that if a pagebreak should occur, it occurs |
| 3940 |
% \emph{before} this entry. Also a little whitespace is added and a |
| 3941 |
% group begun to keep changes local. |
| 3942 |
% \changes{v1.0h}{1993/12/18}{Replaced -\cs{@secpenalty} by |
| 3943 |
% \cs{@secpenalty}. ASAJ.} |
| 3944 |
% \changes{v1.2i}{1994/04/28}{Don't print a toc line when the tocdepth |
| 3945 |
% counter is less than 1.} |
| 3946 |
% \changes{v1.4a}{1998/10/12}{we should use \cs{@tocrmarg}; see PR/2881.} |
| 3947 |
% \begin{macrocode} |
| 3948 |
%<*article> |
| 3949 |
\newcommand*\l@section[2]{% |
| 3950 |
\ifnum \c@tocdepth >\z@ |
| 3951 |
\addpenalty\@secpenalty |
| 3952 |
\addvspace{1.0em \@plus\p@}% |
| 3953 |
% \end{macrocode} |
| 3954 |
% |
| 3955 |
% The macro |\numberline| requires that the width of the box that |
| 3956 |
% holds the part number is stored in \LaTeX's scratch register |
| 3957 |
% |\@tempdima|. Therefore we put it there. We begin a group, and |
| 3958 |
% change some of the paragraph parameters (see also the remark at |
| 3959 |
% \cs{l@part} regarding \cs{rightskip}). |
| 3960 |
% \begin{macrocode} |
| 3961 |
\setlength\@tempdima{1.5em}% |
| 3962 |
\begingroup |
| 3963 |
\parindent \z@ \rightskip \@pnumwidth |
| 3964 |
\parfillskip -\@pnumwidth |
| 3965 |
% \end{macrocode} |
| 3966 |
% Then we leave vertical mode and switch to a bold font. |
| 3967 |
% \begin{macrocode} |
| 3968 |
\leavevmode \bfseries |
| 3969 |
% \end{macrocode} |
| 3970 |
% Because we do not use |\numberline| here, we have do some fine |
| 3971 |
% tuning `by hand', before we can set the entry. We discourage but |
| 3972 |
% not disallow a pagebreak immediately after a chapter entry. |
| 3973 |
% \begin{macrocode} |
| 3974 |
\advance\leftskip\@tempdima |
| 3975 |
\hskip -\leftskip |
| 3976 |
#1\nobreak\hfil |
| 3977 |
\nobreak\hb@xt@\@pnumwidth{\hss #2% |
| 3978 |
% \end{macrocode} |
| 3979 |
% |
| 3980 |
% \changes{v1.4i}{2018/09/03}{Prevent protrusion |
| 3981 |
% (\url{https://tex.stackexchange.com/q/172785/10109})} |
| 3982 |
% \begin{macrocode} |
| 3983 |
\kern-\p@\kern\p@}\par |
| 3984 |
\endgroup |
| 3985 |
\fi} |
| 3986 |
%</article> |
| 3987 |
% \end{macrocode} |
| 3988 |
% In the report and book document classes the definition for |
| 3989 |
% |\l@section| is much simpler. |
| 3990 |
% \begin{macrocode} |
| 3991 |
%<*report|book> |
| 3992 |
\newcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}} |
| 3993 |
%</report|book> |
| 3994 |
% \end{macrocode} |
| 3995 |
% \end{macro} |
| 3996 |
% |
| 3997 |
% \begin{macro}{\l@subsection} |
| 3998 |
% \begin{macro}{\l@subsubsection} |
| 3999 |
% \begin{macro}{\l@paragraph} |
| 4000 |
% \begin{macro}{\l@subparagraph} |
| 4001 |
% All lower level entries are defined using the macro |
| 4002 |
% |\@dottedtocline| (see above). |
| 4003 |
% \begin{macrocode} |
| 4004 |
%<*article> |
| 4005 |
\newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} |
| 4006 |
\newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} |
| 4007 |
\newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} |
| 4008 |
\newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}} |
| 4009 |
%</article> |
| 4010 |
%<*report|book> |
| 4011 |
\newcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}} |
| 4012 |
\newcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}} |
| 4013 |
\newcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}} |
| 4014 |
\newcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}} |
| 4015 |
%</report|book> |
| 4016 |
% \end{macrocode} |
| 4017 |
% \end{macro} |
| 4018 |
% \end{macro} |
| 4019 |
% \end{macro} |
| 4020 |
% \end{macro} |
| 4021 |
% |
| 4022 |
% \subsubsection{List of figures} |
| 4023 |
% |
| 4024 |
% \begin{macro}{\listoffigures} |
| 4025 |
% This macro is used to request that \LaTeX{} produces a list of |
| 4026 |
% figures. It is very similar to |\tableofcontents|. |
| 4027 |
% |
| 4028 |
% \changes{v1.0g}{1993/12/09}{Moved the setting of |
| 4029 |
% \cs{@restonecolfalse}} |
| 4030 |
% \changes{v1.4c}{2001/01/06}{Moved \cs{@mkboth} out of heading |
| 4031 |
% arg (pr/3285)} |
| 4032 |
% \begin{macrocode} |
| 4033 |
\newcommand\listoffigures{% |
| 4034 |
%<*report|book> |
| 4035 |
\if@twocolumn |
| 4036 |
\@restonecoltrue\onecolumn |
| 4037 |
\else |
| 4038 |
\@restonecolfalse |
| 4039 |
\fi |
| 4040 |
\chapter*{\listfigurename}% |
| 4041 |
%</report|book> |
| 4042 |
%<article> \section*{\listfigurename}% |
| 4043 |
\@mkboth{\MakeUppercase\listfigurename}% |
| 4044 |
{\MakeUppercase\listfigurename}% |
| 4045 |
\@starttoc{lof}% |
| 4046 |
%<report|book> \if@restonecol\twocolumn\fi |
| 4047 |
} |
| 4048 |
% \end{macrocode} |
| 4049 |
% \end{macro} |
| 4050 |
% |
| 4051 |
% \begin{macro}{\l@figure} |
| 4052 |
% This macro produces an entry in the list of figures. |
| 4053 |
% \begin{macrocode} |
| 4054 |
\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} |
| 4055 |
% \end{macrocode} |
| 4056 |
% \end{macro} |
| 4057 |
% |
| 4058 |
% \subsubsection{List of tables} |
| 4059 |
% |
| 4060 |
% \begin{macro}{\listoftables} |
| 4061 |
% This macro is used to request that \LaTeX{} produces a list of |
| 4062 |
% tables. It is very similar to |\tableofcontents|. |
| 4063 |
% |
| 4064 |
% \changes{v1.0g}{1993/12/09}{Moved the setting of |
| 4065 |
% \cs{@restonecolfalse}} |
| 4066 |
% \changes{v1.4c}{2001/01/06}{Moved \cs{@mkboth} out of heading |
| 4067 |
% arg (pr/3285)} |
| 4068 |
% \begin{macrocode} |
| 4069 |
\newcommand\listoftables{% |
| 4070 |
%<*report|book> |
| 4071 |
\if@twocolumn |
| 4072 |
\@restonecoltrue\onecolumn |
| 4073 |
\else |
| 4074 |
\@restonecolfalse |
| 4075 |
\fi |
| 4076 |
\chapter*{\listtablename}% |
| 4077 |
%</report|book> |
| 4078 |
%<article> \section*{\listtablename}% |
| 4079 |
\@mkboth{% |
| 4080 |
\MakeUppercase\listtablename}% |
| 4081 |
{\MakeUppercase\listtablename}% |
| 4082 |
\@starttoc{lot}% |
| 4083 |
%<report|book> \if@restonecol\twocolumn\fi |
| 4084 |
} |
| 4085 |
% \end{macrocode} |
| 4086 |
% \end{macro} |
| 4087 |
% |
| 4088 |
% \begin{macro}{\l@table} |
| 4089 |
% This macro produces an entry in the list of tables. |
| 4090 |
% \begin{macrocode} |
| 4091 |
\let\l@table\l@figure |
| 4092 |
% \end{macrocode} |
| 4093 |
% \end{macro} |
| 4094 |
% |
| 4095 |
% \subsection{Bibliography} |
| 4096 |
% |
| 4097 |
% \begin{macro}{\bibindent} |
| 4098 |
% The ``open'' bibliography format uses an indentation of |
| 4099 |
% |\bibindent|. |
| 4100 |
% \begin{macrocode} |
| 4101 |
\newdimen\bibindent |
| 4102 |
\setlength\bibindent{1.5em} |
| 4103 |
% \end{macrocode} |
| 4104 |
% \end{macro} |
| 4105 |
% |
| 4106 |
% \begin{environment}{thebibliography} |
| 4107 |
% The `thebibliography' environment executes the following |
| 4108 |
% commands: |
| 4109 |
% |
| 4110 |
% |\renewcommand{\newblock}{\hskip.11em \@plus.33em \@minus.07em}|\\ |
| 4111 |
% --- Defines the ``closed'' format, where the blocks (major units |
| 4112 |
% of information) of an entry run together. |
| 4113 |
% |
| 4114 |
% |\sloppy| --- Used because it's rather hard to do line breaks in |
| 4115 |
% bibliographies, |
| 4116 |
% |
| 4117 |
% |\sfcode`\.=1000\relax| --- |
| 4118 |
% Causes a `.' (period) not to produce an end-of-sentence space. |
| 4119 |
% |
| 4120 |
% The implementation of this environment is based on the generic |
| 4121 |
% list environment. It uses the \Lcount{enumiv} counter internally |
| 4122 |
% to generate the labels of the list. |
| 4123 |
% |
| 4124 |
% When an empty `thebibliography' environment is found, a warning |
| 4125 |
% is issued. |
| 4126 |
% |
| 4127 |
% \changes{v1.0i}{1993/12/19}{Corrected definition of thebibliography |
| 4128 |
% for article} |
| 4129 |
% \changes{v1.2z}{1995/05/09}{added a missing percent character} |
| 4130 |
% \changes{v1.3b}{1995/05/23}{Added missing braces in definition |
| 4131 |
% of thebibliography environment.} |
| 4132 |
% \changes{v1.3j}{1995/08/16}{remove surplus spaces} |
| 4133 |
% \changes{v1.3k}{1995/08/27}{Code for openbib changed} |
| 4134 |
% \changes{v1.3t}{1996/10/05}{Added setting value of \cs{@clubpenalty}} |
| 4135 |
% \begin{macrocode} |
| 4136 |
\newenvironment{thebibliography}[1] |
| 4137 |
%<*article> |
| 4138 |
{\section*{\refname}% |
| 4139 |
% \end{macrocode} |
| 4140 |
% The |\@mkboth| was moved out of the heading argument since at |
| 4141 |
% least in report and book (twocolumn option) there are definitions |
| 4142 |
% for |\chapter| which would swallow it otherwise. |
| 4143 |
% \changes{v1.4c}{2001/01/06}{Moved \cs{@mkboth} out of heading |
| 4144 |
% arg (pr/3285)} |
| 4145 |
% \begin{macrocode} |
| 4146 |
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}% |
| 4147 |
%</article> |
| 4148 |
%<*!article> |
| 4149 |
{\chapter*{\bibname}% |
| 4150 |
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}% |
| 4151 |
%</!article> |
| 4152 |
\list{\@biblabel{\@arabic\c@enumiv}}% |
| 4153 |
{\settowidth\labelwidth{\@biblabel{#1}}% |
| 4154 |
\leftmargin\labelwidth |
| 4155 |
\advance\leftmargin\labelsep |
| 4156 |
\@openbib@code |
| 4157 |
\usecounter{enumiv}% |
| 4158 |
\let\p@enumiv\@empty |
| 4159 |
\renewcommand\theenumiv{\@arabic\c@enumiv}}% |
| 4160 |
\sloppy |
| 4161 |
% \end{macrocode} |
| 4162 |
% This is setting the normal (non-infinite) value of |
| 4163 |
% |\clubpenalty| for the whole of this environment, |
| 4164 |
% so we must reset its stored value also. (Why is there a |%| after |
| 4165 |
% the second 4000 below?) |
| 4166 |
% \begin{macrocode} |
| 4167 |
\clubpenalty4000 |
| 4168 |
\@clubpenalty \clubpenalty |
| 4169 |
\widowpenalty4000% |
| 4170 |
\sfcode`\.\@m} |
| 4171 |
{\def\@noitemerr |
| 4172 |
{\@latex@warning{Empty `thebibliography' environment}}% |
| 4173 |
\endlist} |
| 4174 |
% \end{macrocode} |
| 4175 |
% \end{environment} |
| 4176 |
% |
| 4177 |
% \begin{macro}{\newblock} |
| 4178 |
% The default definition for |\newblock| is to produce a small space. |
| 4179 |
% \changes{v1.3k}{1995/08/27}{Default changed.} |
| 4180 |
% \begin{macrocode} |
| 4181 |
\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} |
| 4182 |
% \end{macrocode} |
| 4183 |
% \end{macro} |
| 4184 |
% |
| 4185 |
% \begin{macro}{\@openbib@code} |
| 4186 |
% The default definition for |\@openbib@code| is to do nothing. |
| 4187 |
% It will be changed by the \Lopt{openbib} option. |
| 4188 |
% \changes{v1.3k}{1995/08/27}{Macro added} |
| 4189 |
% \begin{macrocode} |
| 4190 |
\let\@openbib@code\@empty |
| 4191 |
% \end{macrocode} |
| 4192 |
% \end{macro} |
| 4193 |
% |
| 4194 |
% \begin{macro}{\@biblabel} |
| 4195 |
% The label for a |\bibitem[...]| command is produced by this |
| 4196 |
% macro. The default from the \LaTeX{} format is used. |
| 4197 |
% \begin{macrocode} |
| 4198 |
% \renewcommand*{\@biblabel}[1]{[#1]\hfill} |
| 4199 |
% \end{macrocode} |
| 4200 |
% \end{macro} |
| 4201 |
% |
| 4202 |
% \begin{macro}{\@cite} |
| 4203 |
% The output of the |\cite| command is produced by this macro. The |
| 4204 |
% default from the \LaTeX{} format is used. |
| 4205 |
% \begin{macrocode} |
| 4206 |
% \renewcommand*{\@cite}[1]{[#1]} |
| 4207 |
% \end{macrocode} |
| 4208 |
% \end{macro} |
| 4209 |
% |
| 4210 |
% \subsection{The index} |
| 4211 |
% |
| 4212 |
% \begin{environment}{theindex} |
| 4213 |
% The environment `theindex' can be used for indices. It makes an |
| 4214 |
% index with two columns, with each entry a separate paragraph. At |
| 4215 |
% the user level the commands |\item|, |\subitem| and |\subsubitem| |
| 4216 |
% are used to produce index entries of various levels. When a new |
| 4217 |
% letter of the alphabet is encountered an amount of |\indexspace| |
| 4218 |
% white space can be added. |
| 4219 |
% |
| 4220 |
% |
| 4221 |
% \changes{v1.0g}{1993/12/09}{Moved the setting of |
| 4222 |
% \cs{@restonecoltrue}} |
| 4223 |
% \begin{macrocode} |
| 4224 |
\newenvironment{theindex} |
| 4225 |
{\if@twocolumn |
| 4226 |
\@restonecolfalse |
| 4227 |
\else |
| 4228 |
\@restonecoltrue |
| 4229 |
\fi |
| 4230 |
%<article> \twocolumn[\section*{\indexname}]% |
| 4231 |
%<!article> \twocolumn[\@makeschapterhead{\indexname}]% |
| 4232 |
\@mkboth{\MakeUppercase\indexname}% |
| 4233 |
{\MakeUppercase\indexname}% |
| 4234 |
\thispagestyle{plain}\parindent\z@ |
| 4235 |
% \end{macrocode} |
| 4236 |
% Parameter changes to |\columnseprule| and |\columnsep| have to be |
| 4237 |
% done after |\twocolumn| has acted. Otherwise they can affect the |
| 4238 |
% last page before the index. |
| 4239 |
% \changes{ v1.4f}{2004/02/16}{Moved setting of \cs{columnsep} and |
| 4240 |
% \cs{columnseprule} later to avoid affecting the wrong page (pr/3616)} |
| 4241 |
% \begin{macrocode} |
| 4242 |
\parskip\z@ \@plus .3\p@\relax |
| 4243 |
\columnseprule \z@ |
| 4244 |
\columnsep 35\p@ |
| 4245 |
\let\item\@idxitem} |
| 4246 |
% \end{macrocode} |
| 4247 |
% When the document continues after the index and it was a |
| 4248 |
% one-column document we have to switch back to one column after |
| 4249 |
% the index. |
| 4250 |
% \begin{macrocode} |
| 4251 |
{\if@restonecol\onecolumn\else\clearpage\fi} |
| 4252 |
% \end{macrocode} |
| 4253 |
% \end{environment} |
| 4254 |
% |
| 4255 |
% \begin{macro}{\@idxitem} |
| 4256 |
% \begin{macro}{\subitem} |
| 4257 |
% \begin{macro}{\subsubitem} |
| 4258 |
% These macros are used to format the entries in the index. ^^AA ??? |
| 4259 |
% \changes{v1.3f}{1995/06/23}{Corrected error in definition of |
| 4260 |
% \cs{@idxitem}.} |
| 4261 |
% \changes{v1.3j}{1995/08/16}{use \cs{@idxitem} to save space} |
| 4262 |
% \begin{macrocode} |
| 4263 |
\newcommand\@idxitem{\par\hangindent 40\p@} |
| 4264 |
\newcommand\subitem{\@idxitem \hspace*{20\p@}} |
| 4265 |
\newcommand\subsubitem{\@idxitem \hspace*{30\p@}} |
| 4266 |
% \end{macrocode} |
| 4267 |
% \end{macro} |
| 4268 |
% \end{macro} |
| 4269 |
% \end{macro} |
| 4270 |
% |
| 4271 |
% \begin{macro}{\indexspace} |
| 4272 |
% The amount of white space that is inserted between `letter |
| 4273 |
% blocks' in the index. |
| 4274 |
% \begin{macrocode} |
| 4275 |
\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} |
| 4276 |
% \end{macrocode} |
| 4277 |
% \end{macro} |
| 4278 |
% |
| 4279 |
% \subsection{Footnotes} |
| 4280 |
% |
| 4281 |
% \begin{macro}{\footnoterule} |
| 4282 |
% Usually, footnotes are separated from the main body of the text |
| 4283 |
% by a small rule. This rule is drawn by the macro |\footnoterule|. |
| 4284 |
% We have to make sure that the rule takes no vertical space (see |
| 4285 |
% \file{plain.tex}) so we compensate for the natural height of the |
| 4286 |
% rule of 0.4pt by adding the right amount of vertical skip. |
| 4287 |
% |
| 4288 |
% To prevent the rule from colliding with the footnote we first add |
| 4289 |
% a little negative vertical skip, then we put the rule and make |
| 4290 |
% sure we end up at the same point where we begun this operation. |
| 4291 |
% \changes{v1.3a}{1995/05/17}{use \cs{@width}} |
| 4292 |
% \begin{macrocode} |
| 4293 |
\renewcommand\footnoterule{% |
| 4294 |
\kern-3\p@ |
| 4295 |
\hrule\@width.4\columnwidth |
| 4296 |
\kern2.6\p@} |
| 4297 |
% \end{macrocode} |
| 4298 |
% \end{macro} |
| 4299 |
% |
| 4300 |
% \begin{macro}{\c@footnote} |
| 4301 |
% Footnotes are numbered within chapters in the report and book |
| 4302 |
% document classes. |
| 4303 |
% \begin{macrocode} |
| 4304 |
%<!article>\@addtoreset{footnote}{chapter} |
| 4305 |
% \end{macrocode} |
| 4306 |
% \end{macro} |
| 4307 |
% |
| 4308 |
% \begin{macro}{\@makefntext} |
| 4309 |
% The footnote mechanism of \LaTeX{} calls the macro |\@makefntext| |
| 4310 |
% to produce the actual footnote. The macro gets the text of the |
| 4311 |
% footnote as its argument and should use |\@thefnmark| as the mark |
| 4312 |
% of the footnote. The macro |\@makefntext|is called when |
| 4313 |
% effectively inside a |\parbox| of width |\columnwidth| (i.e., |
| 4314 |
% with |\hsize| = |\columnwidth|). |
| 4315 |
% |
| 4316 |
% An example of what can be achieved is given by the following piece |
| 4317 |
% of \TeX\ code. |
| 4318 |
% \begin{verbatim} |
| 4319 |
% \newcommand\@makefntext[1]{% |
| 4320 |
% \@setpar{\@@par |
| 4321 |
% \@tempdima = \hsize |
| 4322 |
% \advance\@tempdima-10pt |
| 4323 |
% \parshape \@ne 10pt \@tempdima}% |
| 4324 |
% \par |
| 4325 |
% \parindent 1em\noindent |
| 4326 |
% \hbox to \z@{\hss\@makefnmark}#1} |
| 4327 |
% \end{verbatim} |
| 4328 |
% The effect of this definition is that all lines of the footnote |
| 4329 |
% are indented by 10pt, while the first line of a new paragraph is |
| 4330 |
% indented by 1em. To change these dimensions, just substitute the |
| 4331 |
% desired value for `10pt' (in both places) or `1em'. The mark is |
| 4332 |
% flushright against the footnote. |
| 4333 |
% |
| 4334 |
% In these document classes we use a simpler macro, in which the |
| 4335 |
% footnote text is set like an ordinary text paragraph, with no |
| 4336 |
% indentation except on the first line of a paragraph, and the |
| 4337 |
% first line of the footnote. Thus, all the macro must do is set |
| 4338 |
% |\parindent| to the appropriate value for succeeding paragraphs |
| 4339 |
% and put the proper indentation before the mark. |
| 4340 |
% |
| 4341 |
% \changes{v1.1a}{1994/03/13}{Use \cs{@makefnmark} to generate |
| 4342 |
% footnote marker} |
| 4343 |
% \begin{macrocode} |
| 4344 |
\newcommand\@makefntext[1]{% |
| 4345 |
\parindent 1em% |
| 4346 |
\noindent |
| 4347 |
\hb@[email protected]{\hss\@makefnmark}#1} |
| 4348 |
% \end{macrocode} |
| 4349 |
% \end{macro} |
| 4350 |
% |
| 4351 |
% \begin{macro}{\@makefnmark} |
| 4352 |
% The footnote markers that are printed in the text to point to the |
| 4353 |
% footnotes should be produced by the macro |\@makefnmark|. We use |
| 4354 |
% the default definition for it. |
| 4355 |
% \begin{macrocode} |
| 4356 |
%\renewcommand\@makefnmark{\hbox{\@textsuperscript |
| 4357 |
% {\normalfont\@thefnmark}}} |
| 4358 |
% \end{macrocode} |
| 4359 |
% \end{macro} |
| 4360 |
% |
| 4361 |
% \section{Initialization} |
| 4362 |
% |
| 4363 |
% \subsection{Words} |
| 4364 |
% |
| 4365 |
% This document class is for documents prepared in the English language. |
| 4366 |
% To prepare a version for another language, various English words must |
| 4367 |
% be replaced. All the English words that require replacement are |
| 4368 |
% defined below in command names. These commands may be redefined in |
| 4369 |
% any class or package that is customising \LaTeX\ for use with |
| 4370 |
% non-English languages. |
| 4371 |
% \changes{v1.3h}{1995/07/20}{Split up to save on save stack /1742} |
| 4372 |
% |
| 4373 |
% \begin{macro}{\contentsname} |
| 4374 |
% \begin{macro}{\listfigurename} |
| 4375 |
% \begin{macro}{\listtablename} |
| 4376 |
% \begin{macrocode} |
| 4377 |
\newcommand\contentsname{Contents} |
| 4378 |
\newcommand\listfigurename{List of Figures} |
| 4379 |
\newcommand\listtablename{List of Tables} |
| 4380 |
% \end{macrocode} |
| 4381 |
% \end{macro} |
| 4382 |
% \end{macro} |
| 4383 |
% \end{macro} |
| 4384 |
% |
| 4385 |
% \begin{macro}{\refname} |
| 4386 |
% \begin{macro}{\bibname} |
| 4387 |
% \begin{macro}{\indexname} |
| 4388 |
% \begin{macrocode} |
| 4389 |
%<article>\newcommand\refname{References} |
| 4390 |
%<report|book>\newcommand\bibname{Bibliography} |
| 4391 |
\newcommand\indexname{Index} |
| 4392 |
% \end{macrocode} |
| 4393 |
% \end{macro} |
| 4394 |
% \end{macro} |
| 4395 |
% \end{macro} |
| 4396 |
% |
| 4397 |
% \begin{macro}{\figurename} |
| 4398 |
% \begin{macro}{\tablename} |
| 4399 |
% \begin{macrocode} |
| 4400 |
\newcommand\figurename{Figure} |
| 4401 |
\newcommand\tablename{Table} |
| 4402 |
% \end{macrocode} |
| 4403 |
% \end{macro} |
| 4404 |
% \end{macro} |
| 4405 |
% |
| 4406 |
% \begin{macro}{\partname} |
| 4407 |
% \begin{macro}{\chaptername} |
| 4408 |
% \begin{macro}{\appendixname} |
| 4409 |
% \begin{macro}{\abstractname} |
| 4410 |
% \begin{macrocode} |
| 4411 |
\newcommand\partname{Part} |
| 4412 |
%<report|book>\newcommand\chaptername{Chapter} |
| 4413 |
\newcommand\appendixname{Appendix} |
| 4414 |
%<!book>\newcommand\abstractname{Abstract} |
| 4415 |
% \end{macrocode} |
| 4416 |
% \end{macro} |
| 4417 |
% \end{macro} |
| 4418 |
% \end{macro} |
| 4419 |
% \end{macro} |
| 4420 |
% |
| 4421 |
% \subsection{Date} |
| 4422 |
% |
| 4423 |
% \begin{macro}{\today} |
| 4424 |
% This macro uses the \TeX\ primitives |\month|, |\day| and |\year| |
| 4425 |
% to provide the date of the \LaTeX-run. |
| 4426 |
% |
| 4427 |
% At |\begin{document}| this definition will be optimised |
| 4428 |
% so that the names of all the `wrong' months are not stored. |
| 4429 |
% This optimisation is not done here as that would `freeze' |
| 4430 |
% |\today| in any special purpose format made by loading the class |
| 4431 |
% file into the format file. |
| 4432 |
% \changes{v1.3j}{1995/08/16}{use \cs{edef} to save a lot of space} |
| 4433 |
% \changes{v1.3w}{1997/10/06}{use \cs{def} again, latex/2620} |
| 4434 |
% \begin{macrocode} |
| 4435 |
\def\today{\ifcase\month\or |
| 4436 |
January\or February\or March\or April\or May\or June\or |
| 4437 |
July\or August\or September\or October\or November\or December\fi |
| 4438 |
\space\number\day, \number\year} |
| 4439 |
% \end{macrocode} |
| 4440 |
% \end{macro} |
| 4441 |
% |
| 4442 |
% \subsection{Two-column mode} |
| 4443 |
% |
| 4444 |
% \begin{macro}{\columnsep} |
| 4445 |
% This gives the distance between two columns in two-column mode. |
| 4446 |
% \begin{macrocode} |
| 4447 |
\setlength\columnsep{10\p@} |
| 4448 |
% \end{macrocode} |
| 4449 |
% \end{macro} |
| 4450 |
% |
| 4451 |
% \begin{macro}{\columnseprule} |
| 4452 |
% This gives the width of the rule between two columns in |
| 4453 |
% two-column mode. We have no visible rule. |
| 4454 |
% \begin{macrocode} |
| 4455 |
\setlength\columnseprule{0\p@} |
| 4456 |
% \end{macrocode} |
| 4457 |
% \end{macro} |
| 4458 |
% |
| 4459 |
% \subsection{The page style} |
| 4460 |
% We have \pstyle{plain} pages in the document classes article and |
| 4461 |
% report unless the user specified otherwise. In the `book' |
| 4462 |
% document class we use the page style \pstyle{headings} by |
| 4463 |
% default. We use arabic page numbers. |
| 4464 |
% \begin{macrocode} |
| 4465 |
%<!book>\pagestyle{plain} |
| 4466 |
%<book>\pagestyle{headings} |
| 4467 |
\pagenumbering{arabic} |
| 4468 |
% \end{macrocode} |
| 4469 |
% |
| 4470 |
% \subsection{Single or double sided printing} |
| 4471 |
% |
| 4472 |
% |
| 4473 |
% \changes{v1.2v}{1994/11/10}{removed typo} |
| 4474 |
% When the \Lopt{twoside} option wasn't specified, we don't try to |
| 4475 |
% make each page as long as all the others. |
| 4476 |
% \begin{macrocode} |
| 4477 |
\if@twoside |
| 4478 |
\else |
| 4479 |
\raggedbottom |
| 4480 |
\fi |
| 4481 |
% \end{macrocode} |
| 4482 |
% When the \Lopt{twocolumn} option was specified we call |
| 4483 |
% |\twocolumn| to activate this mode. We try to make each column as |
| 4484 |
% long as the others, but call |sloppy| to make our life easier. |
| 4485 |
% \begin{macrocode} |
| 4486 |
\if@twocolumn |
| 4487 |
\twocolumn |
| 4488 |
\sloppy |
| 4489 |
\flushbottom |
| 4490 |
% \end{macrocode} |
| 4491 |
% Normally we call |\onecolumn| to initiate typesetting in one |
| 4492 |
% column. |
| 4493 |
% \begin{macrocode} |
| 4494 |
\else |
| 4495 |
\onecolumn |
| 4496 |
\fi |
| 4497 |
%</article|report|book> |
| 4498 |
% \end{macrocode} |
| 4499 |
% |
| 4500 |
% \changes{v1.3i}{1995/08/09}{Moved code for generic class options |
| 4501 |
% leqno and fleqn to kernel file} |
| 4502 |
% |
| 4503 |
% \Finale |
| 4504 |
% |
| 4505 |
\endinput |