| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright 1989-2008 Johannes L. Braams and any individual authors |
| 4 |
% listed elsewhere in this file. All rights reserved. |
| 5 |
% |
| 6 |
% This file is part of the Babel system. |
| 7 |
% -------------------------------------- |
| 8 |
% |
| 9 |
% It may be distributed and/or modified under the |
| 10 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 11 |
% of this license or (at your option) any later version. |
| 12 |
% The latest version of this license is in |
| 13 |
% http://www.latex-project.org/lppl.txt |
| 14 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 15 |
% version 2003/12/01 or later. |
| 16 |
% |
| 17 |
% This work has the LPPL maintenance status "maintained". |
| 18 |
% |
| 19 |
% The Current Maintainer of this work is Javier Bezos. |
| 20 |
% |
| 21 |
% The list of all files belonging to the Babel system is |
| 22 |
% given in the file `manifest.bbl. See also `legal.bbl' for additional |
| 23 |
% information. |
| 24 |
% |
| 25 |
% The list of derived (unpacked) files belonging to the distribution |
| 26 |
% and covered by LPPL is defined by the unpacking scripts (with |
| 27 |
% extension .ins) which are part of the distribution. |
| 28 |
% \fi |
| 29 |
% \CheckSum{263} |
| 30 |
% |
| 31 |
% \iffalse |
| 32 |
%<*dtx> |
| 33 |
\ProvidesFile{bbcompat.dtx}[2026/05/20 v26.8] |
| 34 |
%</dtx> |
| 35 |
% |
| 36 |
%% File 'bbcompat.dtx' |
| 37 |
%% Copyright (C) 1989 -- 2008 by Johannes Braams, |
| 38 |
%% TeXniek |
| 39 |
%% all rights reserved. |
| 40 |
%<*filedriver> |
| 41 |
\documentclass{ltxdoc} |
| 42 |
\newcommand*\TeXhax{\TeX hax} |
| 43 |
\newcommand*\babel{\textsf{babel}} |
| 44 |
\newcommand*\Lopt[1]{\textsf{#1}} |
| 45 |
\newcommand*\file[1]{\texttt{#1}} |
| 46 |
\newcommand*\pkg[1]{\texttt{#1}} |
| 47 |
\begin{document} |
| 48 |
\DocInput{bbcompat.dtx} |
| 49 |
\end{document} |
| 50 |
%</filedriver> |
| 51 |
% \fi |
| 52 |
% |
| 53 |
% \GetFileInfo{bbcompat.dtx} |
| 54 |
% \changes{bbcompat-1.2j}{2006/06/05}{Small documentation fix} |
| 55 |
% |
| 56 |
% \StopEventually{} |
| 57 |
% |
| 58 |
% \changes{bbcompat-1.2}{1996/11/02}{Added the check for \cs{LdfInit}} |
| 59 |
% \changes{bbcompat-1.2d}{1999/04/12}{When these files are read by a |
| 60 |
% non-babel plain format the @ has still category code `other' so |
| 61 |
% can't use \cs{@undefined}} |
| 62 |
% \begin{macrocode} |
| 63 |
\ifx\LdfInit\undefined |
| 64 |
\def\LdfInit{% |
| 65 |
\chardef\atcatcode=\catcode`\@ |
| 66 |
\catcode`\@=11\relax |
| 67 |
\input babel.def\relax |
| 68 |
\catcode`\@=\atcatcode \let\atcatcode\relax |
| 69 |
\LdfInit} |
| 70 |
\fi |
| 71 |
% \end{macrocode} |
| 72 |
% It seems that these files, although meant for compatibility with |
| 73 |
% \file{plain.tex} are also used as packages in \LaTeXe. The |
| 74 |
% disadvantage of that is that a number of compatibility measures |
| 75 |
% with other packages that are part of \file{babel.sty} are not |
| 76 |
% present. Therefore we issue an error and then load |
| 77 |
% \file{babel.def} to let the user continue processing his |
| 78 |
% document (at his own risk). |
| 79 |
% |
| 80 |
% First we determine whether we are loaded from \LaTeX\ by checking |
| 81 |
% whether |\PackageError| is defined. |
| 82 |
% \begin{macrocode} |
| 83 |
\ifx\PackageError\undefined |
| 84 |
% \end{macrocode} |
| 85 |
% In this case we are not being loaded by \LaTeXe, so just define |
| 86 |
% |\ProvidesLanguage| to prevent an error when the \file{.ldf} file |
| 87 |
% is loaded. |
| 88 |
% \begin{macrocode} |
| 89 |
\def\ProvidesLanguage#1[#2 #3 #4]{% |
| 90 |
\wlog{Language: #1 #4 #3 <#2>}}% |
| 91 |
\else |
| 92 |
% \end{macrocode} |
| 93 |
% Now we define an error message which `deletes' itself from |
| 94 |
% memory. |
| 95 |
% \changes{bbcompat-1.2l}{2013/07/28}{Raise a more useful error.} |
| 96 |
% |
| 97 |
% \begin{macrocode} |
| 98 |
\def\bblstyerror{% |
| 99 |
\PackageError{babel}% |
| 100 |
{You are loading directly a language style.\MessageBreak |
| 101 |
This syntax is deprecated and you must use\MessageBreak |
| 102 |
\string\usepackage[language]\string{babel\string}}% |
| 103 |
{You could proceed but don't complain if you run into errors}% |
| 104 |
\let\bblstyerror\@undefined |
| 105 |
} |
| 106 |
% \end{macrocode} |
| 107 |
% Now we can issue the error, it should appear when these files are |
| 108 |
% loaded from \LaTeXe, with \emph{or} without \file{hyphen.cfg} |
| 109 |
% preloaded in the format. |
| 110 |
% \changes{bbcompat-1.2e}{1999/04/20}{Added a check for |
| 111 |
% \cs{ProvidesLanguage}} |
| 112 |
% \begin{macrocode} |
| 113 |
\ifx\ProvidesLanguage\undefined |
| 114 |
% \end{macrocode} |
| 115 |
% In this case \file{hyphen.cfg} wasn't loaded in the \LaTeXe\ |
| 116 |
% format so we also need to provide a suitable definition for |
| 117 |
% |\ProvidesLanguage|. |
| 118 |
% \begin{macrocode} |
| 119 |
\bblstyerror |
| 120 |
\def\ProvidesLanguage{% |
| 121 |
\chardef\atcatcode=\catcode`\@ |
| 122 |
\catcode`\@=11\relax |
| 123 |
\input babel.def\relax |
| 124 |
\catcode`\@=\atcatcode \let\atcatcode\relax |
| 125 |
\ProvidesLanguage} |
| 126 |
% \end{macrocode} |
| 127 |
% When we end up here, \file{hyphen.cfg} was loaded into the |
| 128 |
% format; we only need to issue the error from \LaTeXe. |
| 129 |
% \begin{macrocode} |
| 130 |
\else |
| 131 |
\bblstyerror |
| 132 |
\fi |
| 133 |
\fi |
| 134 |
% \end{macrocode} |
| 135 |
% \changes{bbcompat-1.2}{1996/07/13}{Added \file{.sty} files and |
| 136 |
% definition of \cs{CurrentOption} for language definition files |
| 137 |
% that are loaded by more than one option.} |
| 138 |
% \changes{bbcompat-1.2}{1996/12/14}{Added \file{welsh.sty}} |
| 139 |
% \changes{bbcompat-1.2b}{1997/02/07}{Added \file{sanskrit.sty}} |
| 140 |
% \changes{bbcompat-1.2c}{1998/03/24}{Added \file{hebrew.sty}} |
| 141 |
% \changes{bbcompat-1.2d}{1999/03/09}{Added \file{ukraineb.sty}} |
| 142 |
% \changes{bbcompat-1.2d}{1999/04/10}{Added \file{ngerman.sty} and |
| 143 |
% \file{naustrian.sty}} |
| 144 |
% \changes{bbcompat-1.2f}{2000/09/26}{Added \file{icelandic.sty}, |
| 145 |
% \file{bulgarian.sty} and \file{samin.sty}} |
| 146 |
% \changes{bbcompat-1.2f}{2000/09/27}{Define \cs{CurrentOption} in |
| 147 |
% each file} |
| 148 |
% \changes{bbcompat-1.2g}{2001/01/19}{Added code for usenglish and |
| 149 |
% ukenglish.sty} |
| 150 |
% \changes{bbcompat-1.2h}{2003/11/13}{Added \file{interlingua.sty}} |
| 151 |
% \changes{bbcompat-1.2i}{2005/11/23}{Added \file{albanian.sty} and |
| 152 |
% \file{bahasam.sty}} |
| 153 |
% \changes{bbcompat-1.2k}{2008/07/06}{Added \file{latin.sty}} |
| 154 |
% \begin{macrocode} |
| 155 |
%<+albanian>\def\CurrentOption{albanian} |
| 156 |
%<+albanian>\input albanian.ldf\relax |
| 157 |
%<+american>\def\CurrentOption{american} |
| 158 |
%<+USenglish>\def\CurrentOption{USenglish} |
| 159 |
%<+british>\def\CurrentOption{british} |
| 160 |
%<+english>\def\CurrentOption{english} |
| 161 |
%<+UKenglish>\def\CurrentOption{UKenglish} |
| 162 |
%<american|british|english|UKenglish|USenglish>\input english.ldf\relax |
| 163 |
%<+bahasa>\def\CurrentOption{bahasai} |
| 164 |
%<+bahasa>\input bahasai.ldf\relax |
| 165 |
%<+bahasam>\def\CurrentOption{bahasam} |
| 166 |
%<+bahasam>\input bahasam.ldf\relax |
| 167 |
%<+breton>\def\CurrentOption{breton} |
| 168 |
%<+breton>\input breton.ldf\relax |
| 169 |
%<+bulgarian>\def\CurrentOption{bulgarian} |
| 170 |
%<+bulgarian>\input bulgarian.ldf\relax |
| 171 |
%<+catalan>\def\CurrentOption{catalan} |
| 172 |
%<+catalan>\input catalan.ldf\relax |
| 173 |
%<+croatian>\def\CurrentOption{croatian} |
| 174 |
%<+croatian>\input croatian.ldf\relax |
| 175 |
%<+czech>\def\CurrentOption{czech} |
| 176 |
%<+czech>\input czech.ldf\relax |
| 177 |
%<+danish>\def\CurrentOption{danish} |
| 178 |
%<+danish>\input danish.ldf\relax |
| 179 |
%<+afrikaans>\def\CurrentOption{afrikaans} |
| 180 |
%<+dutch>\def\CurrentOption{dutch} |
| 181 |
%<+afrikaans|dutch>\input dutch.ldf\relax |
| 182 |
%<+esperanto>\def\CurrentOption{esperanto} |
| 183 |
%<+esperanto>\input esperanto.ldf\relax |
| 184 |
%<+estonian>\def\CurrentOption{estonian} |
| 185 |
%<+estonian>\input estonian.ldf\relax |
| 186 |
%<+finnish>\def\CurrentOption{finnish} |
| 187 |
%<+finnish>\input finnish.ldf\relax |
| 188 |
%<+francais>\def\CurrentOption{french} |
| 189 |
%<+francais>\input french.ldf\relax |
| 190 |
%<+galician>\def\CurrentOption{galician} |
| 191 |
%<+galician>\input galician.ldf\relax |
| 192 |
%<+austrian>\def\CurrentOption{austrian} |
| 193 |
%<+germanb>\def\CurrentOption{german} |
| 194 |
%<+austrian|germanb>\input germanb.ldf\relax |
| 195 |
%<+naustrian>\def\CurrentOption{naustrian} |
| 196 |
%<+ngermanb>\def\CurrentOption{ngerman} |
| 197 |
%<+naustrian|ngermanb>\input ngermanb.ldf\relax |
| 198 |
%<+greek>\def\CurrentOption{greek} |
| 199 |
%<+greek>\input greek.ldf\relax |
| 200 |
%<+icelandic>\def\CurrentOption{icelandic} |
| 201 |
%<+icelandic>\input icelandic.ldf\relax |
| 202 |
%<+interlingua>\def\CurrentOption{interlingua} |
| 203 |
%<+interlingua>\input interlingua.ldf\relax |
| 204 |
%<+irish>\def\CurrentOption{irish} |
| 205 |
%<+irish>\input irish.ldf\relax |
| 206 |
%<+italian>\def\CurrentOption{italian} |
| 207 |
%<+italian>\input italian.ldf\relax |
| 208 |
%<+latin>\def\CurrentOption{latin} |
| 209 |
%<+latin>\input latin.ldf\relax |
| 210 |
%<+lsorbian>\def\CurrentOption{lsorbian} |
| 211 |
%<+lsorbian>\input lsorbian.ldf\relax |
| 212 |
%<+magyar>\def\CurrentOption{magyar} |
| 213 |
%<+hungarian>\def\CurrentOption{hungarian} |
| 214 |
%<+magyar|hungarian>\input magyar.ldf\relax |
| 215 |
%<+norsk>\def\CurrentOption{norsk} |
| 216 |
%<+nynorsk>\def\CurrentOption{nynorsk} |
| 217 |
%<+norsk|nynorsk>\input norsk.ldf\relax |
| 218 |
%<+polish>\def\CurrentOption{polish} |
| 219 |
%<+polish>\input polish.ldf\relax |
| 220 |
%<+portuges>\def\CurrentOption{portuges} |
| 221 |
%<+portuguese>\def\CurrentOption{portuguese} |
| 222 |
%<+brazil>\def\CurrentOption{brazil} |
| 223 |
%<+brazilian>\def\CurrentOption{brazilian} |
| 224 |
%<+portuges|portuguese|brazil|brazilian>\input portuges.ldf\relax |
| 225 |
%<+romanian>\def\CurrentOption{romanian} |
| 226 |
%<+romanian>\input romanian.ldf\relax |
| 227 |
%<+russianb>\def\CurrentOption{russianb} |
| 228 |
%<+russianb>\input russianb.ldf\relax |
| 229 |
%<+ukraineb>\def\CurrentOption{ukraineb} |
| 230 |
%<+ukraineb>\input ukraineb.ldf\relax |
| 231 |
%<+samin>\def\CurrentOption{samin} |
| 232 |
%<+samin>\input samin.ldf\relax |
| 233 |
%<+sanskrit>\def\CurrentOption{sanskrit} |
| 234 |
%<+sanskrit>\input sanskrit.ldf\relax |
| 235 |
%<+scottish>\def\CurrentOption{scottish} |
| 236 |
%<+scottish>\input scottish.ldf\relax |
| 237 |
%<+slovak>\def\CurrentOption{slovak} |
| 238 |
%<+slovak>\input slovak.ldf\relax |
| 239 |
%<+slovene>\def\CurrentOption{slovene} |
| 240 |
%<+slovene>\input slovene.ldf\relax |
| 241 |
%<+spanish>\def\CurrentOption{spanish} |
| 242 |
%<+spanish>\input spanish.ldf\relax |
| 243 |
%<+swedish>\def\CurrentOption{swedish} |
| 244 |
%<+swedish>\input swedish.ldf\relax |
| 245 |
%<+turkish>\def\CurrentOption{turkish} |
| 246 |
%<+turkish>\input turkish.ldf\relax |
| 247 |
%<+usorbian>\def\CurrentOption{usorbian} |
| 248 |
%<+usorbian>\input usorbian.ldf\relax |
| 249 |
%<+welsh>\def\CurrentOption{welsh} |
| 250 |
%<+welsh>\input welsh.ldf\relax |
| 251 |
%<+hebrew>\def\CurrentOption{hebrew} |
| 252 |
%<+hebrew>\input rlbabel.def\input hebrew.ldf\relax |
| 253 |
% \end{macrocode} |
| 254 |
% |
| 255 |
% \section{Internationalizing \LaTeX{} 2.09} |
| 256 |
% |
| 257 |
% Now that we're sure that the code is seen by \LaTeX\ only, we |
| 258 |
% have to find out what the main (primary) document style is |
| 259 |
% because we want to redefine some macros. This is only necessary |
| 260 |
% for releases of \LaTeX\ dated before December~1991. Therefore |
| 261 |
% this part of the code can optionally be included in |
| 262 |
% \file{babel.def} by specifying the \texttt{docstrip} option |
| 263 |
% \texttt{names}. |
| 264 |
% |
| 265 |
% The standard styles can be distinguished by checking whether some |
| 266 |
% macros are defined. In table~\ref{styles} an overview is given of |
| 267 |
% the macros that can be used for this purpose. |
| 268 |
% \begin{table}[htb] |
| 269 |
% \begin{center} |
| 270 |
% \DeleteShortVerb{\|} |
| 271 |
% \begin{tabular}{|lcp{8cm}|} |
| 272 |
% \hline |
| 273 |
% article & : & both the \verb+\chapter+ and \verb+\opening+ |
| 274 |
% macros are undefined\\ |
| 275 |
% report and book & : & the \verb+\chapter+ macro is defined and |
| 276 |
% the \verb+\opening+ is undefined\\ |
| 277 |
% letter & : & the \verb+\chapter+ macro is undefined and |
| 278 |
% the \verb+\opening+ is defined\\ |
| 279 |
% \hline |
| 280 |
% \end{tabular} |
| 281 |
% \caption{How to determine the main document style}\label{styles} |
| 282 |
% \MakeShortVerb{\|} |
| 283 |
% \end{center} |
| 284 |
% \end{table} |
| 285 |
% |
| 286 |
% \noindent The macros that have to be redefined for the |
| 287 |
% \texttt{report} and \texttt{book} document styles happen to be |
| 288 |
% the same, so there is no need to distinguish between those two |
| 289 |
% styles. |
| 290 |
% |
| 291 |
% \begin{macro}{\doc@style} |
| 292 |
% First a parameter |\doc@style| is defined to identify the current |
| 293 |
% document style. This parameter might have been defined by a |
| 294 |
% document style that already uses macros instead of hard-wired |
| 295 |
% texts, such as \file{artikel1.sty}~\cite{BEP}, so the existence of |
| 296 |
% |\doc@style| is checked. If this macro is undefined, i.\,e., if |
| 297 |
% the document style is unknown and could therefore contain |
| 298 |
% hard-wired texts, |\doc@style| is defined to the default |
| 299 |
% value~`0'. |
| 300 |
% \changes{babel~3.0d}{1991/10/29}{Removed use of \cs{@ifundefined}} |
| 301 |
% \begin{macrocode} |
| 302 |
%<*names> |
| 303 |
\ifx\@undefined\doc@style |
| 304 |
\def\doc@style{0}% |
| 305 |
% \end{macrocode} |
| 306 |
% This parameter is defined in the following \texttt{if} |
| 307 |
% construction (see table~\ref{styles}): |
| 308 |
% |
| 309 |
% \begin{macrocode} |
| 310 |
\ifx\@undefined\opening |
| 311 |
\ifx\@undefined\chapter |
| 312 |
\def\doc@style{1}% |
| 313 |
\else |
| 314 |
\def\doc@style{2}% |
| 315 |
\fi |
| 316 |
\else |
| 317 |
\def\doc@style{3}% |
| 318 |
\fi% |
| 319 |
\fi% |
| 320 |
% \end{macrocode} |
| 321 |
% \end{macro} |
| 322 |
% |
| 323 |
% \changes{babel~3.1}{1991/11/05}{Removed definition of |
| 324 |
% \cs{if@restonecol}} |
| 325 |
% |
| 326 |
% Now here comes the real work: we start to redefine things and |
| 327 |
% replace hard-wired texts by macros. These redefinitions should be |
| 328 |
% carried out conditionally, in case it has already been done. |
| 329 |
% |
| 330 |
% For the \texttt{figure} and \texttt{table} environments we have |
| 331 |
% in all styles: |
| 332 |
% \begin{macrocode} |
| 333 |
\@ifundefined{figurename}{\def\fnum@figure{\figurename{} \thefigure}}{} |
| 334 |
\@ifundefined{tablename}{\def\fnum@table{\tablename{} \thetable}}{} |
| 335 |
% \end{macrocode} |
| 336 |
% |
| 337 |
% The rest of the macros have to be treated differently for each |
| 338 |
% style. When |\doc@style| still has its default value nothing |
| 339 |
% needs to be done. |
| 340 |
% \begin{macrocode} |
| 341 |
\ifcase\doc@style\relax |
| 342 |
\or |
| 343 |
% \end{macrocode} |
| 344 |
% |
| 345 |
% This means that \file{babel.def} is read after the |
| 346 |
% \texttt{article} style, where no |\chapter| and |\opening| |
| 347 |
% commands are defined\footnote{A fact that was pointed out to me |
| 348 |
% by Nico Poppelier and was already used in Piet van Oostrum's |
| 349 |
% document style option~\texttt{nl}.}. |
| 350 |
% |
| 351 |
% First we have the |\tableofcontents|, |
| 352 |
% |\listoffigures| and |\listoftables|: |
| 353 |
% \begin{macrocode} |
| 354 |
\@ifundefined{contentsname}% |
| 355 |
{\def\tableofcontents{\section*{\contentsname\@mkboth |
| 356 |
{\uppercase{\contentsname}}{\uppercase{\contentsname}}}% |
| 357 |
\@starttoc{toc}}}{} |
| 358 |
\@ifundefined{listfigurename}% |
| 359 |
{\def\listoffigures{\section*{\listfigurename\@mkboth |
| 360 |
{\uppercase{\listfigurename}}{\uppercase{\listfigurename}}}% |
| 361 |
\@starttoc{lof}}}{} |
| 362 |
\@ifundefined{listtablename}% |
| 363 |
{\def\listoftables{\section*{\listtablename\@mkboth |
| 364 |
{\uppercase{\listtablename}}{\uppercase{\listtablename}}}% |
| 365 |
\@starttoc{lot}}}{} |
| 366 |
% \end{macrocode} |
| 367 |
% |
| 368 |
% Then the |\thebibliography| and |\theindex| environments. |
| 369 |
% |
| 370 |
% \begin{macrocode} |
| 371 |
\@ifundefined{refname}% |
| 372 |
{\def\thebibliography#1{\section*{\refname |
| 373 |
\@mkboth{\uppercase{\refname}}{\uppercase{\refname}}}% |
| 374 |
\list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}% |
| 375 |
\leftmargin\labelwidth |
| 376 |
\advance\leftmargin\labelsep |
| 377 |
\usecounter{enumi}}% |
| 378 |
\def\newblock{\hskip.11em plus.33em minus.07em}% |
| 379 |
\sloppy\clubpenalty4000\widowpenalty\clubpenalty |
| 380 |
\sfcode`\.=1000\relax}}{} |
| 381 |
\@ifundefined{indexname}% |
| 382 |
{\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi |
| 383 |
\columnseprule \z@ |
| 384 |
\columnsep 35pt\twocolumn[\section*{\indexname}]% |
| 385 |
\@mkboth{\uppercase{\indexname}}{\uppercase{\indexname}}% |
| 386 |
\thispagestyle{plain}% |
| 387 |
\parskip\z@ plus.3pt\parindent\z@\let\item\@idxitem}}{} |
| 388 |
% \end{macrocode} |
| 389 |
% |
| 390 |
% The |abstract| environment: |
| 391 |
% |
| 392 |
% \begin{macrocode} |
| 393 |
\@ifundefined{abstractname}% |
| 394 |
{\def\abstract{\if@twocolumn |
| 395 |
\section*{\abstractname}% |
| 396 |
\else \small |
| 397 |
\begin{center}% |
| 398 |
{\bf \abstractname\vspace{-.5em}\vspace{\z@}}% |
| 399 |
\end{center}% |
| 400 |
\quotation |
| 401 |
\fi}}{} |
| 402 |
% \end{macrocode} |
| 403 |
% |
| 404 |
% And last but not least, the macro |\part|: |
| 405 |
% |
| 406 |
% \begin{macrocode} |
| 407 |
\@ifundefined{partname}% |
| 408 |
{\def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne |
| 409 |
\refstepcounter{part}% |
| 410 |
\addcontentsline{toc}{part}{\thepart |
| 411 |
\hspace{1em}#1}\else |
| 412 |
\addcontentsline{toc}{part}{#1}\fi |
| 413 |
{\parindent\z@ \raggedright |
| 414 |
\ifnum \c@secnumdepth >\m@ne |
| 415 |
\Large \bf \partname{} \thepart |
| 416 |
\par \nobreak |
| 417 |
\fi |
| 418 |
\huge \bf |
| 419 |
#2\markboth{}{}\par}% |
| 420 |
\nobreak |
| 421 |
\vskip 3ex\@afterheading}% |
| 422 |
}{} |
| 423 |
% \end{macrocode} |
| 424 |
% |
| 425 |
% This is all that needs to be done for the \texttt{article} style. |
| 426 |
% |
| 427 |
% \begin{macrocode} |
| 428 |
\or |
| 429 |
% \end{macrocode} |
| 430 |
% |
| 431 |
% The next case is formed by the two styles \texttt{book} and |
| 432 |
% \texttt{report}. Basically we have to do the same as for the |
| 433 |
% \texttt{article} style, except now we must also change the |
| 434 |
% |\chapter| command. |
| 435 |
% |
| 436 |
% The tables of contents, figures and tables: |
| 437 |
% \begin{macrocode} |
| 438 |
\@ifundefined{contentsname}% |
| 439 |
{\def\tableofcontents{\@restonecolfalse |
| 440 |
\if@twocolumn\@restonecoltrue\onecolumn |
| 441 |
\fi\chapter*{\contentsname\@mkboth |
| 442 |
{\uppercase{\contentsname}}{\uppercase{\contentsname}}}% |
| 443 |
\@starttoc{toc}% |
| 444 |
\csname if@restonecol\endcsname\twocolumn |
| 445 |
\csname fi\endcsname}}{} |
| 446 |
\@ifundefined{listfigurename}% |
| 447 |
{\def\listoffigures{\@restonecolfalse |
| 448 |
\if@twocolumn\@restonecoltrue\onecolumn |
| 449 |
\fi\chapter*{\listfigurename\@mkboth |
| 450 |
{\uppercase{\listfigurename}}{\uppercase{\listfigurename}}}% |
| 451 |
\@starttoc{lof}% |
| 452 |
\csname if@restonecol\endcsname\twocolumn |
| 453 |
\csname fi\endcsname}}{} |
| 454 |
\@ifundefined{listtablename}% |
| 455 |
{\def\listoftables{\@restonecolfalse |
| 456 |
\if@twocolumn\@restonecoltrue\onecolumn |
| 457 |
\fi\chapter*{\listtablename\@mkboth |
| 458 |
{\uppercase{\listtablename}}{\uppercase{\listtablename}}}% |
| 459 |
\@starttoc{lot}% |
| 460 |
\csname if@restonecol\endcsname\twocolumn |
| 461 |
\csname fi\endcsname}}{} |
| 462 |
% \end{macrocode} |
| 463 |
% |
| 464 |
% Again, the |bibliography| and |index| environments; notice that |
| 465 |
% in this case we use |\bibname| instead of |\refname| as in the |
| 466 |
% definitions for the \texttt{article} style. The reason for this |
| 467 |
% is that in the \texttt{article} document style the term |
| 468 |
% `References' is used in the definition of |\thebibliography|. In |
| 469 |
% the \texttt{report} and \texttt{book} document styles the term |
| 470 |
% `Bibliography' is used. |
| 471 |
% \begin{macrocode} |
| 472 |
\@ifundefined{bibname}% |
| 473 |
{\def\thebibliography#1{\chapter*{\bibname |
| 474 |
\@mkboth{\uppercase{\bibname}}{\uppercase{\bibname}}}% |
| 475 |
\list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}% |
| 476 |
\leftmargin\labelwidth \advance\leftmargin\labelsep |
| 477 |
\usecounter{enumi}}% |
| 478 |
\def\newblock{\hskip.11em plus.33em minus.07em}% |
| 479 |
\sloppy\clubpenalty4000\widowpenalty\clubpenalty |
| 480 |
\sfcode`\.=1000\relax}}{} |
| 481 |
\@ifundefined{indexname}% |
| 482 |
{\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi |
| 483 |
\columnseprule \z@ |
| 484 |
\columnsep 35pt\twocolumn[\@makeschapterhead{\indexname}]% |
| 485 |
\@mkboth{\uppercase{\indexname}}{\uppercase{\indexname}}% |
| 486 |
\thispagestyle{plain}% |
| 487 |
\parskip\z@ plus.3pt\parindent\z@ \let\item\@idxitem}}{} |
| 488 |
% \end{macrocode} |
| 489 |
% |
| 490 |
% Here is the |abstract| environment: |
| 491 |
% \begin{macrocode} |
| 492 |
\@ifundefined{abstractname}% |
| 493 |
{\def\abstract{\titlepage |
| 494 |
\null\vfil |
| 495 |
\begin{center}% |
| 496 |
{\bf \abstractname}% |
| 497 |
\end{center}}}{} |
| 498 |
% \end{macrocode} |
| 499 |
% |
| 500 |
% And last but not least the |\chapter|, |\appendix| and |
| 501 |
% |\part| macros. |
| 502 |
% \begin{macrocode} |
| 503 |
\@ifundefined{chaptername}{\def\@chapapp{\chaptername}}{} |
| 504 |
% |
| 505 |
\@ifundefined{appendixname}% |
| 506 |
{\def\appendix{\par |
| 507 |
\setcounter{chapter}{0}% |
| 508 |
\setcounter{section}{0}% |
| 509 |
\def\@chapapp{\appendixname}% |
| 510 |
\def\thechapter{\Alph{chapter}}}}{} |
| 511 |
% |
| 512 |
\@ifundefined{partname}% |
| 513 |
{\def\@part[#1]#2{\ifnum \c@secnumdepth >-2\relax |
| 514 |
\refstepcounter{part}% |
| 515 |
\addcontentsline{toc}{part}{\thepart |
| 516 |
\hspace{1em}#1}\else |
| 517 |
\addcontentsline{toc}{part}{#1}\fi |
| 518 |
\markboth{}{}% |
| 519 |
{\centering |
| 520 |
\ifnum \c@secnumdepth >-2\relax |
| 521 |
\huge\bf \partname{} \thepart |
| 522 |
\par |
| 523 |
\vskip 20pt \fi |
| 524 |
\Huge \bf |
| 525 |
#1\par}\@endpart}}{}% |
| 526 |
\or |
| 527 |
% \end{macrocode} |
| 528 |
% |
| 529 |
% Now we address the case where \file{babel.def} is read after the |
| 530 |
% \texttt{letter} style. The \texttt{letter} document style |
| 531 |
% defines the macro |\opening| and some other macros that are |
| 532 |
% specific to \texttt{letter}. This means that we have to redefine |
| 533 |
% other macros, compared to the previous two cases. |
| 534 |
% |
| 535 |
% First two macros for the material at the end of a letter, the |
| 536 |
% |\cc| and |\encl| macros. |
| 537 |
% \begin{macrocode} |
| 538 |
\@ifundefined{ccname}% |
| 539 |
{\def\cc#1{\par\noindent |
| 540 |
\parbox[t]{\textwidth}% |
| 541 |
{\@hangfrom{\rm \ccname : }\ignorespaces #1\strut}\par}}{} |
| 542 |
\@ifundefined{enclname}% |
| 543 |
{\def\encl#1{\par\noindent |
| 544 |
\parbox[t]{\textwidth}% |
| 545 |
{\@hangfrom{\rm \enclname : }\ignorespaces #1\strut}\par}}{} |
| 546 |
% \end{macrocode} |
| 547 |
% |
| 548 |
% The last thing we have to do here is to redefine the |
| 549 |
% \texttt{headings} pagestyle: |
| 550 |
% \changes{babel~3.3}{1993/07/11}{\cs{headpagename} should be |
| 551 |
% \cs{pagename}} |
| 552 |
% \begin{macrocode} |
| 553 |
\@ifundefined{headtoname}% |
| 554 |
{\def\ps@headings{% |
| 555 |
\def\@oddhead{\sl \headtoname{} \ignorespaces\toname \hfil |
| 556 |
\@date \hfil \pagename{} \thepage}% |
| 557 |
\def\@oddfoot{}}}{} |
| 558 |
\fi |
| 559 |
%</names> |
| 560 |
% \end{macrocode} |
| 561 |
% |
| 562 |
% This was the last of the four standard document styles, so if |
| 563 |
% |\doc@style| has another value we do nothing and just close the |
| 564 |
% \texttt{if} construction. Here ends the code that can be optionally |
| 565 |
% included when a version of \LaTeX\ is in use that is dated |
| 566 |
% \emph{before} December~1991. |
| 567 |
% |
| 568 |
% We also need to redefine a number of commands to ensure that the |
| 569 |
% right font encoding is used, but this can't be done before |
| 570 |
% \file{babel.def} is loaded. |
| 571 |
% \changes{babel~3.6o}{1999/04/07}{Moved the rest of the font encoding |
| 572 |
% related definitions to their original place} |
| 573 |
% |
| 574 |
%% |
| 575 |
%% \CharacterTable |
| 576 |
%% {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 |
| 577 |
%% 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 |
| 578 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 579 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 580 |
%% Dollar \$ Percent \% Ampersand \& |
| 581 |
%% Acute accent \' Left paren \( Right paren \) |
| 582 |
%% Asterisk \* Plus \+ Comma \, |
| 583 |
%% Minus \- Point \. Solidus \/ |
| 584 |
%% Colon \: Semicolon \; Less than \< |
| 585 |
%% Equals \= Greater than \> Question mark \? |
| 586 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 587 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 588 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 589 |
%% Right brace \} Tilde \~} |
| 590 |
\endinput |