[XeTeX] xunicode.sty -- pinyin and TIPA shortcuts

Jonathan Kew jonathan_kew at sil.org
Tue Apr 4 11:58:10 CEST 2006


On 4 Apr 2006, at 4:54 am, Robert Spence wrote:

> Dear XeTeXnicians,
>
> These are two "sorcerer's apprentice" type questions; I've only  
> been using XeTeX for a few days (---but what a wonderful few days  
> they've been!---), and I do hope I'm not guilty here of "rushing in  
> where angels fear to tread"...
>
> QUESTION 1) Pinyin Keyboarding Shortcuts (cf. the thread "[XeTeX]  
> Chinese: vertical typesetting, pinyin tones, and Japanese macrons?"  
> from mid-July 2005)
>
> Might it perhaps be an idea in a future version of xunicode.sty to  
> change line 1131 of version 0.5 [2005/02/26] from
>   \DeclareUTFcomposite[\UTFencname]{x01DA}{\v}{\"u}
> to
>   \DeclareUTFcomposite[\UTFencname]{x01DA}{\v}{v}
> ?

I don't think this would be appropriate in a general package such as  
xunicode; the sequence \v{v} would normally be expected to produce a  
v with caron. Mapping it to u-dieresis-caron might be a useful  
convenience for Pinyin, but it's specific to that particular usage,  
and doesn't belong in a generic package.

> b) I can't seem to access LATIN SMALL LETTER U WITH DIAERESIS AND  
> CARON (Unicode 01DA) via the current shortcut \v{\"u} (which puts  
> the caron _after_ the dieresised u), and am too lazy to type  
> \textdieresiscaron{u} each time, but I discovered that if I put
>   \DeclareUTFcomposite[\UTFencname]{x01DA}{\v}{v}
> in the preamble (or even in the body) of my document then I can use  
> the shortcut \v{v} without any problems.  (Am I missing something  
> with \v{\"u}?  I tried just about every other variation I could  
> think of, but to no avail.)

Interesting. \v{\"u} works fine for me with some fonts -- e.g.,  
Lucida Grande, Charis SIL -- but not others; it seems that it depends  
on the level of Unicode support in the font. In particular, it  
doesn't work with the Latin characters in OS X Chinese fonts(!).

Have you considered using a Latin font with good Unicode support for  
your Pinyin? It looks like that would work.

I'm not sure *why* it's behaving this way.... maybe Ross would  
understand exactly what characters xunicode is trying to access in  
each case.

It might make good sense to have a little "unicode-pinyin" package  
that gives you more convenient ways to access characters used in  
Pinyin transcription, such as using v as a shorthand for u-dieresis.  
It just doesn't belong in xunicode.sty, IMO.

> I hope the kind of old-fashioned keyboarding habits underlying both  
> of my questions aren't too much of an annoyance to the project  
> developers.  In the short time since I started using XeTeX I've  
> realized that it's better to avoid anything that even remotely  
> involves the fontenc, inputenc, and babel packages, and just type  
> into your document the unicode characters you want to typeset,  
> changing the keyboard layout as necessary and using the Keyboard  
> Viewer to help train new keyboarding habits.  So far I've found I  
> can do this well enough for switching between English, German,  
> French, Russian, Hebrew, and Greek (although the LGR shortcuts  
> described in 9.4.2 of The LaTeX Companion, 2nd ed., were nicer),  
> and for Chinese characters it's fairly easy to use the ITABC input  
> method, but there doesn't seem to be a phonetics keyboard available  
> with Mac OS X 10.4.5 (and in any case, the solution would probably  
> need to be more like one of the Chinese Input Methods, where  
> pressing one or more keys gets you a list of relevant characters  
> and you select the one you want).

There are some IPA keyboard layouts around, though OS X doesn't ship  
with one as standard; if you want to look at some options, check  
http://scripts.sil.org/InputResources for links (see under "Mac  
Unicode keyboard layouts").

JK



More information about the XeTeX mailing list