1 The Czech language

The file czech.dtx^{1} defines all the language definition macros for the Czech language.

For this language \frenchspacing is set and two macros \q and \w for easy access to two accents are defined.

The command \q is used with the letters (t, d, l, and L) and adds a ' to them to simulate a ‘hook’ that should be there. The result looks like t’. The command \w is used to put the ring-accent which appears in ångstrøm over the letters u and

U.

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{czech}\captionsczech

When this file is read as an option, i.e. by the \usepackage command, czech will be an ‘unknown’ language in which case we have to make it known. So we check for the existence of \l@czech to see whether we have to do something here.

 3 \ifx\l@czech\@undefined
 4  \@nopatterns{Czech}
 5  \adddialect\l@czech0\fi

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

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

 6 \addto\captionsczech{%
 7 \def\prefacename{P\v redmluva}%
 8 \def\refname{Reference}%
 9 \def\abstractname{Abstrakt}%
10 \def\bibname{Literatura}%
11 \def\chaptername{Kapitola}%
12 \def\appendixname{Dodatek}%
13 \def\contentsname{Obsah}%
14 \def\listfigurename{Seznam obr\'azk\r{u}}%
15 \def\listtablename{Seznam tabulek}%
16 \def\indexname{Index}%
17 \def\figurename{Obr\'azek}%
18 \def\tablename{Tabulka}%
19 \def\partname{\v{C}\'ast}%
20 \def\enclname{P\v{r}\'{\i}loha}%
21 \def\ccname{Na v\v{e}dom\'{\i}:}%
22 \def\headtoname{Komu}%
23 \def\pagename{Strana}%
24 \def\seename{viz}%
25 \def\alsoname{viz tak\'e}%
26 \def\proofname{D\r{u}kaz}%
27 }%

1The file described in this section has version number v1.3h and was last revised on 1996/12/23. Contributions were made by Milos Lokajicek (LOKAJICK@CERNVM).

\dateczech The macro \dateczech redefines the command \today to produce Czech dates.

28 \def\dateczech{%
29 \def\today{\number\day.~\ifcase\month\or
30 ledna\or \'unora\or b\v{r}ezna\or dubna\or kv\v{e}tna\or \v{c}ervna\or
31 \v{c}ervence\or srpna\or z\'a\v{r}\'{\i}\or \v{r}\'{\i}jna\or
32 listopadu\or prosince\fi
33 \space \number\year}}

\extrasczech \noextrasczech The macro \extrasczech will perform all the extra definitions needed for the Czech language. The macro \noextrasczech is used to cancel the actions of \extrasczech. This means saving the meaning of two one-letter control sequences before defining them.

34 \addto\extrasczech{\babel@save\q\let\q\v}
35 \addto\extrasczech{\babel@save\w\let\w\r}

For Czech texts \frenchspacing should be in effect. We make sure this is the case and reset it if necessary.

36 \addto\extrasczech{\bbl@frenchspacing}
37 \addto\noextrasczech{\bbl@nonfrenchspacing}

\v L^{A}TEX’s normal \v accent places a caron over the letter that follows it (ǒ). This is not what we want for the letters d, t, l and L; for those the accent should change shape. This is acheived by the following.

38 \AtBeginDocument{%
39 \DeclareTextCompositeCommand{\v}{OT1}{t}{%
40  t\kern-.23em\raise.24ex\hbox{'}}
41 \DeclareTextCompositeCommand{\v}{OT1}{d}{%
42  d\kern-.13em\raise.24ex\hbox{'}}
43 \DeclareTextCompositeCommand{\v}{OT1}{l}{\lcaron{}}
44 \DeclareTextCompositeCommand{\v}{OT1}{L}{\Lcaron{}}}

\lcaron \Lcaron Fot the letters l and L we want to disinguish between normal fonts and monospaced fonts.

45 \def\lcaron{%
46 \setbox0\hbox{M}\setbox\tw@\hbox{i}%
47 \ifdim\wd0>\wd\tw@\relax
48  l\kern-.13em\raise.24ex\hbox{'}\kern-.11em%
49 \else
50  l\raise.45ex\hbox to\z@{\kern-.35em '\hss}%
51 \fi}
52 \def\Lcaron{%
53 \setbox0\hbox{M}\setbox\tw@\hbox{i}%
54 \ifdim\wd0>\wd\tw@\relax
55  L\raise.24ex\hbox to\z@{\kern-.28em'\hss}%
56 \else
57  L\raise.45ex\hbox to\z@{\kern-.40em '\hss}%
58 \fi}

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.

59 \ldf@finish{czech}

60 ⟨/code⟩