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