summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luavlna/luavlna.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/generic/luavlna/luavlna.sty')
-rw-r--r--macros/luatex/generic/luavlna/luavlna.sty18
1 files changed, 18 insertions, 0 deletions
diff --git a/macros/luatex/generic/luavlna/luavlna.sty b/macros/luatex/generic/luavlna/luavlna.sty
index 44efffb6bd..48db36b5f4 100644
--- a/macros/luatex/generic/luavlna/luavlna.sty
+++ b/macros/luatex/generic/luavlna/luavlna.sty
@@ -3,6 +3,8 @@
\def\nosingledefaults{\relax}
\input luavlna
+% we need to redefine the setting functions to use directly the language numbers
+% in order to support polyglossia
\def\singlechars#1#2{%
\ifcsname l@#1\endcsname%
\expandafter\directlua\expandafter{set_singlechars("\the\csname l@#1\endcsname","#2")}%
@@ -16,10 +18,26 @@
\fi%
}
+
+\def\enablesplithyphens#1{%
+ \ifcsname l@#1\endcsname%
+ \typeout{set lang #1, \the\csname l@#1\endcsname}
+ \directlua{enable_split_hyphens("\the\csname l@#1\endcsname")}%
+ \fi%
+}
+
+\def\disablesplithyphens#1{%
+ \ifcsname l@#1\endcsname%
+ \directlua{disable_split_hyphens("\the\csname l@#1\endcsname")}%
+ \fi%
+}
+
+
\AtBeginDocument{%
\singlechars{czech}{AIiVvOoUuSsZzKk}
\singlechars{slovak}{AIiVvOoUuSsZzKk}
\compoundinitials{czech}{Ch,CH}
\enablesplithyphens{czech}
+ \enablesplithyphens{slovak}
}
\endinput