[luatex] getting previous glyphs
Norbert Preining
preining at logic.at
Thu Dec 4 03:25:58 CET 2014
Hi everyone,
I am trying to write some macros to convert Aozora (Japanese literature
site) formatted text to something I can feed through luatex.
In the Aozora format, ruby-annotations (the reading of Kanji written
on top of the Kanji) are written *after* the word, like in
nnnKKK<uuuuu>
where
nnn
are some *non* Kanji (Hiragana, Roman, etc)
KKK
are Kanji
< >
are Japanese angle brakets
uuuu
reading in Hiragana
TO make things worse, if there is the need to separate some Kanjis
from each other, then a | (in Jpanaese version) is added:
KK|KKK<uuuu>
in this example all the K's are Kanji, but the ruby should only
be applied to the group of three K after the |
Now, luatexja, in particalur luatexja-ruby, provides a handy
\ruby{KKK}{uuuu} macro, but for getting the KKK I have to read
backwards somehow.
As we are already in luatex, do you have any idea how to achieve
this easily?
Thanks for any hint
Norbert
------------------------------------------------------------------------
PREINING, Norbert http://www.preining.info
JAIST, Japan TeX Live & Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
------------------------------------------------------------------------
More information about the luatex
mailing list