Debian Codegraph @

texmf-dist/tex/luatex/kanaparser/kanaparser.tex

raw
1 % Kana Parser for LuaTeX
2 % Author: Adam Zahumensky, FIT CVUT
3
4 % initializer macro, use it before using any other macros in this package
5 \def\parserInit{ \directlua{ dofile('kanaparser.lua') } }
6
7 % supply a whitespace-separated list of syllables whose kana characters you'd like to toggle
8 % list of supported alternatives ([] denotes default choice):
9 % du : [づ], どぅ
10 % ja : [じゃ], ぢゃ
11 % ji : [じ], ぢ
12 % jo : [じょ], ぢょ
13 % ju : [じゅ], ぢゅ
14 % we : [うぇ], ゑ
15 % wo : [を], うぉ
16 \def\toggleChars#1{\directlua{ toggleChars("\luatexluaescapestring{#1}") }}
17
18 % convert all kana to latin
19 \long\def\toLatin#1{\directlua{ toLatin("\luatexluaescapestring{#1}") }}
20
21 % convert latin and katakana to hiragana
22 \long\def\toHiragana#1{\directlua{ toHiragana("\luatexluaescapestring{#1}") }}
23
24 % convert latin and hiragana to katakana
25 \long\def\toKatakana#1{\directlua{ toKatakana("\luatexluaescapestring{#1}") }}