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