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