1 The Slovenian language

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

For this language the character " is made active. In table 1 an overview is given of its purpose. One of the reasons for this is that in the Slovene language some special characters are used.

"c \"c, also implemented for the lowercase and upper-

case s and z. "- an explicit hyphen sign, allowing hyphenation in the

rest of the word. "" like "-, but producing no hyphen sign (for compund

words with hyphen, e.g. x-""y).

"` for Slovene left double quotes (looks like ,,).
"' for Slovene right double quotes.
"< for French left double quotes (similar to <<).
"> for French right double quotes (similar to >>).

Table 1: The extra definitions made by slovene.ldf

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{slovene}\captionsslovene

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

 3 \ifx\l@slovene\@undefined
 4  \@nopatterns{Slovene}
 5  \adddialect\l@slovene0\fi

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

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

 6 \addto\captionsslovene{%
 7 \def\prefacename{Predgovor}%
 8 \def\refname{Literatura}%
 9 \def\abstractname{Povzetek}%
10 \def\bibname{Literatura}%
11 \def\chaptername{Poglavje}%
12 \def\appendixname{Dodatek}%
13 \def\contentsname{Kazalo}%

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

Contributions were made by Danilo Zavrtanik, University of Ljubljana (YU) and Leon Žlajpah (leon.zlajpah@ijs.si).

14 \def\listfigurename{Slike}%
15 \def\listtablename{Tabele}%
16 \def\indexname{Stvarno kazalo}% used to be Indeks
17 \def\figurename{Slika}%
18 \def\tablename{Tabela}%
19 \def\partname{Del}%
20 \def\enclname{Priloge}%
21 \def\ccname{Kopije}%
22 \def\headtoname{Prejme}%
23 \def\pagename{Stran}%
24 \def\seename{glej}%
25 \def\alsoname{glej tudi}%
26 \def\proofname{Dokaz}%
27 }%

\dateslovene The macro \dateslovene redefines the command \today to produce Slovenian dates.

28 \def\dateslovene{%
29 \def\today{\number\day.~\ifcase\month\or
30 januar\or februar\or marec\or april\or maj\or junij\or
31 julij\or avgust\or september\or oktober\or november\or december\fi
32 \space \number\year}}

\extrasslovene \noextrasslovene The macro \extrasslovene performs all the extra definitions needed for the Slovenian language. The macro \noextrasslovene is used to cancel the actions of

\extrasslovene.

For Slovene the " character is made active. This is done once, later on its definition may vary. Other languages in the same document may also use the " character for shorthands; we specify that the slovenian group of shorthands should be used.

33 \initiate@active@char{"}
34 \addto\extrasslovene{\languageshorthands{slovene}}
35 \addto\extrasslovene{\bbl@activate{"}}
36 %\addto\noextrasslovene{\bbl@deactivate{"}}

First we define shorthands to facilitate the occurence of letters such as č.

37 \declare@shorthand{slovene}{"c}{\textormath{\v c}{\check c}}
38 \declare@shorthand{slovene}{"s}{\textormath{\v s}{\check s}}
39 \declare@shorthand{slovene}{"z}{\textormath{\v z}{\check z}}
40 \declare@shorthand{slovene}{"C}{\textormath{\v C}{\check C}}
41 \declare@shorthand{slovene}{"S}{\textormath{\v S}{\check S}}
42 \declare@shorthand{slovene}{"Z}{\textormath{\v Z}{\check Z}}

Then we define access to two forms of quotation marks, similar to the german and french quotation marks.

43 \declare@shorthand{slovene}{"`}{%
44 \textormath{\quotedblbase{}}{\mbox{\quotedblbase}}}
45 \declare@shorthand{slovene}{"'}{%
46 \textormath{\textquotedblleft{}}{\mbox{\textquotedblleft}}}
47 \declare@shorthand{slovene}{"<}{%
48 \textormath{\guillemotleft{}}{\mbox{\guillemotleft}}}
49 \declare@shorthand{slovene}{">}{%
50 \textormath{\guillemotright{}}{\mbox{\guillemotright}}}

then we define two shorthands to be able to specify hyphenation breakpoints that behavew a little different from \-.

51 \declare@shorthand{slovene}{"-}{\allowhyphens-\allowhyphens}
52 \declare@shorthand{slovene}{""}{\hskip\z@skip}

And we want to have a shorthand for disabling a ligature.

53 \declare@shorthand{slovene}{"|}{%
54 \textormath{\discretionary{-}{}{\kern.03em}}{}}

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.

55 \ldf@finish{slovene}

56 ⟨/code⟩