\def\Status{1}

% Settings specific for Serbian translation and its XeLaTeX code
% ---------------------------------------------------------------------

% Extra packages needed for XeLaTeX
\RequirePackage{polyglossia}
% Import the original tex-live.sty from texlive-en; this must be done
%   after fontspec (fontspec is loaded by polyglossia). xltxtra loads
%   xunicode:
\RequirePackage{tex-live}
\RequirePackage{xltxtra}
%   ... and:
\RequirePackage[center,it,small]{caption}
\RequirePackage{relsize}
\RequirePackage{fancyhdr}
\RequirePackage{titling}

% Load the default and all other languages.
%   For the sake of simplicity, we enclose non-Serbian text in
%   appropriate \textLL{} only if we need different hyphenation.
\setdefaultlanguage[script=Cyrillic]{serbian}
\setotherlanguage{english}
\setotherlanguage{russian}
\setotherlanguage{german}
\setotherlanguage{french}
\setotherlanguage{italian}
\setotherlanguage{polish}
\setotherlanguage{czech}
\setotherlanguage{slovak}
\setotherlanguage{dutch}
\setotherlanguage{finnish}

% OTF fonts that we use; cf. README-SR.txt.
%   (We use only tex-text for the sake of simplicity.)
\setmainfont[RawFeature={+ss11,+ss12},Mapping=tex-text]{Old Standard}
\newfontfamily\serbianfont[RawFeature={+ss11,+ss12},%
  Mapping=tex-text]{Old Standard}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text Light}

% A bit more tuning:
% "Windows" is a very frequent word so let's get it properly
%   hyphenated. The same for Kpathsea:
\newcommand{\Windows}{\textenglish{Windows}}
\def\KPS{\textenglish{Kpathsea}}
% We need different quotes for Serbian.
\renewcommand{\samp}[1]{\char"201E\texttt{#1}\char"201C{}}
% There is no slanted Old Standard, so use XeTeX's fake slant feature.
\newfontfamily\slantfont[FakeSlant=.2]{Old Standard}
\newfontfamily\cmutt{CMU Typewriter Text}
\renewcommand{\var}[1]{{\slantfont#1}}
\renewcommand{\textsl}[1]{{\slantfont#1}}
\def\Ucom#1{{\cmutt\bfseries#1}}
\renewcommand{\BibTeX}{B{\smaller IB}\TeX{}}
% Redefine running headers.
\pagestyle{fancyplain}
\fancyhf{}
\renewcommand{\sectionmark}[1]{\markboth{#1}{}}
\lhead{\fancyplain{}{{\serbianfont\emph{\MakeUppercase\leftmark}}}}
\rhead{\fancyplain{}{{\serbianfont\thepage}}}
\setlength{\headheight}{12.22003pt}
\renewcommand{\headrulewidth}{0pt}

% Finally:
\widowpenalty=4000
\clubpenalty=4000
\frenchspacing
\flushbottom

\endinput
