1 The Welsh language

The file welsh.dtx^{1} defines all the language definition macros for the Welsh language as well as for the ¡Dialect¿ version of this language.

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

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

1 ⟨∗code⟩

 2 \LdfInit{welsh}{captionswelsh}

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

 3 \ifx\undefined\l@welsh
 4 \@nopatterns{welsh}
 5 \adddialect\l@welsh0\fi

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

\welshhyphenmins This macro is used to store the correct values of the hyphenation parameters

\lefthyphenmin and \righthyphenmin.
 6 \def\welshhyphenmins{23}

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

 7 \def\captionswelsh{%
 8 \def\prefacename{Rhagair}%
 9 \def\refname{Cyfeiriadau}%
10 \def\abstractname{Crynodeb}%
11 \def\bibname{Llyfryddiaeth}%
12 \def\chaptername{Pennod}%
13 \def\appendixname{Atodiad}%
14 \def\contentsname{Cynnwys}%
15 \def\listfigurename{Rhestr Ddarluniau}%
16 \def\listtablename{Rhestr Dablau}%
17 \def\indexname{Mynegai}%
18 \def\figurename{Darlun}%
19 \def\tablename{Taflen}%
20 \def\partname{Rhan}%
21 \def\enclname{amgae\"edig}%
22 \def\ccname{cop\"\i au}%
23 \def\headtoname{At}%  % `at' on letters meaning `to ( a person)'
24  % `to (a place)' is `i' in Welsh
25 \def\pagename{tudalen}%
26 \def\seename{gweler}%
27 \def\alsoname{gweler hefyd}%
28 \def\proofname{Prawf}%

29 }

1The file described in this section has version number v1.0a and was last revised on 1996/12/23.

\datewelsh The macro \datewelsh redefines the command \today to produce welsh dates.

30 \def\datewelsh{%
31 \def\today{\ifnum\day=1\relax 1\/$^{\mathrm{a\tilde{n}}}$\else
32  \number\day\fi \space a\space viz\space\ifcase\month\or
33  Ionawr\or Chwefror\or Mawrth\or Ebrill\or
34  Mai\or Mehefin\or Gorffennaf\or Awst\or
35  Medi\or Hydref\or Tachwedd\or Rhagfyr\fi
36 \space\number\year}}

\extraswelsh \noextraswelsh The macro \extraswelsh will perform all the extra definitions needed for the welsh language. The macro \noextraswelsh is used to cancel the actions of \extraswelsh. For the moment these macros are empty but they are defined for compatibility with the other language definition files.

37 \addto\extraswelsh{}
38 \addto\noextraswelsh{}

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.

39 \ldf@finish{welsh}

40 ⟨/code⟩