1 The English language

The file english.dtx^{1} defines all the language definition macros for the English language as well as for the American version of this language.

For this language currently no special definitions are needed or available.

The macro \LdfInit takes care of preventing that this file is loaded more than once, checking the category code of the @ sign, etc.

1 ⟨∗code⟩

 2 \LdfInit\CurrentOption{date\CurrentOption}

When this file is read as an option, i.e. by the \usepackage command, 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.

We allow for the british english patterns to be loaded as either ‘english’, ‘british’, or ‘UKenglish’

 3 \ifx\l@english\@undefined
 4 \ifx\l@UKenglish\@undefined
 5  \ifx\l@british\@undefined
 6  \@nopatterns{English}
 7  \adddialect\l@english0
 8  \else
 9  \let\l@english\l@british
10  \fi
11 \else
12  \let\l@english\l@UKenglish
13 \fi
14 \fi

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 has a sensible value; now we make \l@british equal to that.

15 \ifx\l@british\@undefined
16 \let\l@british\l@english
17 \fi

‘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’.

18 \ifx\l@american\@undefined
19 \ifx\l@USenglish\@undefined

When the patterns are not know as ‘american’ or ‘USenglish’ we add a “dialect”.

20  \adddialect\l@american\l@english
21 \else
22  \let\l@american\l@USenglish
23 \fi
24 \fi

The next step consists of defining commands to switch to (and from) the English language.

1The file described in this section has version number v3.3h and was last revised on 1996/12/23.

\captionsenglish The macro \captionsenglish defines all strings used in the four standard document classes provided with L^{A}TEX.

25 \@namedef{captions\CurrentOption}{%
26 \def\prefacename{Preface}%
27 \def\refname{References}%
28 \def\abstractname{Abstract}%
29 \def\bibname{Bibliography}%
30 \def\chaptername{Chapter}%
31 \def\appendixname{Appendix}%
32 \def\contentsname{Contents}%
33 \def\listfigurename{List of Figures}%
34 \def\listtablename{List of Tables}%
35 \def\indexname{Index}%
36 \def\figurename{Figure}%
37 \def\tablename{Table}%
38 \def\partname{Part}%
39 \def\enclname{encl}%
40 \def\ccname{cc}%
41 \def\headtoname{To}%
42 \def\pagename{Page}%
43 \def\seename{see}%
44 \def\alsoname{see also}%
45 \def\proofname{Proof}%

46 }

\dateenglish The macro \dateenglish redefines the command \today to produce English dates.

47 \@namedef{date\CurrentOption}{%
48 \def\today{\ifcase\day\or
49 1st\or 2nd\or 3rd\or 4th\or 5th\or
50 6th\or 7th\or 8th\or 9th\or 10th\or
51 11th\or 12th\or 13th\or 14th\or 15th\or
52 16th\or 17th\or 18th\or 19th\or 20th\or
53 21st\or 22nd\or 23rd\or 24th\or 25th\or
54 26th\or 27th\or 28th\or 29th\or 30th\or
55 31st\fi~\ifcase\month\or
56 January\or February\or March\or April\or May\or June\or
57 July\or August\or September\or October\or November\or December\fi
58 \space \number\year}}

\dateamerican The macro \dateamerican redefines the command \today to produce American dates.

59 \def\dateamerican{%
60 \def\today{\ifcase\month\or
61 January\or February\or March\or April\or May\or June\or
62 July\or August\or September\or October\or November\or December\fi
63 \space\number\day, \number\year}}

\extrasenglish \noextrasenglish The macro \extrasenglish will perform all the extra definitions needed for the English language. The macro \extrasenglish 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.

64 \@namedef{extras\CurrentOption}{}

65 \@namedef{noextras\CurrentOption}{}

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 @ to its original value.

66 \ldf@finish\CurrentOption

67 ⟨/code⟩