Debian Codegraph @

texmf-dist/tex/luatex/luavlna/luavlna.sty

raw
1 \ProvidesPackage{luavlna}[2025-10-29 luavlna]
2
3 \ifdefined\directlua\else
4 \PackageWarning{luavlna}{Luavlna needs LuaLaTeX, aborting}
5 \endinput
6 \fi
7
8 \RequirePackage{kvoptions}
9
10 \def\nosingledefaults{\relax}
11 \input luavlna
12
13 % we need to redefine the setting functions to use directly the language numbers
14 % in order to support polyglossia
15 \def\singlechars#1#2{%
16 \ifcsname l@#1\endcsname%
17 \expandafter\directlua\expandafter{set_singlechars("\the\csname l@#1\endcsname","#2")}%
18 \fi%
19 }
20
21 % Define compound initials
22 \def\compoundinitials#1#2{%
23 \ifcsname l@#1\endcsname%
24 \expandafter\directlua\expandafter{set_compounds("\the\csname l@#1\endcsname","#2")}%
25 \fi%
26 }
27
28
29 \def\enablesplithyphens#1{%
30 \ifcsname l@#1\endcsname%
31 \typeout{set lang #1, \the\csname l@#1\endcsname}%
32 \directlua{enable_split_hyphens("\the\csname l@#1\endcsname")}%
33 \fi%
34 }
35
36 \def\disablesplithyphens#1{%
37 \ifcsname l@#1\endcsname%
38 \directlua{disable_split_hyphens("\the\csname l@#1\endcsname")}%
39 \fi%
40 }
41
42 \DeclareVoidOption{noinitials}{\noinitials}
43 \DeclareVoidOption{nounits}{\nounits}
44 \DeclareVoidOption{nopredegrees}{\nopredegrees}
45 \DeclareVoidOption{nosufdegrees}{\nosufdegrees}
46 \DeclareVoidOption{noprocess}{\preventsingleoff}
47 \DeclareVoidOption{debug}{\preventsingledebugon}
48 \DeclareBoolOption[true]{defaults}
49 \ProcessKeyvalOptions*
50
51 \ifluavlna@defaults
52 \AtBeginDocument{%
53 \singlechars{czech}{AaIiVvOoUuSsZzKk}
54 \singlechars{slovak}{AaIiVvOoUuSsZzKk}
55 \compoundinitials{czech}{Ch,CH}
56 \enablesplithyphens{czech}
57 \enablesplithyphens{slovak}
58 }
59 \fi
60 \endinput