<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% 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
</pre></body></html>