Debian Codegraph @

texmf-dist/source/latex/ntgclass/ntgclass.dtx

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