summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf193
1 files changed, 191 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf
index b6fc910e350..417e43ba52b 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-slovak.ldf
@@ -7,6 +7,176 @@
fontsetup=true,
}
+\ifluatex
+ \RequirePackage{luavlna}
+\fi
+
+\define@boolkey{slovak}[slovak@]{babelshorthands}[true]{}
+
+\define@boolkey{slovak}[slovak@]{splithyphens}[true]{}
+
+\define@boolkey{slovak}[slovak@]{vlna}[true]{}
+
+\setkeys{slovak}{splithyphens,vlna}
+
+\ifsystem@babelshorthands
+ \setkeys{slovak}{babelshorthands=true}
+\else
+ \setkeys{slovak}{babelshorthands=false}
+\fi
+
+\ifcsundef{initiate@active@char}{%
+ \input{babelsh.def}%
+ \initiate@active@char{"}%
+ \shorthandoff{"}%
+}{}
+
+\def\slovak@@splhyphen#1{%
+ \kern\z@\discretionary{-}{\char\hyphenchar\the\font}{#1}%
+ \nobreak\hskip\z@%
+}
+
+\def\slovak@splhyphen{%
+ \slovak@@splhyphen{-}%
+}
+
+\def\slovak@shorthands{%
+ \bbl@activate{"}%
+ \def\language@group{slovak}%
+ \declare@shorthand{slovak}{"=}{\slovak@splhyphen}%
+ \declare@shorthand{slovak}{""}{\hskip\z@skip}%
+ \declare@shorthand{slovak}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
+ \declare@shorthand{slovak}{"-}{\nobreak\-\bbl@allowhyphens}%
+ \declare@shorthand{slovak}{"|}{%
+ \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
+ \bbl@allowhyphens}{}%
+ }%
+ \declare@shorthand{slovak}{"/}{\textormath
+ {\bbl@allowhyphens\discretionary{/}{}{/}\bbl@allowhyphens}{}}%
+ \declare@shorthand{slovak}{"`}{„}%
+ \declare@shorthand{slovak}{"'}{“}%
+ \declare@shorthand{slovak}{"<}{«}%
+ \declare@shorthand{slovak}{">}{»}%
+}
+
+\def\noslovak@shorthands{%
+ \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
+}
+
+\ifxetex
+ % splithyphens
+ \newXeTeXintercharclass\slovak@hyphen % -
+ % vlna
+ \newXeTeXintercharclass\slovak@openpunctuation
+ \newXeTeXintercharclass\slovak@nonsyllabicpreposition
+ \ifdefined\e@alloc@intercharclass@top
+ \chardef\slovak@boundary=\e@alloc@intercharclass@top
+ \else
+ \ifdefined\XeTeXinterwordspaceshaping
+ \chardef\slovak@boundary=4095 %
+ \def\newXeTeXintercharclass{%
+ \e@alloc\XeTeXcharclass\chardef
+ \xe@alloc@intercharclass\m@ne\@ucharclass@boundary}
+ \else
+ \chardef\slovak@boundary=255
+ \fi
+ \fi
+\fi
+
+\def\slovak@hyphens{%
+ \ifluatex
+ \AfterPreamble{\enablesplithyphens{slovak}}%
+ \else
+ \XeTeXinterchartokenstate=1
+ \XeTeXcharclass `\- \slovak@hyphen
+ \XeTeXinterchartoks \z@ \slovak@hyphen = {\slovak@@splhyphen}% "-" -> "\slovak@@splhyphen-"
+ % necessary if used together with vlna:
+ \XeTeXinterchartoks \slovak@nonsyllabicpreposition \slovak@hyphen = {\slovak@@splhyphen}% "-" -> "\slovak@@splhyphen-"
+ \fi%
+}
+
+\def\noslovak@hyphens{%
+ \ifluatex
+ \AfterPreamble{\disablesplithyphens{slovak}}%
+ \else
+ \XeTeXcharclass `\- \z@
+ \fi%
+}
+
+% Add nonbreakable space after single-letter word to
+% prevent them to land at the end of a line
+\def\slovak@vlna{%
+ \ifluatex
+ \preventsingleon
+ \else
+ % Code taken and adapted from xevlna.sty
+ \XeTeXinterchartokenstate=1
+ \XeTeXcharclass `\( \slovak@openpunctuation
+ \XeTeXcharclass `\[ \slovak@openpunctuation
+ \XeTeXcharclass `\„ \slovak@openpunctuation
+ \XeTeXcharclass `\» \slovak@openpunctuation
+ \XeTeXcharclass `\K \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\k \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\S \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\s \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\V \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\v \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\Z \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\z \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\O \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\o \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\U \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\u \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\A \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\a \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\I \slovak@nonsyllabicpreposition
+ \XeTeXcharclass `\i \slovak@nonsyllabicpreposition
+ \XeTeXinterchartoks \slovak@boundary \slovak@nonsyllabicpreposition {\slovak@interchartoks}
+ \XeTeXinterchartoks \slovak@openpunctuation \slovak@nonsyllabicpreposition {\slovak@interchartoks}
+ \def\slovak@nointerchartoks{\let\slovak@interchartoks\slovak@PreCSpreposition}
+ \def\slovak@PreCSpreposition{\def\next{}%
+ \ifnum\catcode`\ =10 % nothing will be done in verbatim
+ \ifmmode % nothing in math
+ \else
+ \let\slovak@interchartoks\slovak@nointerchartoks
+ \let\next\slovak@ExamineCSpreposition
+ \fi \fi
+ \next%
+ }
+ \def\slovak@ExamineCSpreposition ##1{##1\futurelet\next\slovak@ProcessCSpreposition}
+ \def\slovak@ProcessCSpreposition{\ifx\next\slovak@XeTeXspace\nobreak\fi}
+ \futurelet\slovak@XeTeXspace{ }\slovak@nointerchartoks
+ \fi
+}
+
+\def\noslovak@vlna{%
+ \ifluatex
+ \preventsingleoff
+ \else
+ \XeTeXcharclass`\(\z@
+ \XeTeXcharclass`\[\z@
+ \XeTeXcharclass`\„\z@
+ \XeTeXcharclass`\»\z@
+ \XeTeXcharclass`\K\z@
+ \XeTeXcharclass`\k\z@
+ \XeTeXcharclass`\S\z@
+ \XeTeXcharclass`\s\z@
+ \XeTeXcharclass`\V\z@
+ \XeTeXcharclass`\v\z@
+ \XeTeXcharclass`\Z\z@
+ \XeTeXcharclass`\z\z@
+ \XeTeXcharclass`\O\z@
+ \XeTeXcharclass`\o\z@
+ \XeTeXcharclass`\U\z@
+ \XeTeXcharclass`\u\z@
+ \XeTeXcharclass`\A\z@
+ \XeTeXcharclass`\a\z@
+ \XeTeXcharclass`\I\z@
+ \XeTeXcharclass`\i\z@
+ \fi
+}
+
+
\def\captionsslovak{%
\def\refname{Referencie}%
\def\abstractname{Abstrakt}%
@@ -30,7 +200,7 @@
\def\headtoname{Pre}% was komu
\def\proofname{Dôkaz}%
\def\glossaryname{Slovník}%
- }
+}
\def\dateslovak{%
\def\today{\number\day.~\ifcase\month\or
@@ -38,6 +208,25 @@
júna\or júla\or augusta\or septembra\or októbra\or
novembra\or decembra\fi
\space \number\year}%
- }
+}
+
+\def\noextras@slovak{%
+ \noslovak@shorthands%
+ \noslovak@hyphens%
+ \noslovak@vlna%
+ \ifxetex\XeTeXinterchartokenstate=0\fi%
+}
+
+\def\blockextras@slovak{%
+ \ifslovak@babelshorthands\slovak@shorthands\fi%
+ \ifslovak@vlna\slovak@vlna\else\noslovak@vlna\fi%
+ \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyhens\fi%
+}
+
+\def\inlineextras@slovak{%
+ \ifslovak@babelshorthands\slovak@shorthands\fi%
+ \ifslovak@vlna\slovak@vlna\else\noslovak@vlna\fi%
+ \ifslovak@splithyphens\slovak@hyphens\else\noslovak@hyhens\fi%
+}
\endinput