summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/texlive/texlive-sr/texlive-sr.sty
blob: d36ddff8c92da3b53327d8e8008ebbd6420f55ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
\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}

% 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