1 The Breton language

The file breton.dtx^{1} defines all the language-specific macros for the Breton language.

There are not really typographic rules for the Breton language. It is a local language (it’s one of the celtic languages) which is spoken in Brittany (West of France). So we have a synthesis between french typographic rules and english typographic rules. The characters :, ;, ! and ? are made active in order to get a whitespace automatically before these characters.

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{breton}\captionsbreton

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

 3 \ifx\l@breton\@undefined
 4  \@nopatterns{Breton}
 5  \adddialect\l@breton0\fi

The next step consists of defining commands to switch to the English language. The reason for this is that a user might want to switch back and forth between languages.

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

 6 \addto\captionsbreton{%
 7 \def\prefacename{Rakskrid}%
 8 \def\refname{Daveenno\`u}%
 9 \def\abstractname{Dvierra\~n}%
10 \def\bibname{Lennadurezh}%
11 \def\chaptername{Pennad}%
12 \def\appendixname{Stagadenn}%
13 \def\contentsname{Taolenn}%
14 \def\listfigurename{Listenn ar Figurenno\`u}%
15 \def\listtablename{Listenn an taolenno\`u}%
16 \def\indexname{Meneger}%
17 \def\figurename{Figurenn}%
18 \def\tablename{Taolenn}%
19 \def\partname{Lodenn}%
20 \def\enclname{Diello\`u kevret}%
21 \def\ccname{Eilskrid da}%
22 \def\headtoname{evit}
23 \def\pagename{Pajenn}%
24 \def\seename{Gwelout}%
25 \def\alsoname{Gwelout ivez}%
26 \def\proofname{Proof}%  <-- needs translation

27 }

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

\datebreton The macro \datebreton redefines the command \today to produce Breton dates.

28 \def\datebreton{%
29 \def\today{\ifnum\day=1\relax 1\/$^{\rm a\tilde{n}}$\else
30 \number\day\fi \space a\space viz\space\ifcase\month\or
31 Genver\or C'hwevrer\or Meurzh\or Ebrel\or Mae\or Mezheven\or
32 Gouere\or Eost\or Gwengolo\or Here\or Du\or Kerzu\fi
33 \space\number\year}}

\extrasbreton \noextrasbreton The macro \extrasbreton will perform all the extra definitions needed for the Breton language. The macro \noextrasbreton is used to cancel the actions of

\extrasbreton.

The category code of the characters :, ;, ! and ? is made \active to insert a little white space.

34 \initiate@active@char{:}
35 \initiate@active@char{;}
36 \initiate@active@char{!}
37 \initiate@active@char{?}

We specify that the breton group of shorthands should be used.

38 \addto\extrasbreton{\languageshorthands{breton}}

These characters are ‘turned on’ once, later their definition may vary.

39 \addto\extrasbreton{%
40 \bbl@activate{:}\bbl@activate{;}%
41 \bbl@activate{!}\bbl@activate{?}}
42 %\addto\noextrasbreton{%
43 %  \bbl@deactivate{:}\bbl@deactivate{;}%
44 %  \bbl@deactivate{!}\bbl@deactivate{?}}

The last thing \extrasbreton needs to do is to make sure that \frenchspacing is in effect. If this is not the case the execution of \noextrasbreton will switch it of again.

45 \addto\extrasbreton{\bbl@frenchspacing}
46 \addto\noextrasbreton{\bbl@nonfrenchspacing}

\breton@sh@;@ We have to reduce the amount of white space before ;, : and ! when the user types a space in front of these characters. This should only happen outside mathmode, hence the test with \ifmmode.

47 \declare@shorthand{breton}{;}{%
48  \ifmmode
49  \string;\space
50  \else\relax

In horizontal mode we check for the presence of a ‘space’ and replace it by a

\thinspace.
51  \ifhmode
52  \ifdim\lastskip>\z@
53  \unskip\penalty\@M\thinspace
54  \fi
55  \fi
56  \string;\space
57  \fi}%

\breton@sh@:@ \breton@sh@!@ Because these definitions are very similar only one is displayed in a way that the definition can be easily checked.

58 \declare@shorthand{breton}{:}{%
59 \ifmmode\string:\space
60 \else\relax
61  \ifhmode
62  \ifdim\lastskip>\z@\unskip\penalty\@M\thinspace\fi
63  \fi
64  \string:\space
65 \fi}
66 \declare@shorthand{breton}{!}{%
67 \ifmmode\string!\space
68 \else\relax
69  \ifhmode
70  \ifdim\lastskip>\z@\unskip\penalty\@M\thinspace\fi
71  \fi
72  \string!\space
73 \fi}

\breton@sh@?@ For the question mark something different has to be done. In this case the amount of white space that replaces the space character depends on the dimensions of the font.

74 \declare@shorthand{breton}{?}{%
75 \ifmmode
76  \string?\space
77 \else\relax
78  \ifhmode
79  \ifdim\lastskip>\z@
80  \unskip
81  \kern\fontdimen2\font
82  \kern-1.4\fontdimen3\font
83  \fi
84  \fi
85  \string?\space
86 \fi}

All that is left to do now is provide the breton user with some extra utilities. Some definitions for special characters.

87 \DeclareTextSymbol{\at}{OT1}{64}
88 \DeclareTextSymbol{\at}{T1}{64}
89 \DeclareTextSymbolDefault{\at}{OT1}
90 \DeclareTextSymbol{\boi}{OT1}{92}
91 \DeclareTextSymbol{\boi}{T1}{16}
92 \DeclareTextSymbolDefault{\boi}{OT1}
93 \DeclareTextSymbol{\circonflexe}{OT1}{94}
94 \DeclareTextSymbol{\circonflexe}{T1}{2}
95 \DeclareTextSymbolDefault{\circonflexe}{OT1}
96 \DeclareTextSymbol{\tild}{OT1}{126}
97 \DeclareTextSymbol{\tild}{T1}{3}
98 \DeclareTextSymbolDefault{\tild}{OT1}
99 \DeclareTextSymbol{\degre}{OT1}{23}
100 \DeclareTextSymbol{\degre}{T1}{6}
101 \DeclareTextSymbolDefault{\degre}{OT1}

The following macros are used in the redefinition of \^and \" to handle the letter i.

102 \AtBeginDocument{%
103 \DeclareTextCompositeCommand{\^}{OT1}{i}{\^\i}
104 \DeclareTextCompositeCommand{\"}{OT1}{i}{\"\i}}

And some more macros for numbering.

105 \def\kentan{1\/${}^{\rm a\tilde{n}}$}
106 \def\eil{2\/${}^{\rm l}$}
107 \def\re{\/${}^{\rm re}$}
108 \def\trede{3\re}
109 \def\pevare{4\re}
110 \def\vet{\/${}^{\rm vet}$}
111 \def\pempvet{5\vet}

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.

112 \ldf@finish{breton}

113 ⟨/code⟩