From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 2 Sep 2019 13:46:59 +0900
Subject: Initial commit

---
 macros/luatex/generic/kanaparser/examples.tex | 43 +++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 macros/luatex/generic/kanaparser/examples.tex

(limited to 'macros/luatex/generic/kanaparser/examples.tex')

diff --git a/macros/luatex/generic/kanaparser/examples.tex b/macros/luatex/generic/kanaparser/examples.tex
new file mode 100644
index 0000000000..6ab850c9ff
--- /dev/null
+++ b/macros/luatex/generic/kanaparser/examples.tex
@@ -0,0 +1,43 @@
+% This file shows various usage of this parser
+
+\input luaotfload.sty % otf font loader
+\input kanaparser % load the parser package
+
+\font\jp = ipagp % ipagp.otf font is included in the ipafont font package: https://www.internationalphoneticassociation.org/content/ipa-fonts
+
+\parserInit % initialize kana parser
+
+% wrapper macros that change font automatically
+\def\jchar#1{{\jp #1}}
+\def\kpth#1{\jchar{\toHiragana{#1}}}
+\def\kptk#1{\jchar{\toKatakana{#1}}}
+\def\kptl#1{\jchar{\toLatin{#1}}}
+
+Example of transliteration to Latin: \kptl{しゅんかしゅうとう しし}
+
+Example of transliteration to katakana featuring prolongation dashes: \kptk{しゅんかしゅうとう しし}
+
+Example of transliteration to hiragana converting prolongation dashes: \kpth{シュンカシュートー}
+
+Example of transliteration of multiple-form syllables to hiragana using default settings: \kpth{jiji wewe}
+
+\toggleChars{ji we} % toggles the kana representation of 'ji' and 'we' syllables
+Example of transliteration of multiple-form syllables to hiragana using alternate settings: \kpth{jiji wewe}
+
+Mixed example of transliteration to katakana: \kptk{shunkashuutouuuxxxxxchou}
+
+Example of default transliteration to hiragana using ambiguous syllables after n: \kpth{renyoukei}
+
+Example of isolated n-character to resolve ambiguity: \kpth{ren'youkkei}
+
+Example of hiragana to Latin transliteration from previous example: \kptl{れんようけい}
+
+Example of consonant gemination from hiragana to Latin: \kptl{にっぽん}
+
+Example of consonant gemination from Latin to hiragana: \kpth{nippon}
+
+Example of character preservation: \kptl{when transLating to Latin, ' and " are preserved}
+
+Example of character preservation 2: \kptl{\kpth{when transLating to kana, ' is consumed, " is preserved}}
+
+\bye
-- 
cgit v1.2.3

