Debian Codegraph @

texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf

raw
1 % Language definition file (part of polyglossia v2.10 -- 2026/04/18)
2 %
3 \ProvidesFile{gloss-slovak.ldf}[polyglossia: module for Slovak]
4
5 \PolyglossiaSetup{slovak}{
6 bcp47=sk,
7 bcp47-language=sk,
8 bcp47-script=Latn,
9 hyphennames={slovak},
10 hyphenmins={2,2},
11 langtag=SKY,
12 }
13
14 % BCP-47 compliant aliases
15 \setlanguagealias*{slovak}{sk}
16
17 \ifluatex
18 \RequirePackage{luavlna}
19 \fi
20
21 \DeclareKeys[polyglossia/gloss/slovak]
22 {
23 babelshorthands.if = slovak@babelshorthands,
24 babelshorthands.default:n = true,
25 splithyphens.if = slovak@splithyphens,
26 splithyphens.default:n = true,
27 vlna.if = slovak@vlna,
28 vlna.default:n = true,
29 }
30
31 \ifsystem@babelshorthands
32 \SetGlossOptions{slovak}{babelshorthands=true}
33 % Register default options
34 \InitializeGlossOptions{slovak}{babelshorthands=true,splithyphens=true,vlna=true}
35 \else
36 \SetGlossOptions{slovak}{babelshorthands=false}
37 % Register default options
38 \InitializeGlossOptions{slovak}{babelshorthands=false,splithyphens=true,vlna=true}
39 \fi
40
41 \InitializeBabelShorthands
42
43 \let\xpg@hyphen@char-
44 \def\slovak@@splhyphen#1{%
45 \def\slovak@sh@tmp{%
46 \ifx\slovak@sh@next\xpg@hyphen@char#1%
47 \else\expandafter\slovak@@@splhyphen{#1}\fi%
48 }%
49 \futurelet\slovak@sh@next\slovak@sh@tmp%
50 }
51
52 \def\slovak@@@splhyphen#1{%
53 \ifnum\hyphenchar \font>0%
54 \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}%
55 \nobreak\hskip\z@%
56 \else%
57 #1%
58 \fi%
59 }
60
61 \def\slovak@splhyphen{%
62 \slovak@@splhyphen{-}%
63 }
64
65 \def\slovak@shorthands{%
66 \xpg@activate@shorthands%
67 \def\language@group{slovak}%
68 \declare@shorthand{slovak}{"=}{\slovak@splhyphen}%
69 \declare@shorthand{slovak}{""}{\xpg@invisible@break}%
70 \declare@shorthand{slovak}{"~}{\xpg@nobreak@hyphen}%
71 \declare@shorthand{slovak}{"-}{\xpg@add@hyphenation@point}%
72 \declare@shorthand{slovak}{"|}{\xpg@ligature@break}%
73 \declare@shorthand{slovak}{"/}{\xpg@breakable@slash}%
74 \declare@shorthand{slovak}{"`}{„}%
75 \declare@shorthand{slovak}{"'}{“}%
76 \declare@shorthand{slovak}{"<}{«}%
77 \declare@shorthand{slovak}{">}{»}%
78 }
79
80 \def\noslovak@shorthands{%
81 \xpg@deactivate@shorthands%
82 }
83
84 \ifxetex
85 % splithyphens
86 \newXeTeXintercharclass\slovak@hyphen % -
87 % vlna
88 \newXeTeXintercharclass\slovak@openpunctuation
89 \newXeTeXintercharclass\slovak@nonsyllabicpreposition
90 \ifdefined\e@alloc@intercharclass@top
91 \chardef\slovak@boundary=\e@alloc@intercharclass@top
92 \else
93 \ifdefined\XeTeXinterwordspaceshaping
94 \chardef\slovak@boundary=4095 %
95 \def\newXeTeXintercharclass{%
96 \e@alloc\XeTeXcharclass\chardef
97 \xe@alloc@intercharclass\m@ne\@ucharclass@boundary}%
98 \else
99 \chardef\slovak@boundary=255
100 \fi
101 \fi
102 \fi
103
104 \def\slovak@hyphens{%
105 \ifluatex
106 \AfterPreamble{\enablesplithyphens{slovak}}%
107 \else
108 \XeTeXinterchartokenstate=1
109 \XeTeXcharclass `\- \slovak@hyphen
110 \XeTeXinterchartoks \z@ \slovak@hyphen = {\slovak@@splhyphen}% "-" -> "\slovak@@splhyphen-"
111 % necessary if used together with vlna:
112 \XeTeXinterchartoks \slovak@nonsyllabicpreposition \slovak@hyphen = {\slovak@@splhyphen}% "-" -> "\slovak@@splhyphen-"
113 \fi%
114 }
115
116 \def\noslovak@hyphens{%
117 \ifluatex
118 \AfterPreamble{\disablesplithyphens{slovak}}%
119 \else
120 \XeTeXcharclass `\- \z@
121 \fi%
122 }
123
124 % Add nonbreakable space after single-letter word to
125 % prevent them to land at the end of a line
126 % vlna code taken and adapted from xevlna.sty
127 \ifxetex
128 \def\slovak@nointerchartoks{\let\slovak@interchartoks\slovak@PreCSpreposition}%
129 \def\slovak@PreCSpreposition{%
130 \def\next{}%
131 \ifnum\catcode`\ =10 % nothing will be done in verbatim
132 \ifmmode % nothing in math
133 \else
134 \let\slovak@interchartoks\slovak@nointerchartoks
135 \let\next\slovak@ExamineCSpreposition
136 \fi\fi
137 \next%
138 }%
139 \def\slovak@ExamineCSpreposition #1{#1\futurelet\next\slovak@ProcessCSpreposition}%
140 \def\slovak@ProcessCSpreposition{\ifx\next\slovak@XeTeXspace\nobreak\fi}%
141 \futurelet\slovak@XeTeXspace{ }\slovak@nointerchartoks
142 \fi
143
144 \def\slovak@vlna{%
145 \ifluatex
146 \preventsingleon
147 \else
148 % Code taken and adapted from xevlna.sty
149 \XeTeXinterchartokenstate=1
150 \XeTeXcharclass `\( \slovak@openpunctuation
151 \XeTeXcharclass `\[ \slovak@openpunctuation
152 \XeTeXcharclass `\„ \slovak@openpunctuation
153 \XeTeXcharclass `\» \slovak@openpunctuation
154 \XeTeXcharclass `\K \slovak@nonsyllabicpreposition
155 \XeTeXcharclass `\k \slovak@nonsyllabicpreposition
156 \XeTeXcharclass `\S \slovak@nonsyllabicpreposition
157 \XeTeXcharclass `\s \slovak@nonsyllabicpreposition
158 \XeTeXcharclass `\V \slovak@nonsyllabicpreposition
159 \XeTeXcharclass `\v \slovak@nonsyllabicpreposition
160 \XeTeXcharclass `\Z \slovak@nonsyllabicpreposition
161 \XeTeXcharclass `\z \slovak@nonsyllabicpreposition
162 \XeTeXcharclass `\O \slovak@nonsyllabicpreposition
163 \XeTeXcharclass `\o \slovak@nonsyllabicpreposition
164 \XeTeXcharclass `\U \slovak@nonsyllabicpreposition
165 \XeTeXcharclass `\u \slovak@nonsyllabicpreposition
166 \XeTeXcharclass `\A \slovak@nonsyllabicpreposition
167 \XeTeXcharclass `\a \slovak@nonsyllabicpreposition
168 \XeTeXcharclass `\I \slovak@nonsyllabicpreposition
169 \XeTeXcharclass `\i \slovak@nonsyllabicpreposition
170 \XeTeXinterchartoks \slovak@boundary \slovak@nonsyllabicpreposition {\slovak@interchartoks}%
171 \XeTeXinterchartoks \slovak@openpunctuation \slovak@nonsyllabicpreposition {\slovak@interchartoks}%
172 \fi
173 }
174
175 \def\noslovak@vlna{%
176 \ifluatex
177 \preventsingleoff
178 \else
179 \XeTeXcharclass`\(\z@
180 \XeTeXcharclass`\[\z@
181 \XeTeXcharclass`\„\z@
182 \XeTeXcharclass`\»\z@
183 \XeTeXcharclass`\K\z@
184 \XeTeXcharclass`\k\z@
185 \XeTeXcharclass`\S\z@
186 \XeTeXcharclass`\s\z@
187 \XeTeXcharclass`\V\z@
188 \XeTeXcharclass`\v\z@
189 \XeTeXcharclass`\Z\z@
190 \XeTeXcharclass`\z\z@
191 \XeTeXcharclass`\O\z@
192 \XeTeXcharclass`\o\z@
193 \XeTeXcharclass`\U\z@
194 \XeTeXcharclass`\u\z@
195 \XeTeXcharclass`\A\z@
196 \XeTeXcharclass`\a\z@
197 \XeTeXcharclass`\I\z@
198 \XeTeXcharclass`\i\z@
199 \fi
200 }
201
202
203 \def\captionsslovak{%
204 \def\refname{Referencie}%
205 \def\abstractname{Abstrakt}%
206 \def\bibname{Literatúra}%
207 \def\prefacename{Úvod}%
208 \def\chaptername{Kapitola}%
209 \def\appendixname{Dodatok}%
210 \def\contentsname{Obsah}%
211 \def\listfigurename{Zoznam obrázkov}%
212 \def\listtablename{Zoznam tabuliek}%
213 \def\indexname{Register}%
214 \def\figurename{Obrázok}%
215 \def\tablename{Tabuľka}%
216 %\def\thepart{}%
217 \def\partname{Časť}%
218 \def\pagename{Strana}%
219 \def\seename{viď}%
220 \def\alsoname{viď tiež}%
221 \def\enclname{Prílohy}%
222 \def\ccname{cc.}%
223 \def\headtoname{Pre}% was komu
224 \def\proofname{Dôkaz}%
225 \def\glossaryname{Slovník}%
226 }
227
228 \def\dateslovak{%
229 \def\today{\number\day.~\ifcase\month\or
230 januára\or februára\or marca\or apríla\or mája\or
231 júna\or júla\or augusta\or septembra\or októbra\or
232 novembra\or decembra\fi
233 \space \number\year}%
234 }
235
236 \def\noextras@slovak{%
237 \ifslovak@babelshorthands\noslovak@shorthands\fi%
238 \noslovak@hyphens%
239 \noslovak@vlna%
240 \ifxetex\XeTeXinterchartokenstate=0\fi%
241 }
242
243 \def\blockextras@slovak{%
244 \ifslovak@babelshorthands\slovak@shorthands\else\noslovak@shorthands\fi%
245 \ifslovak@vlna\slovak@vlna\else\noslovak@vlna\fi%
246 \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyphens\fi%
247 }
248
249 \def\inlineextras@slovak{%
250 \ifslovak@babelshorthands\slovak@shorthands\else\noslovak@shorthands\fi%
251 \ifslovak@vlna\slovak@vlna\else\noslovak@vlna\fi%
252 \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyphens\fi%
253 }
254
255 \def\nestedextras@slovak{%
256 \ifluatex%
257 \ifslovak@vlna\slovak@vlna\else\noslovak@vlna\fi%
258 \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyphens\fi%
259 \fi%
260 }
261
262 \endinput