[tex-hyphen] [XeTeX] Hyphenation of polytonic Greek (expressed in Unicode)
Zdenek Wagner
zdenek.wagner at gmail.com
Fri Sep 13 00:29:23 CEST 2013
2013/9/12 Philip Taylor <P.Taylor at rhul.ac.uk>:
> (Cross-posted, continues a thread started on TeX-Hyphen)
>
> Arthur Reutenauer wrote:
>
>> Since you'll be using XeTeX, you can take advantage of the fact that
>> the two languages you'll be working with use disjoint character sets,
>> and make the language switch automatic using XeTeX's inter-character
>> token mechanism.
>
> Can \XeTeXinterchartoks hang ? I have just added two debugging
> strings to my earlier (apparently working) code, because I became
> aware after changing font as well as language at a boundary point
> that something odd was happening, and now the code hangs. This
> is the augmented code :
>
>> \XeTeXinterchartoks 0 \Greek {\uselanguage {greek}(Greek)}
>> \XeTeXinterchartoks \Greek 0 {\uselanguage {UKenglish}(English)}
>
Yes, it will hang. When a Greek character is seen, the first
\XeTeXinterchartoks comes into action. The Greek character is returned
back to the queue and the tokens are inserted. At that time non-Greek
character (the parenthesis) is found. Then (Greek) comes to the
horizontal list and the Greek character in the queue is seen again. It
was preceded by a non-Greek character (the right parenthesis from the
expansion), therefore the first \XeTeXinterchartoks is invoked again.
The Greek character will again be returned to the queue and the above
described actions will be repeated forever. I found this behaviour
when writing my macros in xevlna.sty, so as a solution I had to
temporarily disable \XeTeXinterchartokenstate inside the
\XeTeXinterchartoks tokens and then enable it again.
> and this is the original :
>
>> \XeTeXinterchartoks 0 \Greek {\uselanguage {greek}}
>> \XeTeXinterchartoks \Greek 0 {\uselanguage {UKenglish}}
>
> Philip Taylor
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
--
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz
More information about the tex-hyphen
mailing list