summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/polyglossia/gloss-serbian.ldf
blob: 6d8d60624d501f9245f27909ab6ea08cbad551fb (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
\ProvidesFile{gloss-serbian.ldf}[polyglossia: module for serbian]
\makeatletter

%TODO eventually there will be patterns for Serbian-Latin as well as Serbian-Cyrillic
\ifx\l@serbian\@undefined%
   \xpg@nopatterns{Serbian}%
   \adddialect\l@serbian0%
\fi

\newif\if@serbian@cyr
\def\tmp@cyrillic{cyrillic}
\define@key{serbian}{script}[cyrillic]{%
	\def\@tmpa{#1}%
	\ifx\@tmpa\tmp@cyrillic\@serbian@cyrtrue\else%
	  \@serbian@cyrfalse\fi%
	\fi}

\setkeys{serbian}{script}

\def\captionsserbian{%
   \if@serbian@cyr\captionsserbian@cyr\else\captionsserbian@lat\fi%
   }

\def\dateserbian{%
   \if@serbian@cyr\dateserbian@cyr\else\dateserbian@lat\fi%
   }

\def\captionsserbian@lat{%
   \def\refname{\textserbian{Literatura}}%
   \def\abstractname{\textserbian{Sažetak}}%
   \def\bibname{\textserbian{Bibliografija}}%
   \def\prefacename{\textserbian{Predgovor}}%
   \def\chaptername{\textserbian{Glava}}%
   \def\appendixname{\textserbian{Dodatak}}%
   \def\contentsname{\textserbian{Sadržaj}}%
   \def\listfigurename{\textserbian{Slike}}%
   \def\listtablename{\textserbian{Tabele}}%
   \def\indexname{\textserbian{Indeks}}%
   \def\figurename{\textserbian{Slika}}%
   \def\tablename{\textserbian{Tabela}}%
   \def\partname{\textserbian{Deo}}%
   \def\pagename{\textserbian{Strana}}%
   \def\seename{\textserbian{Vidi}}%
   \def\alsoname{\textserbian{Vidi takođe}}%
   \def\enclname{\textserbian{Prilozi}}%
   \def\ccname{\textserbian{Kopije}}%
   \def\headtoname{\textserbian{Prima}}%
   \def\proofname{\textserbian{Dokaz}}%
   \def\glossaryname{\textserbian{Glosar}}% <-- CHECK
   }
\def\dateserbian@lat{%   
   \def\today{\textserbian{\number\day .~\ifcase\month\or
    januar\or februar\or mart\or april\or maj\or
    juni\or juli\or avgust\or septembar\or oktobar\or novembar\or
    decembar\fi \space \number\year}}%
    }

%%%TODO ASK SOMEONE TO CHECK THESE!
\def\captionsserbian@cyr{%
   \def\refname{\textserbian{Литература}}%
   \def\abstractname{\textserbian{Сажетак}}%
   \def\bibname{\textserbian{Библиографија}}%
   \def\prefacename{\textserbian{Предговор}}%
   \def\chaptername{\textserbian{Глава}}%
   \def\appendixname{\textserbian{Додатак}}%
   \def\contentsname{\textserbian{Садржај}}%
   \def\listfigurename{\textserbian{Слике}}%
   \def\listtablename{\textserbian{Табеле}}%
   \def\indexname{\textserbian{Индекс}}%
   \def\figurename{\textserbian{Слика}}%
   \def\tablename{\textserbian{Табела}}%
   %\def\thepart{\textserbian{}}%
   \def\partname{\textserbian{Део}}%
   \def\pagename{\textserbian{Страна}}%
   \def\seename{\textserbian{Види}}%
   \def\alsoname{\textserbian{Види такође}}%
   \def\enclname{\textserbian{Прилоzи}}%
   \def\ccname{\textserbian{Копије}}%
   \def\headtoname{\textserbian{Прима}}%
   \def\proofname{\textserbian{Докаz}}%
   \def\glossaryname{\textserbian{Глосар}}% <-- CHECK
   }
\def\dateserbian@cyr{%
   \def\today{\textserbian{\number\day .~\ifcase\month\or
    јануар\or фебруар\or март\or април\or мај\or
    јуни\or јули\or август\or септембар\or октобар\or нобембар\or
    децембар\fi \space \number\year}}%
    }

\def\serbian@font@cyr{%
\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
\@ifundefined{serbianfont}{%
      \@ifundefined{cyrillicfont}{%
        \zf@check@ot@script{cyrl}%
	\if@tempswa%
	  \addfontfeature{Script=Cyrillic}%
	\else%
	  \PackageError{polyglossia}{^^J
	  The current font does not contain the Cyrillic script!^^J
	  Please define \string\cyrillicfont\space or \string\serbianfont\space with \string\newfontfamily}%
	\fi%
	\zf@check@ot@lang{SRB}%
	\if@tempswa\addfontfeature{Language=Serbian}\fi%
	}%
        {\cyrillicfont%
         \zf@check@ot@lang{SRB}%
	 \if@tempswa\addfontfeature{Language=Serbian}\fi%
        }%
     }% 
     {\serbianfont}%
}

\def\serbian@font@lat{%
  \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
   \@ifundefined{serbianfontlatin}{%
     \zf@check@ot@lang{SRB}%
     \if@tempswa\addfontfeature{Language=Serbian}\fi}%
    {\serbianfontlatin}%
}

\def\serbian@font{%
   \if@serbian@cyr\serbian@font@cyr\else\serbian@font@lat\fi}

%TODO when available load latin hyphenation patterns as well!
\def\serbian@language{\protect\language=\l@serbian}

\setlocalhyphenmins{serbian}{2}{2}%

\def\noextras@serbian{%
   \nofrench@indent%
   }

\def\blockextras@serbian{%
   \french@indent%
   }
\endinput
% TODO ? stuff from babel

\def\sh{\mathop{\operator@font sh}\nolimits} % same as \sinh
\def\ch{\mathop{\operator@font ch}\nolimits} % same as \cosh
\def\th{\mathop{\operator@font th}\nolimits} % same as \tanh
\def\cth{\mathop{\operator@font cth}\nolimits} % same as \coth
\def\arsh{\mathop{\operator@font arsh}\nolimits}
\def\arch{\mathop{\operator@font arch}\nolimits}
\def\arth{\mathop{\operator@font arth}\nolimits}
\def\arcth{\mathop{\operator@font arcth}\nolimits}
\def\tg{\mathop{\operator@font tg}\nolimits} % same as \tan
\def\ctg{\mathop{\operator@font ctg}\nolimits} % same as \cot
\def\arctg{\mathop{\operator@font arctg}\nolimits} % same as \arctan
\def\arcctg{\mathop{\operator@font arcctg}\nolimits}
\def\Prob{\mathop{\mathsf P\hskip0pt}\nolimits}
\def\Expect{\mathop{\mathsf E\hskip0pt}\nolimits}
\def\Variance{\mathop{\mathsf D\hskip0pt}\nolimits}