Debian Codegraph @

texmf-dist/source/generic/babel-english/english.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright 1989-2005 Johannes L. Braams and any individual authors
4 % listed elsewhere in this file. All rights reserved.
5 % 2013-2017 Javier Bezos, Johannes L. Braams
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 % \iffalse
30 % Tell the \LaTeX\ system who we are and write an entry on the
31 % transcript.
32 %<*dtx>
33 \ProvidesFile{english.dtx}
34 %</dtx>
35 %<english>\ProvidesLanguage{english}
36 %<american>\ProvidesLanguage{american}
37 %<usenglish>\ProvidesLanguage{USenglish}
38 %<british>\ProvidesLanguage{british}
39 %<ukenglish>\ProvidesLanguage{UKenglish}
40 %<australian>\ProvidesLanguage{australian}
41 %<newzealand>\ProvidesLanguage{newzealand}
42 %<canadian>\ProvidesLanguage{canadian}
43 %\fi
44 %\ProvidesFile{english.dtx}
45 [2017/06/06 v3.3r English support from the babel system]
46 %\iffalse
47 %% File 'english.dtx'
48 %% Babel package for LaTeX version 2e
49 %% Copyright (C) 1989 - 2005
50 %% by Johannes Braams, TeXniek
51 %% 2013-2017 Javier Bezos, Johannes Braams
52 %
53 %
54 % This file is part of the babel system, it provides the source
55 % code for the English language definition file.
56 %<*filedriver>
57 \documentclass{ltxdoc}
58 \newcommand*\TeXhax{\TeX hax}
59 \newcommand*\babel{\textsf{babel}}
60 \newcommand*\langvar{$\langle \mathit lang \rangle$}
61 \newcommand*\note[1]{}
62 \newcommand*\Lopt[1]{\textsf{#1}}
63 \newcommand*\file[1]{\texttt{#1}}
64 \begin{document}
65 \DocInput{english.dtx}
66 \end{document}
67 %</filedriver>
68 %\fi
69 % \GetFileInfo{english.dtx}
70 %
71 % \changes{english-2.0a}{1990/04/02}{Added checking of format}
72 % \changes{english-2.1}{1990/04/24}{Reflect changes in babel 2.1}
73 % \changes{english-2.1a}{1990/05/14}{Incorporated Nico's comments}
74 % \changes{english-2.1b}{1990/05/14}{merged \file{USenglish.sty} into
75 % this file}
76 % \changes{english-2.1c}{1990/05/22}{fixed typo in definition for
77 % american language found by Werenfried Spit ([email protected])}
78 % \changes{english-2.1d}{1990/07/16}{Fixed some typos}
79 % \changes{english-3.0}{1991/04/23}{Modified for babel 3.0}
80 % \changes{english-3.0a}{1991/05/29}{Removed bug found by van der Meer}
81 % \changes{english-3.0c}{1991/07/15}{Renamed \file{babel.sty} in
82 % \file{babel.com}}
83 % \changes{english-3.1}{1991/11/05}{Rewrote parts of the code to use
84 % the new features of babel version 3.1}
85 % \changes{english-3.3}{1994/02/08}{Update or \LaTeXe}
86 % \changes{english-3.3c}{1994/06/26}{Removed the use of \cs{filedate}
87 % and moved the identification after the loading of
88 % \file{babel.def}}
89 % \changes{english-3.3g}{1996/07/10}{Replaced \cs{undefined} with
90 % \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency
91 % with \LaTeX}
92 % \changes{english-3.3h}{1996/10/10}{Moved the definition of
93 % \cs{atcatcode} right to the beginning.}
94 % \changes{english-3.3q}{2017/01/10}{Added the proxy files for the
95 % dialects}
96 %
97 % \section{The English language}
98 %
99 % The file \file{\filename}\footnote{The file described in this
100 % section has version number \fileversion\ and was last revised on
101 % \filedate.} defines all the language definition macros for the
102 % English language as well as for the American and Australian
103 % version of this language. For the Australian version the British
104 % hyphenation patterns will be used, if available, for the Canadian
105 % variant the American patterns are selected.
106 %
107 % For this language currently no special definitions are needed or
108 % available.
109 %
110 % \StopEventually{}
111 %
112 % The macro |\LdfInit| takes care of preventing that this file is
113 % loaded more than once, checking the category code of the
114 % \texttt{@} sign, etc.
115 % \changes{english-3.3h}{1996/11/02}{Now use \cs{LdfInit} to perform
116 % initial checks}
117 % \begin{macrocode}
118 %<*code>
119 \LdfInit\CurrentOption{date\CurrentOption}
120 % \end{macrocode}
121 %
122 % When this file is read as an option, i.e. by the |\usepackage|
123 % command, \texttt{english} could be an `unknown' language in which
124 % case we have to make it known. So we check for the existence of
125 % |\l@english| to see whether we have to do something here.
126 %
127 % \changes{english-3.0}{1991/04/23}{Now use \cs{adddialect} if
128 % language undefined}
129 % \changes{english-3.0d}{1991/10/22}{removed use of \cs{@ifundefined}}
130 % \changes{english-3.3c}{1994/06/26}{Now use \cs{@nopatterns} to
131 % produce the warning}
132 % \changes{english-3.3g}{1996/07/10}{Allow british as the name of the
133 % UK patterns}
134 % \changes{english-3.3j}{2000/01/21}{Also allow american english
135 % hyphenation patterns to be used for `english'}
136 % We allow for the british english patterns to be loaded as either
137 % `british', or `UKenglish'. When neither of those is
138 % known we try to define |\l@english| as an alias for |\l@american|
139 % or |\l@USenglish|.
140 % \changes{english-3.3k}{2001/02/07}{Added support for canadian}
141 % \changes{english-3.3n}{2004/06/12}{Added support for australian and
142 % newzealand}
143 % \begin{macrocode}
144 \ifx\l@english\@undefined
145 \ifx\l@UKenglish\@undefined
146 \ifx\l@british\@undefined
147 \ifx\l@american\@undefined
148 \ifx\l@USenglish\@undefined
149 \ifx\l@canadian\@undefined
150 \ifx\l@australian\@undefined
151 \ifx\l@newzealand\@undefined
152 \@nopatterns{English}
153 \adddialect\l@english0
154 \else
155 \let\l@english\l@newzealand
156 \fi
157 \else
158 \let\l@english\l@australian
159 \fi
160 \else
161 \let\l@english\l@canadian
162 \fi
163 \else
164 \let\l@english\l@USenglish
165 \fi
166 \else
167 \let\l@english\l@american
168 \fi
169 \else
170 \let\l@english\l@british
171 \fi
172 \else
173 \let\l@english\l@UKenglish
174 \fi
175 \fi
176 % \end{macrocode}
177 % Because we allow `british' to be used as the babel option we need
178 % to make sure that it will be recognised by |\selectlanguage|. In
179 % the code above we have made sure that |\l@english| was defined.
180 % Now we want to make sure that |\l@british| and |\l@UKenglish| are
181 % defined as well. When either of them is we make them equal to
182 % each other, when neither is we fall back to the default,
183 % |\l@english|.
184 % \changes{english-3.3o}{2004/06/14}{Make sure that british patterns
185 % are used if they were loaded}
186 % \begin{macrocode}
187 \ifx\l@british\@undefined
188 \ifx\l@UKenglish\@undefined
189 \adddialect\l@british\l@english
190 \adddialect\l@UKenglish\l@english
191 \else
192 \let\l@british\l@UKenglish
193 \fi
194 \else
195 \let\l@UKenglish\l@british
196 \fi
197 % \end{macrocode}
198 % `American' is a version of `English' which can have its own
199 % hyphenation patterns. The default english patterns are in fact
200 % for american english. We allow for the patterns to be loaded as
201 % `english' `american' or `USenglish'.
202 % \changes{english-3.0}{1990/04/23}{Now use \cs{adddialect} for
203 % american}
204 % \changes{english-3.0b}{1991/06/06}{Removed \cs{global} definitions}
205 % \changes{english-3.3d}{1995/02/01}{Only define american as a
206 % dialect when no separate patterns have been loaded}
207 % \changes{english-3.3g}{1996/07/10}{Allow USenglish as the name of
208 % the american patterns}
209 % \begin{macrocode}
210 \ifx\l@american\@undefined
211 \ifx\l@USenglish\@undefined
212 % \end{macrocode}
213 % When the patterns are not know as `american' or `USenglish' we
214 % add a ``dialect''.
215 % \begin{macrocode}
216 \adddialect\l@american\l@english
217 \else
218 \let\l@american\l@USenglish
219 \fi
220 \else
221 % \end{macrocode}
222 % Make sure that USenglish is known, even if the patterns were
223 % loaded as `american'.
224 % \changes{english-3.3j}{2000/01/21}{Ensure that \cs{l@USenglish} is
225 % alway defined}
226 % \changes{english-3.3l}{2001/04/15}{Added missing backslash}
227 % \begin{macrocode}
228 \ifx\l@USenglish\@undefined
229 \let\l@USenglish\l@american
230 \fi
231 \fi
232 % \end{macrocode}
233 %
234 % \changes{english-3.3k}{2001/02/07}{Added support for canadian}
235 % `Canadian' english spelling is a hybrid of British and American
236 % spelling. Although so far no special `translations' have been
237 % reported we allow this file to be loaded by the option
238 % \Lopt{candian} as well.
239 % \begin{macrocode}
240 \ifx\l@canadian\@undefined
241 \adddialect\l@canadian\l@american
242 \fi
243 % \end{macrocode}
244 %
245 % \changes{english-3.3n}{2004/06/12}{Added support for australian and
246 % newzealand}
247 % `Australian' and `New Zealand' english spelling seem to be the
248 % same as British spelling. Although so far no special
249 % `translations' have been reported we allow this file to be loaded
250 % by the options \Lopt{australian} and \Lopt{newzealand} as well.
251 % \begin{macrocode}
252 \ifx\l@australian\@undefined
253 \adddialect\l@australian\l@british
254 \fi
255 \ifx\l@newzealand\@undefined
256 \adddialect\l@newzealand\l@british
257 \fi
258 % \end{macrocode}
259 %
260
261 % \begin{macro}{\englishhyphenmins}
262 % \changes{english-3.3m}{2003/11/17}{Added default for setting of
263 % hyphenmin parameters}
264 % This macro is used to store the correct values of the hyphenation
265 % parameters |\lefthyphenmin| and |\righthyphenmin|.
266 % \begin{macrocode}
267 \providehyphenmins{\CurrentOption}{\tw@\thr@@}
268 % \end{macrocode}
269 % \end{macro}
270 %
271 % The next step consists of defining commands to switch to (and
272 % from) the English language.
273 % \begin{macro}{\captionsenglish}
274 % The macro |\captionsenglish| defines all strings used
275 % in the four standard document classes provided with \LaTeX.
276 % \changes{english-3.0b}{1991/06/06}{Removed \cs{global} definitions}
277 % \changes{english-3.0b}{1991/06/06}{\cs{pagename} should be
278 % \cs{headpagename}}
279 % \changes{english-3.1a}{1991/11/11}{added \cs{seename} and
280 % \cs{alsoname}}
281 % \changes{english-3.1b}{1992/01/26}{added \cs{prefacename}}
282 % \changes{english-3.2}{1993/07/15}{\cs{headpagename} should be
283 % \cs{pagename}}
284 % \changes{english-3.3e}{1995/07/04}{Added \cs{proofname} for
285 % AMS-\LaTeX}
286 % \changes{english-3.3g}{1996/07/10}{Construct control sequence on the
287 % fly}
288 % \changes{english-3.3j}{2000/09/19}{Added \cs{glossaryname}}
289 % \begin{macrocode}
290 \@namedef{captions\CurrentOption}{%
291 \def\prefacename{Preface}%
292 \def\refname{References}%
293 \def\abstractname{Abstract}%
294 \def\bibname{Bibliography}%
295 \def\chaptername{Chapter}%
296 \def\appendixname{Appendix}%
297 \def\contentsname{Contents}%
298 \def\listfigurename{List of Figures}%
299 \def\listtablename{List of Tables}%
300 \def\indexname{Index}%
301 \def\figurename{Figure}%
302 \def\tablename{Table}%
303 \def\partname{Part}%
304 \def\enclname{encl}%
305 \def\ccname{cc}%
306 \def\headtoname{To}%
307 \def\pagename{Page}%
308 \def\seename{see}%
309 \def\alsoname{see also}%
310 \def\proofname{Proof}%
311 \def\glossaryname{Glossary}%
312 }
313 % \end{macrocode}
314 % \end{macro}
315 %
316 % \begin{macro}{\dateenglish}
317 % In order to define |\today| correctly we need to know whether it
318 % should be `english', `australian', or `american'. We can find
319 % this out by checking the value of |\CurrentOption|.
320 % \changes{english-3.3j}{2000/01/21}{Make sure that the value of
321 % \cs{today} is correct for both options `american' and
322 % `USenglish'}
323 % \changes{english-3.3n}{2004/06/12}{Added support for `Australian'
324 % and `Newzealand'}
325 % \changes{english-3.3o}{2004/06/14}{Explicitly choose the UK form of
326 % date}
327 % \changes{english-3.3p}{2012/11/07}{Warning if `english' is used with
328 % other options}
329 % \begin{macrocode}
330 \def\bbl@tempa{british}
331 \ifx\CurrentOption\bbl@tempa\def\bbl@tempb{UK}\fi
332 \def\bbl@tempa{UKenglish}
333 \ifx\CurrentOption\bbl@tempa\def\bbl@tempb{UK}\fi
334 \def\bbl@tempa{american}
335 \ifx\CurrentOption\bbl@tempa\def\bbl@tempb{US}\fi
336 \def\bbl@tempa{USenglish}
337 \ifx\CurrentOption\bbl@tempa\def\bbl@tempb{US}\fi
338 \def\bbl@tempa{canadian}
339 \ifx\CurrentOption\bbl@tempa\def\bbl@tempb{US}\fi
340 \def\bbl@tempa{australian}
341 \ifx\CurrentOption\bbl@tempa\def\bbl@tempb{AU}\fi
342 \def\bbl@tempa{newzealand}
343 \ifx\CurrentOption\bbl@tempa\def\bbl@tempb{AU}\fi
344 \def\bbl@tempa{english}
345 \ifx\CurrentOption\bbl@tempa
346 \AtEndOfPackage{\@nameuse{bbl@englishwarning}}
347 \else
348 \edef\bbl@englishwarning{%
349 \let\noexpand\bbl@englishwarning\relax
350 \noexpand\PackageWarning{Babel}{%
351 The package option `english' should not be used\noexpand\MessageBreak
352 with a more specific one (like `\CurrentOption')}}
353 \fi
354 % \end{macrocode}
355 %
356 % The macro |\dateenglish| redefines the command |\today| to
357 % produce English dates.
358 % \changes{english-3.0b}{1991/06/06}{Removed \cs{global} definitions}
359 % \changes{english-3.3g}{1996/07/10}{Construct control sequence on the
360 % fly}
361 % \changes{english-3.3i}{1997/10/01}{Use \cs{edef} to define \cs{today}
362 % to save memory}
363 % \changes{english-3.3i}{1998/03/28}{use \cs{def} instead of
364 % \cs{edef}}
365 % \begin{macrocode}
366 \def\bbl@tempa{UK}
367 \ifx\bbl@tempa\bbl@tempb
368 \@namedef{date\CurrentOption}{%
369 \def\today{\ifcase\day\or
370 1st\or 2nd\or 3rd\or 4th\or 5th\or
371 6th\or 7th\or 8th\or 9th\or 10th\or
372 11th\or 12th\or 13th\or 14th\or 15th\or
373 16th\or 17th\or 18th\or 19th\or 20th\or
374 21st\or 22nd\or 23rd\or 24th\or 25th\or
375 26th\or 27th\or 28th\or 29th\or 30th\or
376 31st\fi~\ifcase\month\or
377 January\or February\or March\or April\or May\or June\or
378 July\or August\or September\or October\or November\or
379 December\fi\space \number\year}}
380 % \end{macrocode}
381 % \end{macro}
382 %
383 % \begin{macro}{\dateaustralian}
384 % Now, test for `australian' or `american'.
385 % \changes{english-3.3n}{2004/06/12}{Add australian date}
386 % \begin{macrocode}
387 \else
388 % \end{macrocode}
389 %
390 % The macro |\dateaustralian| redefines the command |\today| to
391 % produce Australian resp.\ New Zealand dates.
392 % \begin{macrocode}
393 \def\bbl@tempa{AU}
394 \ifx\bbl@tempa\bbl@tempb
395 \@namedef{date\CurrentOption}{%
396 \def\today{\number\day~\ifcase\month\or
397 January\or February\or March\or April\or May\or June\or
398 July\or August\or September\or October\or November\or
399 December\fi\space \number\year}}
400 % \end{macrocode}
401 % \end{macro}
402 %
403 % \begin{macro}{\dateamerican}
404 % The macro |\dateamerican| redefines the command |\today| to
405 % produce American dates.
406 % \changes{english-3.0b}{1991/06/06}{Removed \cs{global} definitions}
407 % \changes{english-3.3i}{1997/10/01}{Use \cs{edef} to define
408 % \cs{today} to save memory}
409 % \changes{english-3.3i}{1998/03/28}{use \cs{def} instead of
410 % \cs{edef}}
411 % \begin{macrocode}
412 \else
413 \@namedef{date\CurrentOption}{%
414 \def\today{\ifcase\month\or
415 January\or February\or March\or April\or May\or June\or
416 July\or August\or September\or October\or November\or
417 December\fi \space\number\day, \number\year}}
418 \fi
419 \fi
420 % \end{macrocode}
421 % \end{macro}
422 %
423 % \begin{macro}{\extrasenglish}
424 % \begin{macro}{\noextrasenglish}
425 % The macro |\extrasenglish| will perform all the extra definitions
426 % needed for the English language. The macro |\noextrasenglish| is
427 % used to cancel the actions of |\extrasenglish|. For the moment
428 % these macros are empty but they are defined for compatibility
429 % with the other language definition files.
430 %
431 % \changes{english-3.3g}{1996/07/10}{Construct control sequences on
432 % the fly}
433 % \begin{macrocode}
434 \@namedef{extras\CurrentOption}{}
435 \@namedef{noextras\CurrentOption}{}
436 % \end{macrocode}
437 % \end{macro}
438 % \end{macro}
439 %
440 % The macro |\ldf@finish| takes care of looking for a
441 % configuration file, setting the main language to be switched on
442 % at |\begin{document}| and resetting the category code of
443 % \texttt{@} to its original value.
444 % \changes{english-3.3h}{1996/11/02}{Now use \cs{ldf@finish} to wrap
445 % up}
446 % \begin{macrocode}
447 \ldf@finish\CurrentOption
448 %</code>
449 % \end{macrocode}
450 %
451 % Finally, We create a few proxy files, which just load english.ldf.
452 %
453 % \begin{macrocode}
454 %<*american|usenglish|british|ukenglish|australian|newzealand|canadian>
455 \input english.ldf\relax
456 %</american|usenglish|british|ukenglish|australian|newzealand|canadian>
457 % \end{macrocode}
458 %
459 % \Finale
460 %%
461 %% \CharacterTable
462 %% {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
463 %% 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
464 %% Digits \0\1\2\3\4\5\6\7\8\9
465 %% Exclamation \! Double quote \" Hash (number) \#
466 %% Dollar \$ Percent \% Ampersand \&
467 %% Acute accent \' Left paren \( Right paren \)
468 %% Asterisk \* Plus \+ Comma \,
469 %% Minus \- Point \. Solidus \/
470 %% Colon \: Semicolon \; Less than \<
471 %% Equals \= Greater than \> Question mark \?
472 %% Commercial at \@ Left bracket \[ Backslash \\
473 %% Right bracket \] Circumflex \^ Underscore \_
474 %% Grave accent \` Left brace \{ Vertical bar \|
475 %% Right brace \} Tilde \~}
476 %%
477 \endinput