%
%    Czech style for LaTeX2e (JZ)
%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\DeclareOption{KOI}{\fontencoding{KOI}}
\DeclareOption{T1}{\fontencoding{T1}}
\DeclareOption{IL2}{\fontencoding{IL2}}
\DeclareOption{nosplit}{\standardhyphens}
\DeclareOption{split}{\splithyphens}
\newif\ifcapti@nsunchanged
\DeclareOption{nocaptions}{\capti@nsunchangedtrue}
\newif\ifquote@handling
\DeclareOption{cstex}{\quote@handlingtrue}
\newdimen\uv@z@vky
\def\@bq{\leavevmode\setbox0=\hbox{%
\setbox0=\hbox{\kern-.1ex''\kern.1ex}%
\setbox1=\hbox{\kern-.1ex''\/\kern.1ex}%
\uv@z@vky=\wd1\advance\uv@z@vky by -\wd0%
\kern-\uv@z@vky\kern.1ex\raise-1.3ex\box0\kern-.1ex%
\kern\uv@z@vky}\ht0=0pt\relax\dp0=0pt\box0\nobreak\hskip0pt%
\nobreak}
\def\@eq{\kern-.1ex``\kern.1ex}
\AtBeginDocument{\czech}          %% Select hyphenation
\frenchspacing  %% this should be set for Czech
\ProcessOptions
\ifcapti@nsunchanged\else
\def\abstractname{Abstrakt}
\def\appendixname{P\v r\'iloha}
\def\bibname{Literatura}
\def\ccname{co}
\def\chaptername{Kapitola}
\def\contentsname{Obsah}
\def\enclname{P\v r\'il.}
\def\figurename{Obr\'azek}
\def\headpagename{Strana}
\def\headtoname{Komu}
\def\indexname{Rejst\v r\'ik}
\def\listfigurename{Seznam obr\'azk\r u}
\def\listtablename{Seznam tabulek}
\def\partname{\v C\'ast}
\def\prefacename{P\v redmluva}
\def\seename{viz}
\def\alsoseename{srvn.}
\def\refname{Odkazy}
\def\tablename{Tabulka}
\if\today\undefined\else\def\today{\number\day. \ifcase\month\or
  ledna\or \'unora\or b\v rezna\or dubna\or kv\v etna\or \v cervna\or
  \v cervence\or srpna\or z\'a\v r\'i\or \v r\'ijna\or listopadu\or prosince\fi
  \space\number\year}
\fi\fi
%%
%% update for LaTeX2e as of 1994/12/01
\DeclareTextCommandDefault{\bq}{\@bq}
\DeclareTextCommandDefault{\eq}{{\edef\@SF{\spacefactor\the\spacefactor}%
                                 \@eq\@SF\relax}}
%%
%% partial compatibility with `czech.sty' from cstex (by O.Ulrych)
\def\clqq{\bq}
\def\crqq{\eq}
\def\uv{\bgroup\aftergroup\closequotes\leavevmode\clqq\let\next=}
     \def\closequotes{\unskip\crqq\relax}
% After \cstieon the active character  ~  in math mode is not replaced by space
\def\cstieon{\def~{\ifmmode\else\penalty\@M\ \fi}}
\def\cstieoff{\def~{\penalty\@M \ }}
%
\ifquote@handling
\def\set@low@box#1{\setbox\tw@\hbox{,}\setbox\z@\hbox{#1}\dimen\z@\ht\z@
     \advance\dimen\z@ -\ht\tw@
     \setbox\z@\hbox{\lower\dimen\z@ \box\z@}\ht\z@\ht\tw@ \dp\z@\dp\tw@ }
\def\clq{\leavevmode
     \set@low@box{\char'047 }\box\z@\kern.04em\penalty\@M \hskip\z@skip}
\def\crq{{\edef\@SF{\spacefactor\the\spacefactor}%
      \penalty\@M \hskip\z@skip\char'140 \kern.17em\@SF\relax}}
{\catcode`\'=\active
\gdef\csprimeson{\catcode96=\active \catcode39=\active
     \def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else\let\nxt\egroup\fi \nxt}%
   }
}
\let\csprime\csprimeson
\def\csprimesoff{\catcode96=12 \catcode39=12
     \def\pr@m@s{\ifx'\next\let\nxt\pr@@@s \else\let\nxt\egroup\fi \nxt}%
   }
{\csprimeson                      % for missing definitions see plain.tex
\gdef'{\ifmmode\let\next\mathprim@\else\let\next\textprim@\fi\next}%
\gdef\mathprim@{^\bgroup\prim@s}%
\gdef\textprim@{\futurelet\nxt\rightprim@}%
\gdef\rightprim@{\ifx'\nxt\let\next\douvr@\else\let\next\crq\fi\next}%
\gdef`{\futurelet\nxt\leftprim@}%
\gdef\leftprim@{\ifx`\nxt\let\next\douvl@\else\let\next\clq\fi\next}
}
\def\douvr@{\@crqq\let\next= }%
\def\douvl@{\@clqq\let\next= }%
\fi
\endinput

