Hi Thomas and Mike, thanks for the great support. Rotation of the rubies is one problem. The other problem with the rubies for the bo-po-mo-fo system is that the tone symbols (which you don't have in japanses) must be added to the right of the pronounciation symbols. I.e. there are two rows of rubies. I tried it using embedded rubies in latex: \ruby{hanzi}{\ruby{pronounciation}{tone}} but the positioning needs to be improved. Maybe Thomas' hack is the only solution for that at the moment. I will try to find out what SW is used in Taiwan to do this. Thanks for the help, Stefan Thomas, could you send me your hack, please? Mike Fabian wrote:
Thomas Piekenbrock
writes: I had the same problem with Japanese. There is supposed to be a vertical style option somewhere in CJK, but I do not know how good it is.
I have been using CJK for 6 years, and I am using my old version, not the package from SuSE. I did a hack on the CJK code, which optionally rotates all Characters by 270 degrees, including ruby. Doing so, the ruby appear automatically on the right side of the Chinese Character. The hack includes some adjustments for placement of punctuation characters, because some may not be rotated, and others must be moved a bit.
Correct vertical variants of punctuation characters are used by CJK-LaTeX if the font used has a GSUB table for vertical context.
The free Japanese Kochi TrueType fonts have such a table, therefore it works perfectly with the Kochi fonts.
You can check whether such a GSUB table is available with 'ftdump':
ftdump /usr/X11R6/lib/X11/fonts/truetype/kochi-mincho.ttf [...] GSUB table ------------------------------------------------------------------------------
script `kana' (index 0): default language system: feature `vert' (index 0; lookup 0) language `JAN ' (index 0): feature `vert' (index 0; lookup 0)
Lookups:
0: type 1, flag 0x1
------------------------------------------------------------------------------
The free Chinese Arphic TrueType fonts don't have such a GSUB table, therefore punctuation characters don't work perfectly in vertical mode with the Arphic fonts. But this is just a font problem, as soon as you have fonts with a good GSUB table for this purpose, it works.
See this screenshot:
http://www.suse.de/~mfabian/m17n/cjk-latex-kochi-mincho-vertical.png
Are you using the ntu fonts (ntu_kai.ttf , ntu_mr.ttf , ntu_li_m.ttf , free for you to use, but SuSE is not permitted to bundle them), or Arphic fonts? ntu fonts are Big5 encoded, so they can be converted to pfb font sets, which is nicer in Postscript or pdf then bitmapped ones generated by ttf2pk.
Whether fonts can be converted to pfb or not doesn't depend on whether they are Big5 fonts or not.
All CJK TrueType fonts distributed with SuSE Linux can be easily converted to .pfb and used with CJK-LaTeX.
Just call
/usr/sbin/cjk-latex-config --type1
as root and wait a while[1]. After that, CJK-LaTeX will automatically use the created .pfb files.
You can easily extend this for your own fonts, /usr/sbin/cjk-latex-config creates the .pfb files for all TrueType fonts installed in /usr/X11R6/lib/X11/fonts/truetype/ according to the entries in /etc/ttf2pk/ttfonts.map.
I.e. if you have other TrueType fonts, just throw them into /usr/X11R6/lib/X11/fonts/truetype/, add entries to /etc/ttf2pk/ttfonts.map, and create .fd files in the appropriate subdirectory of /usr/share/texmf/tex/latex/CJK/.
Then call '/usr/sbin/cjk-latex-config --type1'
I may look into this Chinese vertical issue as well in not so far future.
Footnotes: [1] may be a long while, this can take several hours on a slow machine if you have all available CJK TrueType fonts installed.