[XeTeX] xunicode.sty -- pinyin and TIPA shortcuts
Robert Spence
spence at saar.de
Sat Apr 8 04:15:49 CEST 2006
Hi Ross,
I just figured out a simple solution for the phonetic g glyph that
you might perhaps like to think about for the next version of
xunicode.sty:
Simply change line 752 to read:
\DeclareUTFcharacter[\UTFencname]{x0261}{\textg}
(instead of x0067 as at present; and definitely _not_ the code-point
I erroneously suggested in my last posting...)
This would mean that if xunicode.sty was loaded you could directly
access the correct phonetic glyph (LATIN SMALL LETTER SCRIPT G) at
any point in a document by typing the \textg command. And if you
were inside the argument of a \textipa{...} command you'd have a
choice: if you knew your font had a glyph of the right shape at x0067
you could just type g, otherwise you could type \textg as you'd be
confident that you had a font containing all the glyphs for the
phonetic characters up in that Unicode code-point range.
This would still involve a slight change in keyboarding behaviour for
us legacy people compared with Fukui Rei's tipa.sty package, where
the meaning of \textg was "flip to the _other_ glyph shape than the
one you should be getting in this environment". But I doubt it would
be worth trying to fully emulate legacy keyboarding styles here in
any case, because to do so you'd have to change the \catcode of g to
active within the argument of a \textipa{...} command---but if you
did that, TeX couldn't interpret what \gdef meant at line 673 of
xunicode.sty:
672 \setTIPAcatcodes
673 \gdef
because it wouldn't get past the g in \gdef (!)
No doubt there's a dangerous double bend section somewhere in the
Dirty Tricks chapter of the TeXbook that would help... but it's
certainly a bit beyond anything _I'd_ dare play around with in TeX.
(Maybe you or Will or Jonathan might be more daring, though... ;-)
Thanks for the thorough description of the encoding issue. I had so
many problems with encodings when I first started playing with XeTeX
that I decided to try to get by without them altogether, or at least
only use them locally in isolated font calls. It's not so much bits
of "old" material I want to include in new "mixed"-style documents,
it's more just a question of wanting not to have to retrain my
fingers and brain for too many new keyboard layouts all at once. I
find it really does help to have all those active uppercase letters
you defined in xunicode.sty, and I'm grateful for them.
Cheers,
-- Rob Spence
More information about the XeTeX
mailing list