[XeTeX] bopomofo ruby characters

Ján Zahornadský yankyo at gmail.com
Mon Apr 7 19:53:11 CEST 2008

Hello everyone!

First, thanks for being such a great community!

Now I'm in a problem of attaching a bopomofo pronunciation hints into
Chinese characters. I've found Wang fonts, which have these as a part of
a glyph, but due to multiple readings of the characters it's necessary
to switch between these fonts, often not having idea which fonts carries
which reading.

The second approach I tried is to write a command to attach those
symbols to a character. As I'm pretty unskilled in (Xe)LaTeX, my code so
far looks like this (for 綽/ㄔㄨㄛˋ character):

\fontsize{36}{36}\ming\fbox{綽\kern 8pt\raise 28pt\hbox{%
\fontspec[RawFeature={vertical:}]{Ming(for ISO10646)}%
\rotatebox{270}{\raise 1pt\hbox{\makebox[32pt]{\hfil ㄔㄨㄛ{\kern-16pt\
}\kern -4pt}

(basic idea is to typeset the character, then next to it at a one third
of the original size typeset the vertical box with the pronunciation
guide; moreover keep the tone at the expected position -- that is, over
and to the right of the last character). As for this approach, I don't 
have clear idea how to turn it into macro, say \anot{綽}{ㄔㄨㄛˋ} which 
would take care of presence of the tone, font size etc. (Is there a way?)

Was anyone solving a similar problem? Do you know some fonts besides 
Wang ones to contain ruby characters (Wang fonts don't contain all the
characters I need) or is there some package providing this functionality
I'm missing?

Little example of my tries attached, you'll need the Hong Kong "Ming(for 
ISO10646)" font plus Wang fonts available at:


Thanks a lot for any suggestion,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tex
Type: text/x-tex
Size: 796 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20080407/a867c35d/attachment.bin 

More information about the XeTeX mailing list