1 % \iffalse meta-comment
3 % Copyright 1989-2007 Johannes L. Braams and any individual authors
4 % listed elsewhere in this file. All rights reserved.
6 % This file is part of the Babel system.
7 % --------------------------------------
9 % It may be distributed and/or modified under the
10 % conditions of the LaTeX Project Public License, either version 1.3
11 % of this license or (at your option) any later version.
12 % The latest version of this license is in
13 % http://www.latex-project.org/lppl.txt
14 % and version 1.3 or later is part of all distributions of LaTeX
15 % version 2003/12/01 or later.
17 % This work has the LPPL maintenance status "maintained".
19 % The Current Maintainer of this work is Johannes Braams.
21 % The list of all files belonging to the Babel system is
22 % given in the file `manifest.bbl. See also `legal.bbl' for additional
25 % The list of derived (unpacked) files belonging to the distribution
26 % and covered by LPPL is defined by the unpacking scripts (with
27 % extension .ins) which are part of the distribution.
31 % Tell the \LaTeX\ system who we are and write an entry on the
34 \ProvidesFile{finnish.dtx}
36 %<code>\ProvidesLanguage{finnish}
38 %\ProvidesFile{finnish.dtx}
39 [2007/10/20 v1.3q Finnish support from the babel system]
42 %% Babel package for LaTeX version 2e
43 %% Copyright (C) 1989 - 2007
44 %% by Johannes Braams, TeXniek
46 %% Please report errors to: J.L. Braams
47 %% babel at braams dot xs4all dot nl
49 % This file is part of the babel system, it provides the source
50 % code for the Finnish language definition file. A contribution
51 % was made by Mikko KANERVA (KANERVA@CERNVM) and Keranen Reino
54 \documentclass{ltxdoc}
55 \newcommand*\TeXhax{\TeX hax}
56 \newcommand*\babel{\textsf{babel}}
57 \newcommand*\langvar{$\langle \it lang \rangle$}
58 \newcommand*\note[1]{}
59 \newcommand*\Lopt[1]{\textsf{#1}}
60 \newcommand*\file[1]{\texttt{#1}}
62 \DocInput{finnish.dtx}
67 % \GetFileInfo{finnish.dtx}
69 % \changes{finnish-1.0a}{1991/07/15}{Renamed \file{babel.sty} in
71 % \changes{finnish-1.1}{1991/02/15}{Brought up-to-date with babel 3.2a}
72 % \changes{finnish-1.2}{1994/02/27}{Update for \LaTeXe}
73 % \changes{finnish-1.3c}{1994/06/26}{Removed the use of \cs{filedate}
74 % and moved identification after the loading of \file{babel.def}}
75 % \changes{finnish-1.3d}{1994/06/30}{Removed a few references to
77 % \changes{finnish-1.3i}{1996/10/10}{Replaced \cs{undefined} with
78 % \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency
79 % with \LaTeX, moved the definition of \cs{atcatcode} right to the
81 % \changes{finnish-1.3q}{2006/06/05}{Small documentation fix}
83 % \section{The Finnish language}
85 % The file \file{\filename}\footnote{The file described in this
86 % section has version number \fileversion\ and was last revised on
87 % \filedate. A contribution was made by Mikko KANERVA
88 % (\texttt{KANERVA@CERNVM}) and Keranen Reino
89 % (\texttt{KERANEN@CERNVM}).} defines all the language definition
90 % macros for the Finnish language.
92 % For this language the character |"| is made active. In
93 % table~\ref{tab:finnish-quote} an overview is given of its purpose.
97 % \begin{tabular}{lp{8cm}}
98 % \verb="|= & disable ligature at this position.\\
99 % |"-| & an explicit hyphen sign, allowing hyphenation
100 % in the rest of the word.\\
101 % |"=| & an explicit hyphen sign for expressions such as
102 % ``pakastekaapit ja -arkut''.\\
103 % |""| & like \verb="-=, but producing no hyphen sign (for
104 % words that should break at some sign such as
105 % ``entrada/salida.''\\
106 % |"`| & lowered double left quotes (looks like ,,)\\
107 % |"'| & normal double right quotes\\
108 % |"<| & for French left double quotes (similar to $<<$).\\
109 % |">| & for French right double quotes (similar to $>>$).\\
110 % |\-| & like the old |\-|, but allowing hyphenation
111 % in the rest of the word.
113 % \caption{The extra definitions made by \file{finnish.ldf}}
114 % \label{tab:finnish-quote}
119 % The macro |\LdfInit| takes care of preventing that this file is
120 % loaded more than once, checking the category code of the
121 % \texttt{@} sign, etc.
122 % \changes{finnish-1.3i}{1996/11/02}{Now use \cs{LdfInit} to perform
126 \LdfInit{finnish}\captionsfinnish
129 % When this file is read as an option, i.e. by the |\usepackage|
130 % command, \texttt{finnish} will be an `unknown' language in which
131 % case we have to make it known. So we check for the existence of
132 % |\l@finnish| to see whether we have to do something here.
134 % \changes{finnish-1.0b}{1991/10/29}{Removed use of \cs{@ifundefined}}
135 % \changes{finnish-1.1}{1992/02/15}{Added a warning when no hyphenation
136 % patterns were loaded.}
137 % \changes{finnish-1.3c}{1994/06/26}{Now use \cs{@nopatterns} to
138 % produce the warning}
140 \ifx\l@finnish\@undefined
141 \@nopatterns{Finnish}
142 \adddialect\l@finnish0\fi
145 % The next step consists of defining commands to switch to the
146 % Finnish language. The reason for this is that a user might want
147 % to switch back and forth between languages.
149 % \begin{macro}{\captionsfinnish}
150 % The macro |\captionsfinnish| defines all strings used in the four
151 % standard documentclasses provided with \LaTeX.
152 % \changes{finnish-1.1}{1992/02/15}{Added \cs{seename}, \cs{alsoname}
153 % and \cs{prefacename}}
154 % \changes{finnish-1.1}{1993/07/15}{\cs{headpagename} should be
156 % \changes{finnish-1.1.2}{1993/09/16}{Added translations}
157 % \changes{finnish-1.3g}{1995/07/02}{Added \cs{proofname} for
159 % \changes{finnish-1.3h}{1995/07/25}{Added finnish word for `Proof'}
160 % \changes{finnish-1.3n}{2000/09/19}{Added \cs{glossaryname}}
161 % \changes{finnish-1.3o}{2001/03/12}{Provided translation for
164 \addto\captionsfinnish{%
165 \def\prefacename{Esipuhe}%
166 \def\refname{Viitteet}%
167 \def\abstractname{Tiivistelm\"a}
168 \def\bibname{Kirjallisuutta}%
169 \def\chaptername{Luku}%
170 \def\appendixname{Liite}%
171 \def\contentsname{Sis\"alt\"o}% /* Could be "Sis\"allys" as well */
172 \def\listfigurename{Kuvat}%
173 \def\listtablename{Taulukot}%
174 \def\indexname{Hakemisto}%
175 \def\figurename{Kuva}%
176 \def\tablename{Taulukko}%
178 \def\enclname{Liitteet}%
180 \def\headtoname{Vastaanottaja}%
183 \def\alsoname{katso my\"os}%
184 \def\proofname{Todistus}%
185 \def\glossaryname{Sanasto}%
190 % \begin{macro}{\datefinnish}
191 % The macro |\datefinnish| redefines the command |\today| to
192 % produce Finnish dates.
193 % \changes{finnish-1.3e}{1994/07/12}{Added a`.' after the number of
195 % \changes{finnish-1.3k}{1997/10/01}{Use \cs{edef} to define \cs{today}
197 % \changes{finnish-1.3k}{1998/03/28}{use \cs{def} instead of \cs{edef}}
200 \def\today{\number\day.~\ifcase\month\or
201 tammikuuta\or helmikuuta\or maaliskuuta\or huhtikuuta\or
202 toukokuuta\or kes\"akuuta\or hein\"akuuta\or elokuuta\or
203 syyskuuta\or lokakuuta\or marraskuuta\or joulukuuta\fi
208 % \begin{macro}{\extrasfinnish}
209 % \begin{macro}{\noextrasfinnish}
210 % Finnish has many long words (some of them compound, some not).
211 % For this reason hyphenation is very often the only solution in
212 % line breaking. For this reason the values of |\hyphenpenalty|,
213 % |\exhyphenpenalty| and |\doublehyphendemerits| should be
214 % decreased. (In one of the manuals of style Matti Rintala noticed
215 % a paragraph with ten lines, eight of which ended in a hyphen!)
217 % Matti Rintala noticed that with these changes \TeX\ handles
218 % Finnish very well, although sometimes the values of |\tolerance|
219 % and |\emergencystretch| must be increased. However, I don't think
220 % changing these values in \file{finnish.ldf} is appropriate, as
221 % the looseness of the font (and the line width) affect the correct
222 % choice of these parameters.
223 % \changes{finnish-1.3f}{1995/05/13}{Added the setting of more
224 % hyphenation parameters, according to PR1027}
226 \addto\extrasfinnish{%
227 \babel@savevariable\hyphenpenalty\hyphenpenalty=30%
228 \babel@savevariable\exhyphenpenalty\exhyphenpenalty=30%
229 \babel@savevariable\doublehyphendemerits\doublehyphendemerits=5000%
230 \babel@savevariable\finalhyphendemerits\finalhyphendemerits=5000%
232 \addto\noextrasfinnish{}
235 % Another thing |\extrasfinnish| needs to do is to ensure that
236 % |\frenchspacing| is in effect. If this is not the case the
237 % execution of |\noextrasfinnish| will switch it of again.
238 % \changes{finnish-1.3f}{1995/05/15}{Added the setting of
239 % \cs{frenchspacing}}
241 \addto\extrasfinnish{\bbl@frenchspacing}
242 \addto\noextrasfinnish{\bbl@nonfrenchspacing}
245 % For Finnish the \texttt{"} character is made active. This is
246 % done once, later on its definition may vary. Other languages in
247 % the same document may also use the \texttt{"} character for
248 % shorthands; we specify that the finnish group of shorthands
250 % \changes{finnish-1.3g}{1995/07/02}{Added the active double quote}
252 \initiate@active@char{"}
253 \addto\extrasfinnish{\languageshorthands{finnish}}
255 % Don't forget to turn the shorthands off again.
256 % \changes{finnish-1.3n}{1999/12/16}{Deactive shorthands ouside of Finnish}
258 \addto\extrasfinnish{\bbl@activate{"}}
259 \addto\noextrasfinnish{\bbl@deactivate{"}}
263 % The `umlaut' character should be positioned lower on \emph{all}
264 % vowels in Finnish texts.
266 \addto\extrasfinnish{\umlautlow\umlautelow}
267 \addto\noextrasfinnish{\umlauthigh}
270 % First we define access to the low opening double quote and
271 % guillemets for quotations,
272 % \changes{finnish-1.3k}{1997/04/03}{Removed empty groups after
273 % double quote and guillemot characters}
274 % \changes{finnish-1.3m}{1999/04/13}{Added misisng closing brace}
276 \declare@shorthand{finnish}{"`}{%
277 \textormath{\quotedblbase}{\mbox{\quotedblbase}}}
278 \declare@shorthand{finnish}{"'}{%
279 \textormath{\textquotedblright}{\mbox{\textquotedblright}}}
280 \declare@shorthand{finnish}{"<}{%
281 \textormath{\guillemotleft}{\mbox{\guillemotleft}}}
282 \declare@shorthand{finnish}{">}{%
283 \textormath{\guillemotright}{\mbox{\guillemotright}}}
285 % then we define two shorthands to be able to specify hyphenation
286 % breakpoints that behave a little different from |\-|.
287 % \changes{finnish-1.3p}{2001/11/13}{\texttt{\symbol{34}\symbol{61}}
288 % should also use \cs{bbl@allowhyphens}}
290 \declare@shorthand{finnish}{"-}{\nobreak-\bbl@allowhyphens}
291 \declare@shorthand{finnish}{""}{\hskip\z@skip}
292 \declare@shorthand{finnish}{"=}{\hbox{-}\bbl@allowhyphens}
294 % And we want to have a shorthand for disabling a ligature.
296 \declare@shorthand{finnish}{"|}{%
297 \textormath{\discretionary{-}{}{\kern.03em}}{}}
304 % All that is left now is the redefinition of |\-|. The new version
305 % of |\-| should indicate an extra hyphenation position, while
306 % allowing other hyphenation positions to be generated
307 % automatically. The standard behaviour of \TeX\ in this respect is
308 % very unfortunate for languages such as Dutch, Finnish and German,
309 % where long compound words are quite normal and all one needs is a
310 % means to indicate an extra hyphenation position on top of the
311 % ones that \TeX\ can generate from the hyphenation patterns.
312 % \changes{finnish-1.3g}{1995/07/02}{Added change of \cs{-}}
313 % \changes{finnish-1.3n}{2000/09/19}{\cs{allowhyphens} should have
314 % been \cs{bbl@allowhyphens}}
316 \addto\extrasfinnish{\babel@save\-}
317 \addto\extrasfinnish{\def\-{\bbl@allowhyphens
318 \discretionary{-}{}{}\bbl@allowhyphens}}
322 % \begin{macro}{\finishhyphenmins}
323 % The finnish hyphenation patterns can be used with |\lefthyphenmin|
324 % set to~2 and |\righthyphenmin| set to~2.
325 % \changes{finnish-1.3f}{1995/05/13}{use \cs{finnishhyphenmins} to
326 % store the correct values}
327 % \changes{finnish-1.3n}{2000/09/22}{Now use \cs{providehyphenmins} to
328 % provide a default value}
330 \providehyphenmins{\CurrentOption}{\tw@\tw@}
334 % The macro |\ldf@finish| takes care of looking for a
335 % configuration file, setting the main language to be switched on
336 % at |\begin{document}| and resetting the category code of
337 % \texttt{@} to its original value.
338 % \changes{finnish-1.3i}{1996/11/02}{Now use \cs{ldf@finish} to wrap up}
347 %% {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
348 %% 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
349 %% Digits \0\1\2\3\4\5\6\7\8\9
350 %% Exclamation \! Double quote \" Hash (number) \#
351 %% Dollar \$ Percent \% Ampersand \&
352 %% Acute accent \' Left paren \( Right paren \)
353 %% Asterisk \* Plus \+ Comma \,
354 %% Minus \- Point \. Solidus \/
355 %% Colon \: Semicolon \; Less than \<
356 %% Equals \= Greater than \> Question mark \?
357 %% Commercial at \@ Left bracket \[ Backslash \\
358 %% Right bracket \] Circumflex \^ Underscore \_
359 %% Grave accent \` Left brace \{ Vertical bar \|
360 %% Right brace \} Tilde \~}