% \iffalse meta-comment % % Copyright 1989-2008 Johannes L. Braams and any individual authors % listed elsewhere in this file. All rights reserved. % % This file is part of the Babel system. % -------------------------------------- % % It may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2003/12/01 or later. % % This work has the LPPL maintenance status "maintained". % % The Current Maintainer of this work is Javier Bezos. % % The list of all files belonging to the Babel system is % given in the file `manifest.bbl. See also `legal.bbl' for additional % information. % % The list of derived (unpacked) files belonging to the distribution % and covered by LPPL is defined by the unpacking scripts (with % extension .ins) which are part of the distribution. % \fi % \CheckSum{263} % % \iffalse %<*dtx> \ProvidesFile{bbcompat.dtx}[2019/05/04 v3.31] % % %% File 'bbcompat.dtx' %% Copyright (C) 1989 -- 2008 by Johannes Braams, %% TeXniek %% all rights reserved. %<*filedriver> \documentclass{ltxdoc} \newcommand*\TeXhax{\TeX hax} \newcommand*\babel{\textsf{babel}} \newcommand*\Lopt[1]{\textsf{#1}} \newcommand*\file[1]{\texttt{#1}} \newcommand*\pkg[1]{\texttt{#1}} \begin{document} \DocInput{bbcompat.dtx} \end{document} % % \fi % % \GetFileInfo{bbcompat.dtx} % \changes{bbcompat-1.2j}{2006/06/05}{Small documentation fix} % % \StopEventually{} % % \changes{bbcompat-1.2}{1996/11/02}{Added the check for \cs{LdfInit}} % \changes{bbcompat-1.2d}{1999/04/12}{When these files are read by a % non-babel plain format the @ has still category code `other' so % can't use \cs{@undefined}} % \begin{macrocode} \ifx\LdfInit\undefined \def\LdfInit{% \chardef\atcatcode=\catcode`\@ \catcode`\@=11\relax \input babel.def\relax \catcode`\@=\atcatcode \let\atcatcode\relax \LdfInit} \fi % \end{macrocode} % It seems that these files, although meant for compatibility with % \file{plain.tex} are also used as packages in \LaTeXe. The % disadvantage of that is that a number of compatibility measures % with other packages that are part of \file{babel.sty} are not % present. Therefore we issue an error and then load % \file{babel.def} to let the user continue processing his % document (at his own risk). % % First we determine whether we are loaded from \LaTeX\ by checking % whether |\PackageError| is defined. % \begin{macrocode} \ifx\PackageError\undefined % \end{macrocode} % In this case we are not being loaded by \LaTeXe, so just define % |\ProvidesLanguage| to prevent an error when the \file{.ldf} file % is loaded. % \begin{macrocode} \def\ProvidesLanguage#1[#2 #3 #4]{% \wlog{Language: #1 #4 #3 <#2>}}% \else % \end{macrocode} % Now we define an error message which `deletes' itself from % memory. % \changes{bbcompat-1.2l}{2013/07/28}{Raise a more useful error.} % % \begin{macrocode} \def\bblstyerror{% \PackageError{babel}% {You are loading directly a language style.\MessageBreak This syntax is deprecated and you must use\MessageBreak \string\usepackage[language]\string{babel\string}}% {You could proceed but don't complain if you run into errors}% \let\bblstyerror\@undefined } % \end{macrocode} % Now we can issue the error, it should appear when these files are % loaded from \LaTeXe, with \emph{or} without \file{hyphen.cfg} % preloaded in the format. % \changes{bbcompat-1.2e}{1999/04/20}{Added a check for % \cs{ProvidesLanguage}} % \begin{macrocode} \ifx\ProvidesLanguage\undefined % \end{macrocode} % In this case \file{hyphen.cfg} wasn't loaded in the \LaTeXe\ % format so we also need to provide a suitable definition for % |\ProvidesLanguage|. % \begin{macrocode} \bblstyerror \def\ProvidesLanguage{% \chardef\atcatcode=\catcode`\@ \catcode`\@=11\relax \input babel.def\relax \catcode`\@=\atcatcode \let\atcatcode\relax \ProvidesLanguage} % \end{macrocode} % When we end up here, \file{hyphen.cfg} was loaded into the % format; we only need to issue the error from \LaTeXe. % \begin{macrocode} \else \bblstyerror \fi \fi % \end{macrocode} % \changes{bbcompat-1.2}{1996/07/13}{Added \file{.sty} files and % definition of \cs{CurrentOption} for language definition files % that are loaded by more than one option.} % \changes{bbcompat-1.2}{1996/12/14}{Added \file{welsh.sty}} % \changes{bbcompat-1.2b}{1997/02/07}{Added \file{sanskrit.sty}} % \changes{bbcompat-1.2c}{1998/03/24}{Added \file{hebrew.sty}} % \changes{bbcompat-1.2d}{1999/03/09}{Added \file{ukraineb.sty}} % \changes{bbcompat-1.2d}{1999/04/10}{Added \file{ngerman.sty} and % \file{naustrian.sty}} % \changes{bbcompat-1.2f}{2000/09/26}{Added \file{icelandic.sty}, % \file{bulgarian.sty} and \file{samin.sty}} % \changes{bbcompat-1.2f}{2000/09/27}{Define \cs{CurrentOption} in % each file} % \changes{bbcompat-1.2g}{2001/01/19}{Added code for usenglish and % ukenglish.sty} % \changes{bbcompat-1.2h}{2003/11/13}{Added \file{interlingua.sty}} % \changes{bbcompat-1.2i}{2005/11/23}{Added \file{albanian.sty} and % \file{bahasam.sty}} % \changes{bbcompat-1.2k}{2008/07/06}{Added \file{latin.sty}} % \begin{macrocode} %<+albanian>\def\CurrentOption{albanian} %<+albanian>\input albanian.ldf\relax %<+american>\def\CurrentOption{american} %<+USenglish>\def\CurrentOption{USenglish} %<+british>\def\CurrentOption{british} %<+english>\def\CurrentOption{english} %<+UKenglish>\def\CurrentOption{UKenglish} %\input english.ldf\relax %<+bahasa>\def\CurrentOption{bahasai} %<+bahasa>\input bahasai.ldf\relax %<+bahasam>\def\CurrentOption{bahasam} %<+bahasam>\input bahasam.ldf\relax %<+breton>\def\CurrentOption{breton} %<+breton>\input breton.ldf\relax %<+bulgarian>\def\CurrentOption{bulgarian} %<+bulgarian>\input bulgarian.ldf\relax %<+catalan>\def\CurrentOption{catalan} %<+catalan>\input catalan.ldf\relax %<+croatian>\def\CurrentOption{croatian} %<+croatian>\input croatian.ldf\relax %<+czech>\def\CurrentOption{czech} %<+czech>\input czech.ldf\relax %<+danish>\def\CurrentOption{danish} %<+danish>\input danish.ldf\relax %<+afrikaans>\def\CurrentOption{afrikaans} %<+dutch>\def\CurrentOption{dutch} %<+afrikaans|dutch>\input dutch.ldf\relax %<+esperanto>\def\CurrentOption{esperanto} %<+esperanto>\input esperanto.ldf\relax %<+estonian>\def\CurrentOption{estonian} %<+estonian>\input estonian.ldf\relax %<+finnish>\def\CurrentOption{finnish} %<+finnish>\input finnish.ldf\relax %<+francais>\def\CurrentOption{french} %<+francais>\input french.ldf\relax %<+galician>\def\CurrentOption{galician} %<+galician>\input galician.ldf\relax %<+austrian>\def\CurrentOption{austrian} %<+german>\def\CurrentOption{german} %<+germanb>\def\CurrentOption{german} %<+austrian|german|germanb>\input germanb.ldf\relax %<+naustrian>\def\CurrentOption{naustrian} %<+ngerman>\def\CurrentOption{ngerman} %<+naustrian|ngerman>\input ngermanb.ldf\relax %<+greek>\def\CurrentOption{greek} %<+greek>\input greek.ldf\relax %<+icelandic>\def\CurrentOption{icelandic} %<+icelandic>\input icelandic.ldf\relax %<+interlingua>\def\CurrentOption{interlingua} %<+interlingua>\input interlingua.ldf\relax %<+irish>\def\CurrentOption{irish} %<+irish>\input irish.ldf\relax %<+italian>\def\CurrentOption{italian} %<+italian>\input italian.ldf\relax %<+latin>\def\CurrentOption{latin} %<+latin>\input latin.ldf\relax %<+lsorbian>\def\CurrentOption{lsorbian} %<+lsorbian>\input lsorbian.ldf\relax %<+magyar>\def\CurrentOption{magyar} %<+hungarian>\def\CurrentOption{hungarian} %<+magyar|hungarian>\input magyar.ldf\relax %<+norsk>\def\CurrentOption{norsk} %<+nynorsk>\def\CurrentOption{nynorsk} %<+norsk|nynorsk>\input norsk.ldf\relax %<+polish>\def\CurrentOption{polish} %<+polish>\input polish.ldf\relax %<+portuges>\def\CurrentOption{portuges} %<+portuguese>\def\CurrentOption{portuguese} %<+brazil>\def\CurrentOption{brazil} %<+brazilian>\def\CurrentOption{brazilian} %<+portuges|portuguese|brazil|brazilian>\input portuges.ldf\relax %<+romanian>\def\CurrentOption{romanian} %<+romanian>\input romanian.ldf\relax %<+russianb>\def\CurrentOption{russianb} %<+russianb>\input russianb.ldf\relax %<+ukraineb>\def\CurrentOption{ukraineb} %<+ukraineb>\input ukraineb.ldf\relax %<+samin>\def\CurrentOption{samin} %<+samin>\input samin.ldf\relax %<+sanskrit>\def\CurrentOption{sanskrit} %<+sanskrit>\input sanskrit.ldf\relax %<+scottish>\def\CurrentOption{scottish} %<+scottish>\input scottish.ldf\relax %<+slovak>\def\CurrentOption{slovak} %<+slovak>\input slovak.ldf\relax %<+slovene>\def\CurrentOption{slovene} %<+slovene>\input slovene.ldf\relax %<+spanish>\def\CurrentOption{spanish} %<+spanish>\input spanish.ldf\relax %<+swedish>\def\CurrentOption{swedish} %<+swedish>\input swedish.ldf\relax %<+turkish>\def\CurrentOption{turkish} %<+turkish>\input turkish.ldf\relax %<+usorbian>\def\CurrentOption{usorbian} %<+usorbian>\input usorbian.ldf\relax %<+welsh>\def\CurrentOption{welsh} %<+welsh>\input welsh.ldf\relax %<+hebrew>\def\CurrentOption{hebrew} %<+hebrew>\input rlbabel.def\input hebrew.ldf\relax % \end{macrocode} % % \section{Internationalizing \LaTeX{} 2.09} % % Now that we're sure that the code is seen by \LaTeX\ only, we % have to find out what the main (primary) document style is % because we want to redefine some macros. This is only necessary % for releases of \LaTeX\ dated before December~1991. Therefore % this part of the code can optionally be included in % \file{babel.def} by specifying the \texttt{docstrip} option % \texttt{names}. % % The standard styles can be distinguished by checking whether some % macros are defined. In table~\ref{styles} an overview is given of % the macros that can be used for this purpose. % \begin{table}[htb] % \begin{center} % \DeleteShortVerb{\|} % \begin{tabular}{|lcp{8cm}|} % \hline % article & : & both the \verb+\chapter+ and \verb+\opening+ % macros are undefined\\ % report and book & : & the \verb+\chapter+ macro is defined and % the \verb+\opening+ is undefined\\ % letter & : & the \verb+\chapter+ macro is undefined and % the \verb+\opening+ is defined\\ % \hline % \end{tabular} % \caption{How to determine the main document style}\label{styles} % \MakeShortVerb{\|} % \end{center} % \end{table} % % \noindent The macros that have to be redefined for the % \texttt{report} and \texttt{book} document styles happen to be % the same, so there is no need to distinguish between those two % styles. % % \begin{macro}{\doc@style} % First a parameter |\doc@style| is defined to identify the current % document style. This parameter might have been defined by a % document style that already uses macros instead of hard-wired % texts, such as \file{artikel1.sty}~\cite{BEP}, so the existence of % |\doc@style| is checked. If this macro is undefined, i.\,e., if % the document style is unknown and could therefore contain % hard-wired texts, |\doc@style| is defined to the default % value~`0'. % \changes{babel~3.0d}{1991/10/29}{Removed use of \cs{@ifundefined}} % \begin{macrocode} %<*names> \ifx\@undefined\doc@style \def\doc@style{0}% % \end{macrocode} % This parameter is defined in the following \texttt{if} % construction (see table~\ref{styles}): % % \begin{macrocode} \ifx\@undefined\opening \ifx\@undefined\chapter \def\doc@style{1}% \else \def\doc@style{2}% \fi \else \def\doc@style{3}% \fi% \fi% % \end{macrocode} % \end{macro} % % \changes{babel~3.1}{1991/11/05}{Removed definition of % \cs{if@restonecol}} % % Now here comes the real work: we start to redefine things and % replace hard-wired texts by macros. These redefinitions should be % carried out conditionally, in case it has already been done. % % For the \texttt{figure} and \texttt{table} environments we have % in all styles: % \begin{macrocode} \@ifundefined{figurename}{\def\fnum@figure{\figurename{} \thefigure}}{} \@ifundefined{tablename}{\def\fnum@table{\tablename{} \thetable}}{} % \end{macrocode} % % The rest of the macros have to be treated differently for each % style. When |\doc@style| still has its default value nothing % needs to be done. % \begin{macrocode} \ifcase\doc@style\relax \or % \end{macrocode} % % This means that \file{babel.def} is read after the % \texttt{article} style, where no |\chapter| and |\opening| % commands are defined\footnote{A fact that was pointed out to me % by Nico Poppelier and was already used in Piet van Oostrum's % document style option~\texttt{nl}.}. % % First we have the |\tableofcontents|, % |\listoffigures| and |\listoftables|: % \begin{macrocode} \@ifundefined{contentsname}% {\def\tableofcontents{\section*{\contentsname\@mkboth {\uppercase{\contentsname}}{\uppercase{\contentsname}}}% \@starttoc{toc}}}{} \@ifundefined{listfigurename}% {\def\listoffigures{\section*{\listfigurename\@mkboth {\uppercase{\listfigurename}}{\uppercase{\listfigurename}}}% \@starttoc{lof}}}{} \@ifundefined{listtablename}% {\def\listoftables{\section*{\listtablename\@mkboth {\uppercase{\listtablename}}{\uppercase{\listtablename}}}% \@starttoc{lot}}}{} % \end{macrocode} % % Then the |\thebibliography| and |\theindex| environments. % % \begin{macrocode} \@ifundefined{refname}% {\def\thebibliography#1{\section*{\refname \@mkboth{\uppercase{\refname}}{\uppercase{\refname}}}% \list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}% \leftmargin\labelwidth \advance\leftmargin\labelsep \usecounter{enumi}}% \def\newblock{\hskip.11em plus.33em minus.07em}% \sloppy\clubpenalty4000\widowpenalty\clubpenalty \sfcode`\.=1000\relax}}{} \@ifundefined{indexname}% {\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi \columnseprule \z@ \columnsep 35pt\twocolumn[\section*{\indexname}]% \@mkboth{\uppercase{\indexname}}{\uppercase{\indexname}}% \thispagestyle{plain}% \parskip\z@ plus.3pt\parindent\z@\let\item\@idxitem}}{} % \end{macrocode} % % The |abstract| environment: % % \begin{macrocode} \@ifundefined{abstractname}% {\def\abstract{\if@twocolumn \section*{\abstractname}% \else \small \begin{center}% {\bf \abstractname\vspace{-.5em}\vspace{\z@}}% \end{center}% \quotation \fi}}{} % \end{macrocode} % % And last but not least, the macro |\part|: % % \begin{macrocode} \@ifundefined{partname}% {\def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne \refstepcounter{part}% \addcontentsline{toc}{part}{\thepart \hspace{1em}#1}\else \addcontentsline{toc}{part}{#1}\fi {\parindent\z@ \raggedright \ifnum \c@secnumdepth >\m@ne \Large \bf \partname{} \thepart \par \nobreak \fi \huge \bf #2\markboth{}{}\par}% \nobreak \vskip 3ex\@afterheading}% }{} % \end{macrocode} % % This is all that needs to be done for the \texttt{article} style. % % \begin{macrocode} \or % \end{macrocode} % % The next case is formed by the two styles \texttt{book} and % \texttt{report}. Basically we have to do the same as for the % \texttt{article} style, except now we must also change the % |\chapter| command. % % The tables of contents, figures and tables: % \begin{macrocode} \@ifundefined{contentsname}% {\def\tableofcontents{\@restonecolfalse \if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{\contentsname\@mkboth {\uppercase{\contentsname}}{\uppercase{\contentsname}}}% \@starttoc{toc}% \csname if@restonecol\endcsname\twocolumn \csname fi\endcsname}}{} \@ifundefined{listfigurename}% {\def\listoffigures{\@restonecolfalse \if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{\listfigurename\@mkboth {\uppercase{\listfigurename}}{\uppercase{\listfigurename}}}% \@starttoc{lof}% \csname if@restonecol\endcsname\twocolumn \csname fi\endcsname}}{} \@ifundefined{listtablename}% {\def\listoftables{\@restonecolfalse \if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{\listtablename\@mkboth {\uppercase{\listtablename}}{\uppercase{\listtablename}}}% \@starttoc{lot}% \csname if@restonecol\endcsname\twocolumn \csname fi\endcsname}}{} % \end{macrocode} % % Again, the |bibliography| and |index| environments; notice that % in this case we use |\bibname| instead of |\refname| as in the % definitions for the \texttt{article} style. The reason for this % is that in the \texttt{article} document style the term % `References' is used in the definition of |\thebibliography|. In % the \texttt{report} and \texttt{book} document styles the term % `Bibliography' is used. % \begin{macrocode} \@ifundefined{bibname}% {\def\thebibliography#1{\chapter*{\bibname \@mkboth{\uppercase{\bibname}}{\uppercase{\bibname}}}% \list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}% \leftmargin\labelwidth \advance\leftmargin\labelsep \usecounter{enumi}}% \def\newblock{\hskip.11em plus.33em minus.07em}% \sloppy\clubpenalty4000\widowpenalty\clubpenalty \sfcode`\.=1000\relax}}{} \@ifundefined{indexname}% {\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi \columnseprule \z@ \columnsep 35pt\twocolumn[\@makeschapterhead{\indexname}]% \@mkboth{\uppercase{\indexname}}{\uppercase{\indexname}}% \thispagestyle{plain}% \parskip\z@ plus.3pt\parindent\z@ \let\item\@idxitem}}{} % \end{macrocode} % % Here is the |abstract| environment: % \begin{macrocode} \@ifundefined{abstractname}% {\def\abstract{\titlepage \null\vfil \begin{center}% {\bf \abstractname}% \end{center}}}{} % \end{macrocode} % % And last but not least the |\chapter|, |\appendix| and % |\part| macros. % \begin{macrocode} \@ifundefined{chaptername}{\def\@chapapp{\chaptername}}{} % \@ifundefined{appendixname}% {\def\appendix{\par \setcounter{chapter}{0}% \setcounter{section}{0}% \def\@chapapp{\appendixname}% \def\thechapter{\Alph{chapter}}}}{} % \@ifundefined{partname}% {\def\@part[#1]#2{\ifnum \c@secnumdepth >-2\relax \refstepcounter{part}% \addcontentsline{toc}{part}{\thepart \hspace{1em}#1}\else \addcontentsline{toc}{part}{#1}\fi \markboth{}{}% {\centering \ifnum \c@secnumdepth >-2\relax \huge\bf \partname{} \thepart \par \vskip 20pt \fi \Huge \bf #1\par}\@endpart}}{}% \or % \end{macrocode} % % Now we address the case where \file{babel.def} is read after the % \texttt{letter} style. The \texttt{letter} document style % defines the macro |\opening| and some other macros that are % specific to \texttt{letter}. This means that we have to redefine % other macros, compared to the previous two cases. % % First two macros for the material at the end of a letter, the % |\cc| and |\encl| macros. % \begin{macrocode} \@ifundefined{ccname}% {\def\cc#1{\par\noindent \parbox[t]{\textwidth}% {\@hangfrom{\rm \ccname : }\ignorespaces #1\strut}\par}}{} \@ifundefined{enclname}% {\def\encl#1{\par\noindent \parbox[t]{\textwidth}% {\@hangfrom{\rm \enclname : }\ignorespaces #1\strut}\par}}{} % \end{macrocode} % % The last thing we have to do here is to redefine the % \texttt{headings} pagestyle: % \changes{babel~3.3}{1993/07/11}{\cs{headpagename} should be % \cs{pagename}} % \begin{macrocode} \@ifundefined{headtoname}% {\def\ps@headings{% \def\@oddhead{\sl \headtoname{} \ignorespaces\toname \hfil \@date \hfil \pagename{} \thepage}% \def\@oddfoot{}}}{} \fi % % \end{macrocode} % % This was the last of the four standard document styles, so if % |\doc@style| has another value we do nothing and just close the % \texttt{if} construction. Here ends the code that can be optionally % included when a version of \LaTeX\ is in use that is dated % \emph{before} December~1991. % % We also need to redefine a number of commands to ensure that the % right font encoding is used, but this can't be done before % \file{babel.def} is loaded. % \changes{babel~3.6o}{1999/04/07}{Moved the rest of the font encoding % related definitions to their original place} % %% %% \CharacterTable %% {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 %% 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 %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \endinput