summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/babel/slovak.dtx
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-08 12:40:07 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-08 12:40:07 +0000
commit556c8fb15a545d032fe1bb0054304c96ae6ec282 (patch)
treec544309596ba77658e30010cbd8facbb7681bedf /Master/texmf-dist/source/generic/babel/slovak.dtx
parent95469a6860fde8bb7598f4b425d701d0302992b9 (diff)
babel v3.8l 2008/07/06
git-svn-id: svn://tug.org/texlive/trunk@9360 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/babel/slovak.dtx')
-rw-r--r--Master/texmf-dist/source/generic/babel/slovak.dtx1165
1 files changed, 1029 insertions, 136 deletions
diff --git a/Master/texmf-dist/source/generic/babel/slovak.dtx b/Master/texmf-dist/source/generic/babel/slovak.dtx
index 8b47f53b86e..d2d0c00a79b 100644
--- a/Master/texmf-dist/source/generic/babel/slovak.dtx
+++ b/Master/texmf-dist/source/generic/babel/slovak.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 1989-2005 Johannes L. Braams and any individual authors
+% Copyright 1989-2008 Johannes L. Braams and any individual authors
% listed elsewhere in this file. All rights reserved.
%
% This file is part of the Babel system.
@@ -26,21 +26,21 @@
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
-% \CheckSum{402}
+% \CheckSum{1382}
% \iffalse
% Tell the \LaTeX\ system who we are and write an entry on the
% transcript.
%<*dtx>
\ProvidesFile{slovak.dtx}
%</dtx>
-%<code>\ProvidesLanguage{slovak}
+%<+code>\ProvidesLanguage{slovak}
%\fi
%\ProvidesFile{slovak.dtx}
- [2005/03/31 v1.3a Slovak support from the babel system]
+ [2008/07/06 v3.1a Slovak support from the babel system]
%\iffalse
%% File `slovak.dtx'
%% Babel package for LaTeX version 2e
-%% Copyright (C) 1989 - 2005
+%% Copyright (C) 1989 - 2008
%% by Johannes Braams, TeXniek
%
%% Slovak Language Definition File
@@ -63,8 +63,15 @@
% Deutschland
% Tobias.Schlemmer at web.de
%
-%% Please report errors to: J.L. Braams babel at braams.cistron.nl
-%% Tobias Schlemmer Tobias.Schlemmer at web.de
+%% Copyright (C) 2005-2008
+%% by Petr Tesa\v r\'ik (babel at tesarici.cz)
+%
+% This file is also based on CSLaTeX
+% by Ji\v r\'i Zlatu\v ska, Zden\v ek Wagner,
+% Jaroslav \v Snajdr and Petr Ol\v s\'ak.
+%
+%% Please report errors to: Petr Tesa\v r\'ik
+%% babel at tesarici.cz
%
% This file is part of the babel system, it provides the source
% code for the Slovak language definition file.
@@ -81,6 +88,10 @@
\end{document}
%</filedriver>
%\fi
+%
+% \def\CS{$\cal C\kern-.1667em
+% \lower.5ex\hbox{$\cal S$}\kern-.075em$}
+%
% \GetFileInfo{slovak.dtx}
%
% \changes{slovak-1.0}{1992/07/15}{First version}
@@ -93,14 +104,19 @@
% beginning.}
% \changes{slovak-1.3a}{2004/02/20}{Added contributed shorthand
% definitions}
+% \changes{slovak-3.0}{2005/09/10}{Implemented the functionality of
+% \CS\LaTeX's slovak.sty. The version number was bumped to 3.0
+% to minimize confusion by being higher than the last version
+% of \CS\LaTeX.}
%
% \section{The Slovak language}
%
% The file \file{\filename}\footnote{The file described in this
% section has version number \fileversion\ and was last revised on
-% \filedate. It was written by Jana Chlebikova
+% \filedate. It was originally written by Jana Chlebikova
% (\texttt{chlebik@euromath.dk}) and modified by Tobias Schlemmer
-% (\texttt{Tobias.Schlemmer@web.de}).} defines all the
+% (\texttt{Tobias.Schlemmer@web.de}). It was then rewritten by
+% Petr Tesa\v r\'ik (\texttt{babel@tesarici.cz}).} defines all the
% language-specific macros for the Slovak language.
%
% For this language the macro |\q| is defined. It was used with the
@@ -112,7 +128,7 @@
% use this encoding, please, feel free to redefine |\q| in your file.
% I think babel will honour this |;-)|.
%
-% For this language the characters |"|, |'| and |^| are ade
+% For this language the characters |"|, |'| and |^| are made
% active. In table~\ref{tab:slovak-quote} an overview is given of
% its purpose. Also the vertical placement of the
% umlaut can be controlled this way.
@@ -166,8 +182,69 @@
% \end{center}
% \end{table}
%
+% \subsection{Compatibility}
+%
+% Great care has been taken to ensure backward compatibility with
+% \CS\LaTeX. In particular, documents which load this file with
+% |\usepackage{slovak}| should produce identical output with no
+% modifications to the source. Additionally, all the \CS\LaTeX{}
+% options are recognized:
+%
+% \label{tab:slovak-options}
+% \begin{list}{}
+% {\def\makelabel#1{\sbox0{\Lopt{#1}}%
+% \ifdim\wd0>\labelwidth
+% \setbox0\vbox{\box0\hbox{}} \wd0=0pt \fi
+% \box0\hfil}
+% \setlength{\labelwidth}{2\parindent}
+% \setlength{\leftmargin}{2\parindent}
+% \setlength{\rightmargin}{\parindent}}
+% \item[IL2, T1, OT1]
+% These options set the default font encoding. Please note
+% that their use is deprecated. You should use the |fontenc|
+% package to select font encoding.
+%
+% \item[split, nosplit]
+% These options control whether hyphenated words are
+% automatically split according to Slovak typesetting rules.
+% With the \Lopt{split} option ``je-li'' is hyphenated as
+% ``je-/-li''. The \Lopt{nosplit} option disables this behavior.
+%
+% The use of this option is strongly discouraged, as it breaks
+% too many common things---hyphens cannot be used in labels,
+% negative arguments to \TeX{} primitives will not work in
+% horizontal mode (use \cs{minus} as a workaround), and there are
+% a few other peculiarities with using this mode.
+%
+% \item[nocaptions]
+%
+% This option was used in \CS\LaTeX{} to set up Czech/Slovak
+% typesetting rules, but leave the original captions and dates.
+% The recommended way to achieve this is to use English as the main
+% language of the document and use the environment |otherlanguage*|
+% for Czech text.
+%
+% \item[olduv]
+% There are two version of \cs{uv}. The older one allows the use
+% of \cs{verb} inside the quotes but breaks any respective kerning
+% with the quotes (like that in \CS{} fonts). The newer one honors
+% the kerning in the font but does not allow \cs{verb} inside the
+% quotes.
+%
+% The new version is used by default in \LaTeXe{} and the old version
+% is used with plain \TeX. You may use \Lopt{olduv} to override the
+% default in \LaTeXe.
+%
+% \item[cstex]
+% This option was used to include the commands \cs{csprimeson} and
+% \cs{csprimesoff}. Since these commands are always included now,
+% it has been removed and the empty definition lasts for compatibility.
+% \end{list}
+%
% \StopEventually{}
%
+% \subsection{Implementation}
+%
% The macro |\LdfInit| takes care of preventing that this file is
% loaded more than once, checking the category code of the
% \texttt{@} sign, etc.
@@ -175,7 +252,7 @@
% initial checks}
% \begin{macrocode}
%<*code>
-\LdfInit{slovak}\captionsslovak
+\LdfInit\CurrentOption{date\CurrentOption}
% \end{macrocode}
%
% When this file is read as an option, i.e. by the |\usepackage|
@@ -191,20 +268,97 @@
\adddialect\l@slovak0\fi
% \end{macrocode}
%
+% We need to define these macros early in the process.
+%
+% \begin{macrocode}
+\def\cs@iltw@{IL2}
+\newif\ifcs@splithyphens
+\cs@splithyphensfalse
+% \end{macrocode}
+%
+% If Babel is not loaded, we provide compatibility with \CS\LaTeX.
+% However, if macro \cs{@ifpackageloaded} is not defined, we assume
+% to be loaded from plain and provide compatibility with csplain.
+% Of course, this does not work well with \LaTeX$\:$2.09, but I
+% doubt anyone will ever want to use this file with \LaTeX$\:$2.09.
+%
+% \begin{macrocode}
+\ifx\@ifpackageloaded\@undefined
+ \let\cs@compat@plain\relax
+ \message{csplain compatibility mode}
+\else
+ \@ifpackageloaded{babel}{}{%
+ \let\cs@compat@latex\relax
+ \message{cslatex compatibility mode}}
+\fi
+\ifx\cs@compat@latex\relax
+ \ProvidesPackage{slovak}[2008/07/06 v3.1a CSTeX Slovak style]
+% \end{macrocode}
+%
+% Declare \CS\LaTeX{} options (see also the descriptions on page
+% \pageref{tab:slovak-options}).
+%
+% \begin{macrocode}
+ \DeclareOption{IL2}{\def\encodingdefault{IL2}}
+ \DeclareOption {T1}{\def\encodingdefault {T1}}
+ \DeclareOption{OT1}{\def\encodingdefault{OT1}}
+ \DeclareOption{nosplit}{\cs@splithyphensfalse}
+ \DeclareOption{split}{\cs@splithyphenstrue}
+ \DeclareOption{nocaptions}{\let\cs@nocaptions=\relax}
+ \DeclareOption{olduv}{\let\cs@olduv=\relax}
+ \DeclareOption{cstex}{\relax}
+% \end{macrocode}
+%
+% Make |IL2| encoding the default. This can be overriden with
+% the other font encoding options.
+% \begin{macrocode}
+ \ExecuteOptions{\cs@iltw@}
+% \end{macrocode}
+%
+% Now, process the user-supplied options.
+% \begin{macrocode}
+ \ProcessOptions
+% \end{macrocode}
+%
+% Standard \LaTeXe{} does not include the IL2 encoding in the format.
+% The encoding can be loaded later using the fontenc package, but
+% \CS\LaTeX{} included IL2 by default. This means existing documents
+% for \CS\LaTeX{} do not load that package, so load the encoding
+% ourselves in compatibility mode.
+%
+% \begin{macrocode}
+ \ifx\encodingdefault\cs@iltw@
+ \input il2enc.def
+ \fi
+% \end{macrocode}
+%
+% Restore the definition of \cs{CurrentOption}, clobbered by processing
+% the options.
+%
+% \begin{macrocode}
+ \def\CurrentOption{slovak}
+\fi
+% \end{macrocode}
+%
% The next step consists of defining commands to switch to (and
% from) the Slovak language.
%
-% \begin{macro}{\captionsslovak}
-% The macro |\captionsslovak| defines all strings used in the four
+% \begin{macro}{\captionsslovak}
+% The macro \cs{captionsslovak} defines all strings used in the four
% standard documentclasses provided with \LaTeX.
% \changes{slovak-1.2g}{1995/07/04}{Added \cs{proofname} for
% AMS-\LaTeX}
% \changes{slovak-1.2k}{1999/02/28}{Repaired a few spelling mistakes}
% \changes{slovak-1.2l}{2000/09/20}{Added \cs{glossaryname}}
+% \changes{slovak-3.0}{2005/12/22}{Updated some translations. Former
+% translations were: `\'Uvod' for \cs{prefacename}, `Referencie' for
+% \cs{refname}, `Index' for \cs{indexname}, `Obr\'azok' for
+% \cs{figurename}, `Pr\'ilohy' for \cs{enclname}, `CC' for \cs{ccname},
+% `Komu' for \cs{headtoname}, `Strana' for \cs{pagename}}
% \begin{macrocode}
-\addto\captionsslovak{%
- \def\prefacename{\'Uvod}%
- \def\refname{Referencie}%
+\@namedef{captions\CurrentOption}{%
+ \def\prefacename{Predhovor}%
+ \def\refname{Literat\'ura}%
\def\abstractname{Abstrakt}%
\def\bibname{Literat\'ura}%
\def\chaptername{Kapitola}%
@@ -212,179 +366,918 @@
\def\contentsname{Obsah}%
\def\listfigurename{Zoznam obr\'azkov}%
\def\listtablename{Zoznam tabuliek}%
- \def\indexname{Index}%
- \def\figurename{Obr\'azok}%
- \def\tablename{Tabu\q lka}%%% special letter l with hook
- \def\partname{\v{C}as\q t}%%% special letter t with hook
- \def\enclname{Pr\'{\i}lohy}%
- \def\ccname{CC}%
- \def\headtoname{Komu}%
- \def\pagename{Strana}%
- \def\seename{vi\q d}%%% Special letter d with hook
- \def\alsoname{vi\q d tie\v z}%%% Special letter d with hook
+ \def\indexname{Register}%
+ \def\figurename{Obr.}%
+ \def\tablename{Tabu\v{l}ka}%
+ \def\partname{\v{C}as\v{t}}%
+ \def\enclname{Pr\'{\i}loha}%
+ \def\ccname{cc.}%
+ \def\headtoname{Pre}%
+ \def\pagename{Str.}%
+ \def\seename{vi\v{d}}%
+ \def\alsoname{vi\v{d} tie\v{z}}%
\def\proofname{D\^okaz}%
- \def\glossaryname{Glossary}% <-- Needs translation
- }
+ \def\glossaryname{Slovn\'{\i}k}%
+ }%
% \end{macrocode}
-% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\dateslovak}
-% The macro |\dateslovak| redefines the command |\today| to produce
-% Slovak dates.
+% \begin{macro}{\dateslovak}
+% The macro \cs{dateslovak} redefines the command \cs{today}
+% to produce Slovak dates.
% \changes{slovak-1.2j}{1997/10/01}{Use \cs{edef} to define
% \cs{today} to save memory}
% \changes{slovak-1.2j}{1998/03/28}{use \cs{def} instead of \cs{edef}}
% \changes{slovak-1.2k}{1999/02/28}{Repaired a spelling mistake}
% \begin{macrocode}
-\def\dateslovak{%
+\@namedef{date\CurrentOption}{%
\def\today{\number\day.~\ifcase\month\or
janu\'ara\or febru\'ara\or marca\or apr\'{\i}la\or m\'aja\or
j\'una\or j\'ula\or augusta\or septembra\or okt\'obra\or
novembra\or decembra\fi
\space \number\year}}
% \end{macrocode}
-% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\extrasslovak}
-% \begin{macro}{\noextrasslovak}
-% The macro |\extrasslovak| will perform all the extra definitions
-% needed for the Slovak language. The macro |\noextrasslovak| is
-% used to cancel the actions of |\extrasslovak|.
-% For Slovak three characters are used to define shorthands, they
-% need to be made active.
-% \changes{slovak-1.3a}{2004/02/20}{Make three characters available
-% for shorthands}
+% \begin{macro}{\extrasslovak}
+% \begin{macro}{\noextrasslovak}
+% The macro \cs{extrasslovak} will perform all the extra definitions
+% needed for the Slovak language. The macro \cs{noextrasslovak} is
+% used to cancel the actions of \cs{extrasslovak}.
%
+% For Slovak texts \cs{frenchspacing} should be in effect. Language
+% group for shorthands is also set here.
+% \changes{slovak-3.0}{1995/04/21}{now use \cs{bbl@frenchspacing} and
+% \cs{bbl@nonfrenchspacing}}
+% \changes{slovak-3.1}{2006/10/07}{move \cs{languageshorthands} here,
+% so that the language group is always initialized correctly}
% \begin{macrocode}
-\addto\extrasslovak{\languageshorthands{slovak}}
-\initiate@active@char{^}
-\addto\extrasslovak{\bbl@activate{^}}
-\addto\noextrasslovak{\bbl@deactivate{^}}
-\initiate@active@char{"}
-\addto\extrasslovak{\bbl@activate{"}\umlautlow}
-\addto\noextrasslovak{\bbl@deactivate{"}\umlauthigh}
-\initiate@active@char{'}
-\@ifpackagewith{babel}{activeacute}{%
- \addto\extrasslovak{\bbl@activate{'}}
- \addto\noextrasslovak{\bbl@deactivate{'}}%
- }{}
+\expandafter\addto\csname extras\CurrentOption\endcsname{%
+ \bbl@frenchspacing
+ \languageshorthands{slovak}}
+\expandafter\addto\csname noextras\CurrentOption\endcsname{%
+ \bbl@nonfrenchspacing}
% \end{macrocode}
%
-%
% \changes{slovak-1.2e}{1995/05/28}{Use \LaTeX's \cs{v} accent
% command}
% \begin{macrocode}
-\addto\extrasslovak{\babel@save\q\let\q\v}
+\expandafter\addto\csname extras\CurrentOption\endcsname{%
+ \babel@save\q\let\q\v}
% \end{macrocode}
%
-% \changes{slovak-1.2b}{1994/06/04}{Added setting of left- and
-% righthyphenmin}
-%
-% The slovak hyphenation patterns should be used with
-% |\lefthyphenmin| set to~2 and |\righthyphenmin| set to~2.
-% \changes{slovak-1.2e}{1995/05/28}{Now use \cs{slovakhyphenmins}}
-% \changes{slovak-1.2l}{2000/09/22}{Now use \cs{providehyphenmins} to
-% provide a default value}
+% For Slovak three characters are used to define shorthands, they
+% need to be made active.
+% \changes{slovak-1.3a}{2004/02/20}{Make three characters available
+% for shorthands}
% \begin{macrocode}
-\providehyphenmins{\CurrentOption}{\tw@\tw@}
+\ifx\cs@compat@latex\relax\else
+ \initiate@active@char{^}
+ \addto\extrasslovak{\bbl@activate{^}}
+ \addto\noextrasslovak{\bbl@deactivate{^}}
+ \initiate@active@char{"}
+ \addto\extrasslovak{\bbl@activate{"}\umlautlow}
+ \addto\noextrasslovak{\bbl@deactivate{"}\umlauthigh}
+ \initiate@active@char{'}
+ \@ifpackagewith{babel}{activeacute}{%
+ \addto\extrasslovak{\bbl@activate{'}}
+ \addto\noextrasslovak{\bbl@deactivate{'}}%
+ }{}
+\fi
% \end{macrocode}
-% \end{macro}
-% \end{macro}
+% \end{macro}
+% \end{macro}
%
+% \begin{macro}{\sq}
% \begin{macro}{\dq}
-% We save the original double quote character in |\dq| to keep
-% it available, the math accent |\"| can now be typed as |"|.
+% We save the original single and double quote characters in
+% \cs{sq} and \cs{dq} to make them available later. The math
+% accent |\"| can now be typed as |"|.
% \begin{macrocode}
-\begingroup \catcode`\"12
+\begingroup\catcode`\"=12\catcode`\'=12
\def\x{\endgroup
\def\sq{'}
\def\dq{"}}
\x
% \end{macrocode}
-% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \changes{slovak-1.2b}{1994/06/04}{Added setting of left- and
+% righthyphenmin}
+%
+% The slovak hyphenation patterns should be used with
+% |\lefthyphenmin| set to~2 and |\righthyphenmin| set to~3.
+% \changes{slovak-1.2e}{1995/05/28}{Now use \cs{slovakhyphenmins}}
+% \changes{slovak-1.2l}{2000/09/22}{Now use \cs{providehyphenmins} to
+% provide a default value}
+% \changes{slovak-3.0}{2005/12/22}{Changed default \cs{righthyphenmin}
+% to 3 characters.}
+% \begin{macrocode}
+\providehyphenmins{\CurrentOption}{\tw@\thr@@}
+% \end{macrocode}
%
% In order to prevent problems with the active |^| we add a
% shorthand on system level which expands to a `normal |^|.
% \begin{macrocode}
-\declare@shorthand{system}{^}{\csname normal@char\string^\endcsname}
+\ifx\cs@compat@latex\relax\else
+ \declare@shorthand{system}{^}{\csname normal@char\string^\endcsname}
% \end{macrocode}
%
% Now we can define the doublequote macros: the umlauts,
% \begin{macrocode}
-\declare@shorthand{slovak}{"a}{\textormath{\"{a}\allowhyphens}{\ddot a}}
-\declare@shorthand{slovak}{"o}{\textormath{\"{o}\allowhyphens}{\ddot o}}
-\declare@shorthand{slovak}{"u}{\textormath{\"{u}\allowhyphens}{\ddot u}}
-\declare@shorthand{slovak}{"A}{\textormath{\"{A}\allowhyphens}{\ddot A}}
-\declare@shorthand{slovak}{"O}{\textormath{\"{O}\allowhyphens}{\ddot O}}
-\declare@shorthand{slovak}{"U}{\textormath{\"{U}\allowhyphens}{\ddot U}}
+ \declare@shorthand{slovak}{"a}{\textormath{\"{a}\allowhyphens}{\ddot a}}
+ \declare@shorthand{slovak}{"o}{\textormath{\"{o}\allowhyphens}{\ddot o}}
+ \declare@shorthand{slovak}{"u}{\textormath{\"{u}\allowhyphens}{\ddot u}}
+ \declare@shorthand{slovak}{"A}{\textormath{\"{A}\allowhyphens}{\ddot A}}
+ \declare@shorthand{slovak}{"O}{\textormath{\"{O}\allowhyphens}{\ddot O}}
+ \declare@shorthand{slovak}{"U}{\textormath{\"{U}\allowhyphens}{\ddot U}}
% \end{macrocode}
% tremas,
% \begin{macrocode}
-\declare@shorthand{slovak}{"e}{\textormath{\"{e}\allowhyphens}{\ddot e}}
-\declare@shorthand{slovak}{"E}{\textormath{\"{E}\allowhyphens}{\ddot E}}
-\declare@shorthand{slovak}{"i}{\textormath{\"{\i}\allowhyphens}%
- {\ddot\imath}}
-\declare@shorthand{slovak}{"I}{\textormath{\"{I}\allowhyphens}{\ddot I}}
+ \declare@shorthand{slovak}{"e}{\textormath{\"{e}\allowhyphens}{\ddot e}}
+ \declare@shorthand{slovak}{"E}{\textormath{\"{E}\allowhyphens}{\ddot E}}
+ \declare@shorthand{slovak}{"i}{\textormath{\"{\i}\allowhyphens}%
+ {\ddot\imath}}
+ \declare@shorthand{slovak}{"I}{\textormath{\"{I}\allowhyphens}{\ddot I}}
% \end{macrocode}
% other slovak characters
% \begin{macrocode}
-\declare@shorthand{slovak}{^c}{\textormath{\v{c}\allowhyphens}{\check{c}}}
-\declare@shorthand{slovak}{^d}{\textormath{\q{d}\allowhyphens}{\check{d}}}
-\declare@shorthand{slovak}{^l}{\textormath{\q{l}\allowhyphens}{\check{l}}}
-\declare@shorthand{slovak}{^n}{\textormath{\v{n}\allowhyphens}{\check{n}}}
-\declare@shorthand{slovak}{^o}{\textormath{\^{o}\allowhyphens}{\hat{o}}}
-\declare@shorthand{slovak}{^s}{\textormath{\v{s}\allowhyphens}{\check{s}}}
-\declare@shorthand{slovak}{^t}{\textormath{\q{t}\allowhyphens}{\check{t}}}
-\declare@shorthand{slovak}{^z}{\textormath{\v{z}\allowhyphens}{\check{z}}}
-\declare@shorthand{slovak}{^C}{\textormath{\v{C}\allowhyphens}{\check{C}}}
-\declare@shorthand{slovak}{^D}{\textormath{\v{D}\allowhyphens}{\check{D}}}
-\declare@shorthand{slovak}{^L}{\textormath{\q{L}\allowhyphens}{\check{L}}}
-\declare@shorthand{slovak}{^N}{\textormath{\v{N}\allowhyphens}{\check{N}}}
-\declare@shorthand{slovak}{^O}{\textormath{\^{O}\allowhyphens}{\hat{O}}}
-\declare@shorthand{slovak}{^S}{\textormath{\v{S}\allowhyphens}{\check{S}}}
-\declare@shorthand{slovak}{^T}{\textormath{\v{T}\allowhyphens}{\check{T}}}
-\declare@shorthand{slovak}{^Z}{\textormath{\v{Z}\allowhyphens}{\check{Z}}}
+ \declare@shorthand{slovak}{^c}{\textormath{\v{c}\allowhyphens}{\check{c}}}
+ \declare@shorthand{slovak}{^d}{\textormath{\q{d}\allowhyphens}{\check{d}}}
+ \declare@shorthand{slovak}{^l}{\textormath{\q{l}\allowhyphens}{\check{l}}}
+ \declare@shorthand{slovak}{^n}{\textormath{\v{n}\allowhyphens}{\check{n}}}
+ \declare@shorthand{slovak}{^o}{\textormath{\^{o}\allowhyphens}{\hat{o}}}
+ \declare@shorthand{slovak}{^s}{\textormath{\v{s}\allowhyphens}{\check{s}}}
+ \declare@shorthand{slovak}{^t}{\textormath{\q{t}\allowhyphens}{\check{t}}}
+ \declare@shorthand{slovak}{^z}{\textormath{\v{z}\allowhyphens}{\check{z}}}
+ \declare@shorthand{slovak}{^C}{\textormath{\v{C}\allowhyphens}{\check{C}}}
+ \declare@shorthand{slovak}{^D}{\textormath{\v{D}\allowhyphens}{\check{D}}}
+ \declare@shorthand{slovak}{^L}{\textormath{\q{L}\allowhyphens}{\check{L}}}
+ \declare@shorthand{slovak}{^N}{\textormath{\v{N}\allowhyphens}{\check{N}}}
+ \declare@shorthand{slovak}{^O}{\textormath{\^{O}\allowhyphens}{\hat{O}}}
+ \declare@shorthand{slovak}{^S}{\textormath{\v{S}\allowhyphens}{\check{S}}}
+ \declare@shorthand{slovak}{^T}{\textormath{\v{T}\allowhyphens}{\check{T}}}
+ \declare@shorthand{slovak}{^Z}{\textormath{\v{Z}\allowhyphens}{\check{Z}}}
% \end{macrocode}
% acute accents,
% \begin{macrocode}
-\@ifpackagewith{babel}{activeacute}{%
- \declare@shorthand{slovak}{'a}{\textormath{\'a\allowhyphens}{^{\prime}a}}
- \declare@shorthand{slovak}{'e}{\textormath{\'e\allowhyphens}{^{\prime}e}}
- \declare@shorthand{slovak}{'i}{\textormath{\'\i{}\allowhyphens}{^{\prime}i}}
- \declare@shorthand{slovak}{'l}{\textormath{\'l\allowhyphens}{^{\prime}l}}
- \declare@shorthand{slovak}{'o}{\textormath{\'o\allowhyphens}{^{\prime}o}}
- \declare@shorthand{slovak}{'r}{\textormath{\'r\allowhyphens}{^{\prime}r}}
- \declare@shorthand{slovak}{'u}{\textormath{\'u\allowhyphens}{^{\prime}u}}
- \declare@shorthand{slovak}{'y}{\textormath{\'y\allowhyphens}{^{\prime}y}}
- \declare@shorthand{slovak}{'A}{\textormath{\'A\allowhyphens}{^{\prime}A}}
- \declare@shorthand{slovak}{'E}{\textormath{\'E\allowhyphens}{^{\prime}E}}
- \declare@shorthand{slovak}{'I}{\textormath{\'I\allowhyphens}{^{\prime}I}}
- \declare@shorthand{slovak}{'L}{\textormath{\'L\allowhyphens}{^{\prime}l}}
- \declare@shorthand{slovak}{'O}{\textormath{\'O\allowhyphens}{^{\prime}O}}
- \declare@shorthand{slovak}{'R}{\textormath{\'R\allowhyphens}{^{\prime}R}}
- \declare@shorthand{slovak}{'U}{\textormath{\'U\allowhyphens}{^{\prime}U}}
- \declare@shorthand{slovak}{'Y}{\textormath{\'Y\allowhyphens}{^{\prime}Y}}
- \declare@shorthand{slovak}{''}{%
- \textormath{\textquotedblright}{\sp\bgroup\prim@s'}}
- }{}
-% \end{macrocode}
-% german and french quotes,
-% \begin{macrocode}
-\declare@shorthand{slovak}{"`}{\glqq}
-\declare@shorthand{slovak}{"'}{\grqq}
-\declare@shorthand{slovak}{"<}{\flqq}
-\declare@shorthand{slovak}{">}{\frqq}
-% \end{macrocode}
+ \@ifpackagewith{babel}{activeacute}{%
+ \declare@shorthand{slovak}{'a}{\textormath{\'a\allowhyphens}{^{\prime}a}}
+ \declare@shorthand{slovak}{'e}{\textormath{\'e\allowhyphens}{^{\prime}e}}
+ \declare@shorthand{slovak}{'i}{\textormath{\'\i{}\allowhyphens}{^{\prime}i}}
+ \declare@shorthand{slovak}{'l}{\textormath{\'l\allowhyphens}{^{\prime}l}}
+ \declare@shorthand{slovak}{'o}{\textormath{\'o\allowhyphens}{^{\prime}o}}
+ \declare@shorthand{slovak}{'r}{\textormath{\'r\allowhyphens}{^{\prime}r}}
+ \declare@shorthand{slovak}{'u}{\textormath{\'u\allowhyphens}{^{\prime}u}}
+ \declare@shorthand{slovak}{'y}{\textormath{\'y\allowhyphens}{^{\prime}y}}
+ \declare@shorthand{slovak}{'A}{\textormath{\'A\allowhyphens}{^{\prime}A}}
+ \declare@shorthand{slovak}{'E}{\textormath{\'E\allowhyphens}{^{\prime}E}}
+ \declare@shorthand{slovak}{'I}{\textormath{\'I\allowhyphens}{^{\prime}I}}
+ \declare@shorthand{slovak}{'L}{\textormath{\'L\allowhyphens}{^{\prime}l}}
+ \declare@shorthand{slovak}{'O}{\textormath{\'O\allowhyphens}{^{\prime}O}}
+ \declare@shorthand{slovak}{'R}{\textormath{\'R\allowhyphens}{^{\prime}R}}
+ \declare@shorthand{slovak}{'U}{\textormath{\'U\allowhyphens}{^{\prime}U}}
+ \declare@shorthand{slovak}{'Y}{\textormath{\'Y\allowhyphens}{^{\prime}Y}}
+ \declare@shorthand{slovak}{''}{%
+ \textormath{\textquotedblright}{\sp\bgroup\prim@s'}}
+ }{}
+ % \end{macrocode}
% and some additional commands:
% \begin{macrocode}
-\declare@shorthand{slovak}{"-}{\nobreak\-\bbl@allowhyphens}
-\declare@shorthand{slovak}{"|}{%
- \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
- \bbl@allowhyphens}{}}
-\declare@shorthand{slovak}{""}{\hskip\z@skip}
-\declare@shorthand{slovak}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
-\declare@shorthand{slovak}{"=}{\nobreak-\hskip\z@skip}
+ \declare@shorthand{slovak}{"-}{\nobreak\-\bbl@allowhyphens}
+ \declare@shorthand{slovak}{"|}{%
+ \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
+ \bbl@allowhyphens}{}}
+ \declare@shorthand{slovak}{""}{\hskip\z@skip}
+ \declare@shorthand{slovak}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
+ \declare@shorthand{slovak}{"=}{\cs@splithyphen}
+\fi
+% \end{macrocode}
+%
+% \begin{macro}{\v}
+% \LaTeX's normal |\v| accent places a caron over the letter that
+% follows it (\v{o}). 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.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \DeclareTextCompositeCommand{\v}{OT1}{t}{%
+ t\kern-.23em\raise.24ex\hbox{'}}
+ \DeclareTextCompositeCommand{\v}{OT1}{d}{%
+ d\kern-.13em\raise.24ex\hbox{'}}
+ \DeclareTextCompositeCommand{\v}{OT1}{l}{\lcaron{}}
+ \DeclareTextCompositeCommand{\v}{OT1}{L}{\Lcaron{}}}
+% \end{macrocode}
+%
+% \begin{macro}{\lcaron}
+% \begin{macro}{\Lcaron}
+% For the letters \texttt{l} and \texttt{L} we want to disinguish
+% between normal fonts and monospaced fonts.
+% \begin{macrocode}
+\def\lcaron{%
+ \setbox0\hbox{M}\setbox\tw@\hbox{i}%
+ \ifdim\wd0>\wd\tw@\relax
+ l\kern-.13em\raise.24ex\hbox{'}\kern-.11em%
+ \else
+ l\raise.45ex\hbox to\z@{\kern-.35em '\hss}%
+ \fi}
+\def\Lcaron{%
+ \setbox0\hbox{M}\setbox\tw@\hbox{i}%
+ \ifdim\wd0>\wd\tw@\relax
+ L\raise.24ex\hbox to\z@{\kern-.28em'\hss}%
+ \else
+ L\raise.45ex\hbox to\z@{\kern-.40em '\hss}%
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Initialize active quotes. \CS\LaTeX{} provides a way of
+% converting English-style quotes into Slovak-style ones. Both
+% single and double quotes are affected, i.e. |``text''| is
+% converted to something like |,,text``| and |`text'| is converted
+% to |,text`|. This conversion can be switched on and off with
+% \cs{csprimeson} and \cs{csprimesoff}.\footnote{By the way, the
+% names of these macros are misleading, because the handling of
+% primes in math mode is rather marginal, the most important thing
+% being the handling of quotes\ldots}
+%
+% These quotes present various troubles, e.g. the kerning is broken,
+% apostrophes are converted to closing single quote, some primitives
+% are broken (most notably the |\catcode`\|\meta{char} syntax will
+% not work any more), and writing them to \file{.aux} files cannot
+% be handled correctly. For these reasons, these commands are only
+% available in \CS\LaTeX{} compatibility mode.
+%
+% \begin{macrocode}
+\ifx\cs@compat@latex\relax
+ \let\cs@ltxprim@s\prim@s
+ \def\csprimeson{%
+ \catcode``\active \catcode`'\active \let\prim@s\bbl@prim@s}
+ \def\csprimesoff{%
+ \catcode``12 \catcode`'12 \let\prim@s\cs@ltxprim@s}
+ \begingroup\catcode``\active
+ \def\x{\endgroup
+ \def`{\futurelet\cs@next\cs@openquote}
+ \def\cs@openquote{%
+ \ifx`\cs@next \expandafter\cs@opendq
+ \else \expandafter\clq
+ \fi}%
+ }\x
+ \begingroup\catcode`'\active
+ \def\x{\endgroup
+ \def'{\textormath{\futurelet\cs@next\cs@closequote}
+ {^\bgroup\prim@s}}
+ \def\cs@closequote{%
+ \ifx'\cs@next \expandafter\cs@closedq
+ \else \expandafter\crq
+ \fi}%
+ }\x
+ \def\cs@opendq{\clqq\let\cs@next= }
+ \def\cs@closedq{\crqq\let\cs@next= }
+% \end{macrocode}
+%
+% The way I recommend for typesetting quotes in Slovak documents
+% is to use shorthands similar to those used in German.
+%
+% \changes{3.0}{2006/04/21}{|"`| and |"'| changed from German quotes
+% to Slovak quotes}
+% \begin{macrocode}
+\else
+ \declare@shorthand{slovak}{"`}{\clqq}
+ \declare@shorthand{slovak}{"'}{\crqq}
+ \declare@shorthand{slovak}{"<}{\flqq}
+ \declare@shorthand{slovak}{">}{\frqq}
+\fi
+% \end{macrocode}
+%
+% \begin{macro}{\clqq}
+% This is the CS opening quote, which is similar to the German
+% quote (\cs{glqq}) but the kerning is different.
+%
+% For the OT1 encoding, the quote is constructed from the right
+% double quote (i.e. the ``Opening quotes'' character) by moving
+% it down to the baseline and shifting it to the right, or to the
+% left if italic correction is positive.
+%
+% For T1, the ``German Opening quotes'' is used. It is moved to
+% the right and the total width is enlarged. This is done in an
+% attempt to minimize the difference between the OT1 and T1
+% versions.
+%
+% \changes{3.0}{2006/04/20}{Added \cs{leavevmode} to allow an opening
+% quote at the beginning of a paragraph}
+% \begin{macrocode}
+\ProvideTextCommand{\clqq}{OT1}{%
+ \set@low@box{\textquotedblright}%
+ \setbox\@ne=\hbox{l\/}\dimen\@ne=\wd\@ne
+ \setbox\@ne=\hbox{l}\advance\dimen\@ne-\wd\@ne
+ \leavevmode
+ \ifdim\dimen\@ne>\z@\kern-.1em\box\z@\kern.1em
+ \else\kern.1em\box\z@\kern-.1em\fi\allowhyphens}
+\ProvideTextCommand{\clqq}{T1}
+ {\kern.1em\quotedblbase\kern-.0158em\relax}
+\ProvideTextCommandDefault{\clqq}{\UseTextSymbol{OT1}\clqq}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\crqq}
+% For OT1, the CS closing quote is basically the same as
+% \cs{grqq}, only the \cs{textormath} macro is not used, because
+% as far as I know, \cs{grqq} does not work in math mode anyway.
+%
+% For T1, the character is slightly wider and shifted to the
+% right to match its OT1 counterpart.
+%
+% \begin{macrocode}
+\ProvideTextCommand{\crqq}{OT1}
+ {\save@sf@q{\nobreak\kern-.07em\textquotedblleft\kern.07em}}
+\ProvideTextCommand{\crqq}{T1}
+ {\save@sf@q{\nobreak\kern.06em\textquotedblleft\kern.024em}}
+\ProvideTextCommandDefault{\crqq}{\UseTextSymbol{OT1}\crqq}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\clq}
+% \begin{macro}{\crq}
+%
+% Single CS quotes are similar to double quotes (see the
+% discussion above).
+%
+% \begin{macrocode}
+\ProvideTextCommand{\clq}{OT1}
+ {\set@low@box{\textquoteright}\box\z@\kern.04em\allowhyphens}
+\ProvideTextCommand{\clq}{T1}
+ {\quotesinglbase\kern-.0428em\relax}
+\ProvideTextCommandDefault{\clq}{\UseTextSymbol{OT1}\clq}
+\ProvideTextCommand{\crq}{OT1}
+ {\save@sf@q{\nobreak\textquoteleft\kern.17em}}
+\ProvideTextCommand{\crq}{T1}
+ {\save@sf@q{\nobreak\textquoteleft\kern.17em}}
+\ProvideTextCommandDefault{\crq}{\UseTextSymbol{OT1}\crq}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\uv}
+% There are two versions of \cs{uv}. The older one opens a group
+% and uses \cs{aftergroup} to typeset the closing quotes. This
+% version allows using \cs{verb} inside the quotes, because the
+% enclosed text is not passed as an argument, but unfortunately
+% it breaks any kerning with the quotes. Although the kerning
+% with the opening quote could be fixed, the kerning with the
+% closing quote cannot.
+%
+% The newer version is defined as a command with one parameter.
+% It preserves kerning but since the quoted text is passed as an
+% argument, it cannot contain \cs{verb}.
+%
+% Decide which version of \cs{uv} should be used. For sake
+% of compatibility, we use the older version with plain \TeX{}
+% and the newer version with \LaTeXe.
+% \begin{macrocode}
+\ifx\cs@compat@plain\@undefined\else\let\cs@olduv=\relax\fi
+\ifx\cs@olduv\@undefined
+ \DeclareRobustCommand\uv[1]{{\leavevmode\clqq#1\crqq}}
+\else
+ \DeclareRobustCommand\uv{\bgroup\aftergroup\closequotes
+ \leavevmode\clqq\let\cs@next=}
+ \def\closequotes{\unskip\crqq\relax}
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs@wordlen}
+% Declare a counter to hold the length of the word after the
+% hyphen.
+%
+% \begin{macrocode}
+\newcount\cs@wordlen
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs@hyphen}
+% \begin{macro}{\cs@endash}
+% \begin{macro}{\cs@emdash}
+% Store the original hyphen in a macro. Ditto for the ligatures.
+%
+% \changes{slovak-3.1}{2006/10/07}{ensure correct catcode for the
+% saved hyphen}
+% \begin{macrocode}
+\begingroup\catcode`\-12
+\def\x{\endgroup
+ \def\cs@hyphen{-}
+ \def\cs@endash{--}
+ \def\cs@emdash{---}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cs@boxhyphen}
+% Provide a non-breakable hyphen to be used when a compound word
+% is too short to be split, i.e. the second part is shorter than
+% \cs{righthyphenmin}.
+%
+% \begin{macrocode}
+ \def\cs@boxhyphen{\hbox{-}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs@splithyphen}
+% The macro \cs{cs@splithyphen} inserts a split hyphen, while
+% allowing both parts of the compound word to be hyphenated at
+% other places too.
+%
+% \begin{macrocode}
+ \def\cs@splithyphen{\kern\z@
+ \discretionary{-}{\char\hyphenchar\the\font}{-}\nobreak\hskip\z@}
+}\x
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{-}
+% To minimize the effects of activating the hyphen character,
+% the active definition expands to the non-active character
+% in all cases where hyphenation cannot occur, i.e. if not
+% typesetting (check \cs{protect}), not in horizontal mode,
+% or in inner horizontal mode.
+%
+% \begin{macrocode}
+\initiate@active@char{-}
+\declare@shorthand{slovak}{-}{%
+ \ifx\protect\@typeset@protect
+ \ifhmode
+ \ifinner
+ \bbl@afterelse\bbl@afterelse\bbl@afterelse\cs@hyphen
+ \else
+ \bbl@afterfi\bbl@afterelse\bbl@afterelse\cs@firsthyphen
+ \fi
+ \else
+ \bbl@afterfi\bbl@afterelse\cs@hyphen
+ \fi
+ \else
+ \bbl@afterfi\cs@hyphen
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs@firsthyphen}
+% \begin{macro}{\cs@firsthyph@n}
+% \begin{macro}{\cs@secondhyphen}
+% \begin{macro}{\cs@secondhyph@n}
+% If we encounter a hyphen, check whether it is followed
+% by a second or a third hyphen and if so, insert the
+% corresponding ligature.
+%
+% If we don't find a hyphen, the token found will be placed
+% in \cs{cs@token} for further analysis, and it will also stay
+% in the input.
+%
+% \begin{macrocode}
+\begingroup\catcode`\-\active
+\def\x{\endgroup
+ \def\cs@firsthyphen{\futurelet\cs@token\cs@firsthyph@n}
+ \def\cs@firsthyph@n{%
+ \ifx -\cs@token
+ \bbl@afterelse\cs@secondhyphen
+ \else
+ \bbl@afterfi\cs@checkhyphen
+ \fi}
+ \def\cs@secondhyphen ##1{%
+ \futurelet\cs@token\cs@secondhyph@n}
+ \def\cs@secondhyph@n{%
+ \ifx -\cs@token
+ \bbl@afterelse\cs@emdash\@gobble
+ \else
+ \bbl@afterfi\cs@endash
+ \fi}
+}\x
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cs@checkhyphen}
+% Check that hyphenation is enabled, and if so, start analyzing
+% the rest of the word, i.e. initialize \cs{cs@word} and \cs{cs@wordlen}
+% and start processing input with \cs{cs@scanword}.
+%
+% \begin{macrocode}
+\def\cs@checkhyphen{%
+ \ifnum\expandafter\hyphenchar\the\font=`\-
+ \def\cs@word{}\cs@wordlen\z@
+ \bbl@afterelse\cs@scanword
+ \else
+ \cs@hyphen
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs@scanword}
+% \begin{macro}{\cs@continuescan}
+% \begin{macro}{\cs@gettoken}
+% \begin{macro}{\cs@gett@ken}
+% Each token is first analyzed with \cs{cs@scanword}, which expands
+% the token and passes the first token of the result to
+% \cs{cs@gett@ken}. If the expanded token is not identical to the
+% unexpanded one, presume that it might be expanded further and
+% pass it back to \cs{cs@scanword} until you get an unexpandable
+% token. Then analyze it in \cs{cs@examinetoken}.
+%
+% The \cs{cs@continuescan} macro does the same thing as
+% \cs{cs@scanword}, but it does not require the first token to be
+% in \cs{cs@token} already.
+%
+% \begin{macrocode}
+\def\cs@scanword{\let\cs@lasttoken= \cs@token\expandafter\cs@gettoken}
+\def\cs@continuescan{\let\cs@lasttoken\@undefined\expandafter\cs@gettoken}
+\def\cs@gettoken{\futurelet\cs@token\cs@gett@ken}
+\def\cs@gett@ken{%
+ \ifx\cs@token\cs@lasttoken \def\cs@next{\cs@examinetoken}%
+ \else \def\cs@next{\cs@scanword}%
+ \fi \cs@next}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{cs@examinetoken}
+% Examine the token in \cs{cs@token}:
+%
+% \begin{itemize}
+% \item
+% If it is a letter (catcode 11) or other (catcode 12), add it
+% to \cs{cs@word} with \cs{cs@addparam}.
+%
+% \item
+% If it is the \cs{char} primitive, add it with \cs{cs@expandchar}.
+%
+% \item
+% If the token starts or ends a group, ignore it with
+% \cs{cs@ignoretoken}.
+%
+% \item
+% Otherwise analyze the meaning of the token with
+% \cs{cs@checkchardef} to detect primitives defined with
+% \cs{chardef}.
+%
+% \end{itemize}
+%
+% \begin{macrocode}
+\def\cs@examinetoken{%
+ \ifcat A\cs@token
+ \def\cs@next{\cs@addparam}%
+ \else\ifcat 0\cs@token
+ \def\cs@next{\cs@addparam}%
+ \else\ifx\char\cs@token
+ \def\cs@next{\afterassignment\cs@expandchar\let\cs@token= }%
+ \else\ifx\bgroup\cs@token
+ \def\cs@next{\cs@ignoretoken\bgroup}%
+ \else\ifx\egroup\cs@token
+ \def\cs@next{\cs@ignoretoken\egroup}%
+ \else\ifx\begingroup\cs@token
+ \def\cs@next{\cs@ignoretoken\begingroup}%
+ \else\ifx\endgroup\cs@token
+ \def\cs@next{\cs@ignoretoken\endgroup}%
+ \else
+ \def\cs@next{\expandafter\expandafter\expandafter\cs@checkchardef
+ \expandafter\meaning\expandafter\cs@token\string\char\end}%
+ \fi\fi\fi\fi\fi\fi\fi\cs@next}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs@checkchardef}
+% Check the meaning of a token and if it is a primitive defined
+% with \cs{chardef}, pass it to \cs{\cs@examinechar} as if it were
+% a \cs{char} sequence. Otherwise, there are no more word characters,
+% so do the final actions in \cs{cs@nosplit}.
+%
+% \begin{macrocode}
+\expandafter\def\expandafter\cs@checkchardef
+ \expandafter#\expandafter1\string\char#2\end{%
+ \def\cs@token{#1}%
+ \ifx\cs@token\@empty
+ \def\cs@next{\afterassignment\cs@examinechar\let\cs@token= }%
+ \else
+ \def\cs@next{\cs@nosplit}%
+ \fi \cs@next}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs@ignoretoken}
+% Add a token to \cs{cs@word} but do not update the \cs{cs@wordlen}
+% counter. This is mainly useful for group starting and ending
+% primitives, which need to be preserved, but do not affect the word
+% boundary.
+%
+% \begin{macrocode}
+\def\cs@ignoretoken#1{%
+ \edef\cs@word{\cs@word#1}%
+ \afterassignment\cs@continuescan\let\cs@token= }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{cs@addparam}
+% Add a token to \cs{cs@word} and check its lccode. Note that
+% this macro can only be used for tokens which can be passed as
+% a parameter.
+%
+% \begin{macrocode}
+\def\cs@addparam#1{%
+ \edef\cs@word{\cs@word#1}%
+ \cs@checkcode{\lccode`#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs@expandchar}
+% \begin{macro}{\cs@examinechar}
+% Add a \cs{char} sequence to \cs{cs@word} and check its lccode.
+% The charcode is first parsed in \cs{cs@expandchar} and then the
+% resulting \cs{chardef}-defined sequence is analyzed in
+% \cs{cs@examinechar}.
+%
+% \begin{macrocode}
+\def\cs@expandchar{\afterassignment\cs@examinechar\chardef\cs@token=}
+\def\cs@examinechar{%
+ \edef\cs@word{\cs@word\char\the\cs@token\space}%
+ \cs@checkcode{\lccode\cs@token}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cs@checkcode}
+% Check the lccode of a character. If it is zero, it does not count
+% to the current word, so finish it with \cs{cs@nosplit}. Otherwise
+% update the \cs{cs@wordlen} counter and go on scanning the word
+% with \cs{cs@continuescan}. When enough characters are gathered in
+% \cs{cs@word} to allow word break, insert the split hyphen and
+% finish.
+%
+% \begin{macrocode}
+\def\cs@checkcode#1{%
+ \ifnum0=#1
+ \def\cs@next{\cs@nosplit}%
+ \else
+ \advance\cs@wordlen\@ne
+ \ifnum\righthyphenmin>\the\cs@wordlen
+ \def\cs@next{\cs@continuescan}%
+ \else
+ \cs@splithyphen
+ \def\cs@next{\cs@word}%
+ \fi
+ \fi \cs@next}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs@nosplit}
+% Insert a non-breakable hyphen followed by the saved word.
+%
+% \begin{macrocode}
+\def\cs@nosplit{\cs@boxhyphen\cs@word}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs@hyphen}
+% The \cs{minus} sequence can be used where the active hyphen
+% does not work, e.g. in arguments to \TeX{} primitives in outer
+% horizontal mode.
+%
+% \begin{macrocode}
+\let\minus\cs@hyphen
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\standardhyphens}
+% \begin{macro}{\splithyphens}
+% These macros control whether split hyphens are allowed in Czech
+% and/or Slovak texts. You may use them in any language, but the
+% split hyphen is only activated for Czech and Slovak.
+%
+% \changes{slovak-3.1}{2006/10/07}{activate with split hyphens and
+% deactivate with standard hyphens, not vice versa}
+% \begin{macrocode}
+\def\standardhyphens{\cs@splithyphensfalse\cs@deactivatehyphens}
+\def\splithyphens{\cs@splithyphenstrue\cs@activatehyphens}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cs@splitattr}
+% Now we declare the |split| language attribute. This is
+% similar to the |split| package option of cslatex, but it
+% only affects Slovak, not Czech.
+%
+% \changes{slovak-3.1}{2006/10/07}{attribute added}
+% \begin{macrocode}
+\def\cs@splitattr{\babel@save\ifcs@splithyphens\splithyphens}
+\bbl@declare@ttribute{slovak}{split}{%
+ \addto\extrasslovak{\cs@splitattr}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs@activatehyphens}
+% \begin{macro}{\cs@deactivatehyphens}
+% These macros are defined as \cs{relax} by default to prevent
+% activating/deactivating the hyphen character. They are redefined
+% when the language is switched to Czech/Slovak. At that moment
+% the hyphen is also activated if split hyphens were requested with
+% \cs{splithyphens}.
+%
+% When the language is de-activated, de-activate the hyphen and
+% restore the bogus definitions of these macros.
+%
+% \begin{macrocode}
+\let\cs@activatehyphens\relax
+\let\cs@deactivatehyphens\relax
+\expandafter\addto\csname extras\CurrentOption\endcsname{%
+ \def\cs@activatehyphens{\bbl@activate{-}}%
+ \def\cs@deactivatehyphens{\bbl@deactivate{-}}%
+ \ifcs@splithyphens\cs@activatehyphens\fi}
+\expandafter\addto\csname noextras\CurrentOption\endcsname{%
+ \cs@deactivatehyphens
+ \let\cs@activatehyphens\relax
+ \let\cs@deactivatehyphens\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cs@looseness}
+% \begin{macro}{\looseness}
+% One of the most common situations where an active hyphen will not
+% work properly is the \cs{looseness} primitive. Change its definition
+% so that it deactivates the hyphen if needed.
+%
+% \begin{macrocode}
+\let\cs@looseness\looseness
+\def\looseness{%
+ \ifcs@splithyphens
+ \cs@deactivatehyphens\afterassignment\cs@activatehyphens \fi
+ \cs@looseness}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cs@selectlanguage}
+% \begin{macro}{\cs@main@language}
+% Specifying the |nocaptions| option means that captions and dates
+% are not redefined by default, but they can be switched on later
+% with \cs{captionsslovak} and/or \cs{dateslovak}.
+%
+% We mimic this behavior by redefining \cs{selectlanguage}. This
+% macro is called once at the beginning of the document to set the
+% main language of the document. If this is \cs{cs@main@language},
+% it disables the macros for setting captions and date. In any
+% case, it restores the original definition of \cs{selectlanguage}
+% and expands it.
+%
+% The definition of \cs{selectlanguage} can be shared between Czech
+% and Slovak; the actual language is stored in \cs{cs@main@language}.
+%
+% \begin{macrocode}
+\ifx\cs@nocaptions\@undefined\else
+ \edef\cs@main@language{\CurrentOption}
+ \ifx\cs@origselect\@undefined
+ \let\cs@origselect=\selectlanguage
+ \def\selectlanguage{%
+ \let\selectlanguage\cs@origselect
+ \ifx\bbl@main@language\cs@main@language
+ \expandafter\cs@selectlanguage
+ \else
+ \expandafter\selectlanguage
+ \fi}
+ \def\cs@selectlanguage{%
+ \cs@tempdisable{captions}%
+ \cs@tempdisable{date}%
+ \selectlanguage}
+% \end{macrocode}
+%
+% \begin{macro}{\cs@tempdisable}
+% \cs{cs@tempdisable} disables a language setup macro temporarily,
+% i.e. the macro with the name of \meta{\#1}|\bbl@main@language|
+% just restores the original definition and purges the saved macro
+% from memory.
+%
+% \begin{macrocode}
+ \def\cs@tempdisable#1{%
+ \def\@tempa{cs@#1}%
+ \def\@tempb{#1\bbl@main@language}%
+ \expandafter\expandafter\expandafter\let
+ \expandafter \csname\expandafter \@tempa \expandafter\endcsname
+ \csname \@tempb \endcsname
+ \expandafter\edef\csname \@tempb \endcsname{%
+ \let \expandafter\noexpand \csname \@tempb \endcsname
+ \expandafter\noexpand \csname \@tempa \endcsname
+ \let \expandafter\noexpand\csname \@tempa \endcsname
+ \noexpand\@undefined}}
+% \end{macrocode}
+% \end{macro}
+%
+% These macros are not needed, once the initialization is over.
+%
+% \begin{macrocode}
+ \@onlypreamble\cs@main@language
+ \@onlypreamble\cs@origselect
+ \@onlypreamble\cs@selectlanguage
+ \@onlypreamble\cs@tempdisable
+ \fi
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The encoding of mathematical fonts should be changed to IL2. This
+% allows to use accented letter in some font families. Besides,
+% documents do not use CM fonts if there are equivalents in CS-fonts,
+% so there is no need to have both bitmaps of CM-font and CS-font.
+%
+% \cs{@font@warning} and \cs{@font@info} are temporarily redefined
+% to avoid annoying font warnings.
+%
+% \begin{macrocode}
+\ifx\cs@compat@plain\@undefined
+\ifx\cs@check@enc\@undefined\else
+ \def\cs@check@enc{
+ \ifx\encodingdefault\cs@iltw@
+ \let\cs@warn\@font@warning \let\@font@warning\@gobble
+ \let\cs@info\@font@info \let\@font@info\@gobble
+ \SetSymbolFont{operators}{normal}{\cs@iltw@}{cmr}{m}{n}
+ \SetSymbolFont{operators}{bold}{\cs@iltw@}{cmr}{bx}{n}
+ \SetMathAlphabet\mathbf{normal}{\cs@iltw@}{cmr}{bx}{n}
+ \SetMathAlphabet\mathit{normal}{\cs@iltw@}{cmr}{m}{it}
+ \SetMathAlphabet\mathrm{normal}{\cs@iltw@}{cmr}{m}{n}
+ \SetMathAlphabet\mathsf{normal}{\cs@iltw@}{cmss}{m}{n}
+ \SetMathAlphabet\mathtt{normal}{\cs@iltw@}{cmtt}{m}{n}
+ \SetMathAlphabet\mathbf{bold}{\cs@iltw@}{cmr}{bx}{n}
+ \SetMathAlphabet\mathit{bold}{\cs@iltw@}{cmr}{bx}{it}
+ \SetMathAlphabet\mathrm{bold}{\cs@iltw@}{cmr}{bx}{n}
+ \SetMathAlphabet\mathsf{bold}{\cs@iltw@}{cmss}{bx}{n}
+ \SetMathAlphabet\mathtt{bold}{\cs@iltw@}{cmtt}{m}{n}
+ \let\@font@warning\cs@warn \let\cs@warn\@undefined
+ \let\@font@info\cs@info \let\cs@info\@undefined
+ \fi
+ \let\cs@check@enc\@undefined}
+ \AtBeginDocument{\cs@check@enc}
+\fi
+\fi
+% \end{macrocode}
+%
+% \begin{macro}{cs@undoiltw@}
+%
+% The thing is that \LaTeXe{} core only supports the T1 encoding
+% and does not bother changing the uc/lc/sfcodes when encoding
+% is switched. :( However, the IL2 encoding \emph{does} change
+% these codes, so if encoding is switched back from IL2, we must
+% also undo the effect of this change to be compatible with
+% \LaTeXe. OK, this is not the right\textsuperscript{TM} solution
+% but it works. Cheers to Petr Ol\v s\'ak.
+%
+% \begin{macrocode}
+\def\cs@undoiltw@{%
+ \uccode158=208 \lccode158=158 \sfcode158=1000
+ \sfcode159=1000
+ \uccode165=133 \lccode165=165 \sfcode165=1000
+ \uccode169=137 \lccode169=169 \sfcode169=1000
+ \uccode171=139 \lccode171=171 \sfcode171=1000
+ \uccode174=142 \lccode174=174 \sfcode174=1000
+ \uccode181=149
+ \uccode185=153
+ \uccode187=155
+ \uccode190=0 \lccode190=0
+ \uccode254=222 \lccode254=254 \sfcode254=1000
+ \uccode255=223 \lccode255=255 \sfcode255=1000}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{@@enc@update}
+%
+% Redefine the \LaTeXe{} internal function \cs{@@enc@update} to
+% change the encodings correctly.
+%
+% \begin{macrocode}
+\ifx\cs@enc@update\@undefined
+\ifx\@@enc@update\@undefined\else
+ \let\cs@enc@update\@@enc@update
+ \def\@@enc@update{\ifx\cf@encoding\cs@iltw@\cs@undoiltw@\fi
+ \cs@enc@update
+ \expandafter\ifnum\csname l@\languagename\endcsname=\the\language
+ \expandafter\ifx
+ \csname l@\languagename:\f@encoding\endcsname\relax
+ \else
+ \expandafter\expandafter\expandafter\let
+ \expandafter\csname
+ \expandafter l\expandafter @\expandafter\languagename
+ \expandafter\endcsname\csname l@\languagename:\f@encoding\endcsname
+ \fi
+ \language=\csname l@\languagename\endcsname\relax
+ \fi}
+\fi\fi
% \end{macrocode}
+% \end{macro}
%
% The macro |\ldf@finish| takes care of looking for a
% configuration file, setting the main language to be switched on
@@ -392,7 +1285,7 @@
% \texttt{@} to its original value.
% \changes{slovak-1.2i}{1996/11/03}{Now use \cs{ldf@finish} to wrap up}
% \begin{macrocode}
-\ldf@finish{slovak}
+\ldf@finish\CurrentOption
%</code>
% \end{macrocode}
%