diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/luatex/generic/kanaparser/kanaparser.tex |
Initial commit
Diffstat (limited to 'macros/luatex/generic/kanaparser/kanaparser.tex')
-rw-r--r-- | macros/luatex/generic/kanaparser/kanaparser.tex | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/macros/luatex/generic/kanaparser/kanaparser.tex b/macros/luatex/generic/kanaparser/kanaparser.tex new file mode 100644 index 0000000000..183a02cfd7 --- /dev/null +++ b/macros/luatex/generic/kanaparser/kanaparser.tex @@ -0,0 +1,25 @@ +% Kana Parser for LuaTeX +% Author: Adam Zahumensky, FIT CVUT + +% initializer macro, use it before using any other macros in this package +\def\parserInit{ \directlua{ dofile('kanaparser.lua') } } + +% supply a whitespace-separated list of syllables whose kana characters you'd like to toggle +% list of supported alternatives ([] denotes default choice): +% du : [づ], どぅ +% ja : [じゃ], ぢゃ +% ji : [じ], ぢ +% jo : [じょ], ぢょ +% ju : [じゅ], ぢゅ +% we : [うぇ], ゑ +% wo : [を], うぉ +\def\toggleChars#1{\directlua{ toggleChars("\luatexluaescapestring{#1}") }} + +% convert all kana to latin +\long\def\toLatin#1{\directlua{ toLatin("\luatexluaescapestring{#1}") }} + +% convert latin and katakana to hiragana +\long\def\toHiragana#1{\directlua{ toHiragana("\luatexluaescapestring{#1}") }} + +% convert latin and hiragana to katakana +\long\def\toKatakana#1{\directlua{ toKatakana("\luatexluaescapestring{#1}") }}
\ No newline at end of file |