Move a tag
[latex2e.git] / latex2e-20160201 / required / babel / bbcompat.dtx
blob342e394e91e959f73c76051e07a2711f0bbc73af
1 % \iffalse meta-comment
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}
31 % \iffalse
32 %<*dtx>
33 \ProvidesFile{bbcompat.dtx}[2013/07/28 v1.2l]
34 %</dtx>
36 %% File 'bbcompat.dtx'
37 %% Copyright (C) 1989 -- 2008 by Johannes Braams,
38 %%                            TeXniek
39 %%                            all rights reserved.
41 %% Please report errors to: J.L. Braams
42 %%                          babel at braams dot xs4all dot nl
43 %<*filedriver>
44 \documentclass{ltxdoc}
45 \newcommand*\TeXhax{\TeX hax}
46 \newcommand*\babel{\textsf{babel}}
47 \newcommand*\Lopt[1]{\textsf{#1}}
48 \newcommand*\file[1]{\texttt{#1}}
49 \newcommand*\pkg[1]{\texttt{#1}}
50 \begin{document}
51  \DocInput{bbcompat.dtx}
52 \end{document}
53 %</filedriver>
54 % \fi
56 % \GetFileInfo{bbcompat.dtx}
57 % \changes{bbcompat-1.2j}{2006/06/05}{Small documentation fix}
59 % \StopEventually{}
61 % \changes{bbcompat-1.2}{1996/11/02}{Added the check for \cs{LdfInit}}
62 % \changes{bbcompat-1.2d}{1999/04/12}{When these files are read by a
63 %    non-babel plain format the @ has still category code `other' so
64 %    can't use \cs{@undefined}} 
65 %    \begin{macrocode}
66 \ifx\LdfInit\undefined
67   \def\LdfInit{%
68     \chardef\atcatcode=\catcode`\@
69     \catcode`\@=11\relax
70     \input babel.def\relax
71     \catcode`\@=\atcatcode \let\atcatcode\relax
72     \LdfInit}
73 \fi
74 %    \end{macrocode}
75 %    It seems that these files, although meant for compatibility with
76 %    \file{plain.tex} are also used as packages in \LaTeXe. The
77 %    disadvantage of that is that a number of compatibility measures
78 %    with other packages that are part of \file{babel.sty} are not
79 %    present. Therefore we issue an error and then load
80 %    \file{babel.def} to let the user continue processing his
81 %    document (at his own risk). 
83 %    First we determine whether we are loaded from \LaTeX\ by checking
84 %    whether |\PackageError| is defined.
85 %    \begin{macrocode}
86 \ifx\PackageError\undefined
87 %    \end{macrocode}
88 %    In this case we are not being loaded by \LaTeXe, so just define
89 %    |\ProvidesLanguage| to prevent an error when the \file{.ldf} file
90 %    is loaded.
91 %    \begin{macrocode}
92   \def\ProvidesLanguage#1[#2 #3 #4]{%
93     \wlog{Language: #1 #4 #3 <#2>}}%
94 \else
95 %    \end{macrocode}
96 %    Now we define an error message which `deletes' itself from
97 %    memory.
98 % \changes{bbcompat-1.2l}{2013/07/28}{Raise a more useful error.} 
100 %    \begin{macrocode}
101   \def\bblstyerror{%
102     \PackageError{babel}%
103       {You are loading directly a language style.\MessageBreak
104        This syntax is deprecated and you must use\MessageBreak
105        \string\usepackage[language]\string{babel\string}}%
106       {You could proceed but don't complain if you run into errors}%
107     \let\bblstyerror\@undefined
108     }
109 %    \end{macrocode}
110 %    Now we can issue the error, it should appear when these files are
111 %    loaded from \LaTeXe, with \emph{or} without \file{hyphen.cfg}
112 %    preloaded in the format. 
113 % \changes{bbcompat-1.2e}{1999/04/20}{Added a check for
114 %    \cs{ProvidesLanguage}} 
115 %    \begin{macrocode}
116   \ifx\ProvidesLanguage\undefined
117 %    \end{macrocode}
118 %    In this case \file{hyphen.cfg} wasn't loaded in the \LaTeXe\
119 %    format so we also need to provide a suitable definition for
120 %    |\ProvidesLanguage|.
121 %    \begin{macrocode}
122     \bblstyerror
123     \def\ProvidesLanguage{%
124       \chardef\atcatcode=\catcode`\@
125       \catcode`\@=11\relax
126       \input babel.def\relax
127       \catcode`\@=\atcatcode \let\atcatcode\relax
128       \ProvidesLanguage}
129 %    \end{macrocode}
130 %    When we end up here, \file{hyphen.cfg} was loaded into the
131 %    format; we only need to issue the error from \LaTeXe.
132 %    \begin{macrocode}
133   \else
134     \bblstyerror
135   \fi
137 %    \end{macrocode}
138 % \changes{bbcompat-1.2}{1996/07/13}{Added \file{.sty} files and
139 %    definition of \cs{CurrentOption} for language definition files
140 %    that are loaded by more than one option.} 
141 % \changes{bbcompat-1.2}{1996/12/14}{Added \file{welsh.sty}}
142 % \changes{bbcompat-1.2b}{1997/02/07}{Added \file{sanskrit.sty}}
143 % \changes{bbcompat-1.2c}{1998/03/24}{Added \file{hebrew.sty}}
144 % \changes{bbcompat-1.2d}{1999/03/09}{Added \file{ukraineb.sty}}
145 % \changes{bbcompat-1.2d}{1999/04/10}{Added \file{ngerman.sty} and
146 %    \file{naustrian.sty}} 
147 % \changes{bbcompat-1.2f}{2000/09/26}{Added \file{icelandic.sty},
148 %    \file{bulgarian.sty} and \file{samin.sty}}
149 % \changes{bbcompat-1.2f}{2000/09/27}{Define \cs{CurrentOption} in
150 %    each file}
151 % \changes{bbcompat-1.2g}{2001/01/19}{Added code for usenglish and
152 %    ukenglish.sty} 
153 % \changes{bbcompat-1.2h}{2003/11/13}{Added \file{interlingua.sty}}
154 % \changes{bbcompat-1.2i}{2005/11/23}{Added \file{albanian.sty} and
155 %    \file{bahasam.sty}}
156 % \changes{bbcompat-1.2k}{2008/07/06}{Added \file{latin.sty}}
157 %    \begin{macrocode}
158 %<+albanian>\def\CurrentOption{albanian}
159 %<+albanian>\input albanian.ldf\relax
160 %<+american>\def\CurrentOption{american}
161 %<+USenglish>\def\CurrentOption{USenglish}
162 %<+british>\def\CurrentOption{british}
163 %<+english>\def\CurrentOption{english}
164 %<+UKenglish>\def\CurrentOption{UKenglish}
165 %<american|british|english|UKenglish|USenglish>\input english.ldf\relax
166 %<+bahasa>\def\CurrentOption{bahasai}
167 %<+bahasa>\input bahasai.ldf\relax
168 %<+bahasam>\def\CurrentOption{bahasam}
169 %<+bahasam>\input bahasam.ldf\relax
170 %<+breton>\def\CurrentOption{breton}
171 %<+breton>\input breton.ldf\relax
172 %<+bulgarian>\def\CurrentOption{bulgarian}
173 %<+bulgarian>\input bulgarian.ldf\relax
174 %<+catalan>\def\CurrentOption{catalan}
175 %<+catalan>\input catalan.ldf\relax
176 %<+croatian>\def\CurrentOption{croatian}
177 %<+croatian>\input croatian.ldf\relax
178 %<+czech>\def\CurrentOption{czech}
179 %<+czech>\input czech.ldf\relax
180 %<+danish>\def\CurrentOption{danish}
181 %<+danish>\input danish.ldf\relax
182 %<+afrikaans>\def\CurrentOption{afrikaans}
183 %<+dutch>\def\CurrentOption{dutch}
184 %<+afrikaans|dutch>\input dutch.ldf\relax
185 %<+esperanto>\def\CurrentOption{esperanto}
186 %<+esperanto>\input esperanto.ldf\relax
187 %<+estonian>\def\CurrentOption{estonian}
188 %<+estonian>\input estonian.ldf\relax
189 %<+finnish>\def\CurrentOption{finnish}
190 %<+finnish>\input finnish.ldf\relax
191 %<+francais>\def\CurrentOption{francais}
192 %<+french>\def\CurrentOption{french}
193 %<+francais|french>\input frenchb.ldf\relax
194 %<+galician>\def\CurrentOption{galician}
195 %<+galician>\input galician.ldf\relax
196 %<+austrian>\def\CurrentOption{austrian}
197 %<+german>\def\CurrentOption{german}
198 %<+germanb>\def\CurrentOption{german}
199 %<+austrian|german|germanb>\input germanb.ldf\relax
200 %<+naustrian>\def\CurrentOption{naustrian}
201 %<+ngerman>\def\CurrentOption{ngerman}
202 %<+naustrian|ngerman>\input ngermanb.ldf\relax
203 %<+greek>\def\CurrentOption{greek}
204 %<+greek>\input greek.ldf\relax
205 %<+icelandic>\def\CurrentOption{icelandic}
206 %<+icelandic>\input icelandic.ldf\relax
207 %<+interlingua>\def\CurrentOption{interlingua}
208 %<+interlingua>\input interlingua.ldf\relax
209 %<+irish>\def\CurrentOption{irish}
210 %<+irish>\input irish.ldf\relax
211 %<+italian>\def\CurrentOption{italian}
212 %<+italian>\input italian.ldf\relax
213 %<+latin>\def\CurrentOption{latin}
214 %<+latin>\input latin.ldf\relax
215 %<+lsorbian>\def\CurrentOption{lsorbian}
216 %<+lsorbian>\input lsorbian.ldf\relax
217 %<+magyar>\def\CurrentOption{magyar}
218 %<+hungarian>\def\CurrentOption{hungarian}
219 %<+magyar|hungarian>\input magyar.ldf\relax
220 %<+norsk>\def\CurrentOption{norsk}
221 %<+nynorsk>\def\CurrentOption{nynorsk}
222 %<+norsk|nynorsk>\input norsk.ldf\relax
223 %<+polish>\def\CurrentOption{polish}
224 %<+polish>\input polish.ldf\relax
225 %<+portuges>\def\CurrentOption{portuges}
226 %<+portuguese>\def\CurrentOption{portuguese}
227 %<+brazil>\def\CurrentOption{brazil}
228 %<+brazilian>\def\CurrentOption{brazilian}
229 %<+portuges|portuguese|brazil|brazilian>\input portuges.ldf\relax
230 %<+romanian>\def\CurrentOption{romanian}
231 %<+romanian>\input romanian.ldf\relax
232 %<+russianb>\def\CurrentOption{russianb}
233 %<+russianb>\input russianb.ldf\relax
234 %<+ukraineb>\def\CurrentOption{ukraineb}
235 %<+ukraineb>\input ukraineb.ldf\relax
236 %<+samin>\def\CurrentOption{samin}
237 %<+samin>\input samin.ldf\relax
238 %<+sanskrit>\def\CurrentOption{sanskrit}
239 %<+sanskrit>\input sanskrit.ldf\relax
240 %<+scottish>\def\CurrentOption{scottish}
241 %<+scottish>\input scottish.ldf\relax
242 %<+slovak>\def\CurrentOption{slovak}
243 %<+slovak>\input slovak.ldf\relax
244 %<+slovene>\def\CurrentOption{slovene}
245 %<+slovene>\input slovene.ldf\relax
246 %<+spanish>\def\CurrentOption{spanish}
247 %<+spanish>\input spanish.ldf\relax
248 %<+swedish>\def\CurrentOption{swedish}
249 %<+swedish>\input swedish.ldf\relax
250 %<+turkish>\def\CurrentOption{turkish}
251 %<+turkish>\input turkish.ldf\relax
252 %<+usorbian>\def\CurrentOption{usorbian}
253 %<+usorbian>\input usorbian.ldf\relax
254 %<+welsh>\def\CurrentOption{welsh}
255 %<+welsh>\input welsh.ldf\relax
256 %<+hebrew>\def\CurrentOption{hebrew}
257 %<+hebrew>\input rlbabel.def\input hebrew.ldf\relax
258 %    \end{macrocode}
260 %% \CharacterTable
261 %%  {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
262 %%   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
263 %%   Digits        \0\1\2\3\4\5\6\7\8\9
264 %%   Exclamation   \!     Double quote  \"     Hash (number) \#
265 %%   Dollar        \$     Percent       \%     Ampersand     \&
266 %%   Acute accent  \'     Left paren    \(     Right paren   \)
267 %%   Asterisk      \*     Plus          \+     Comma         \,
268 %%   Minus         \-     Point         \.     Solidus       \/
269 %%   Colon         \:     Semicolon     \;     Less than     \<
270 %%   Equals        \=     Greater than  \>     Question mark \?
271 %%   Commercial at \@     Left bracket  \[     Backslash     \\
272 %%   Right bracket \]     Circumflex    \^     Underscore    \_
273 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
274 %%   Right brace   \}     Tilde         \~}
275 \endinput