[XeTeX] Basic questions about CJK (Unicode) and xelatex

Roger Hart rhart at mail.utexas.edu
Wed Feb 23 16:32:29 CET 2005

Dear Jonathan,

Thank you very much for your very expert and generous help!!  I am  
*extremely* impressed by XeTeX, especially after having struggled for  
so many hours and even days trying to get CJK fonts to work in latex.   
XeTeX is truly amazing.

I must apologize, though, for not being clearer about the problem,  
mainly because I was not that clear about it myself, and I am by no  
means an expert.  I had gotten to the point where I could produce CJK  
characters, as in your very helpful example file.

However, the problem comes when I have a paragraph (of more than one  
line) of Chinese. Then I get strange error messages, and the text does  
not wrap properly but extends off the page. If it is long enough, it  
eventually does wrap to make a second line.

I've tried all different kinds of fonts, including TrueType (Apple  
LiSung Light), Postscript (MOE Sung Regular), OpenType (STSong Std Acro  
Light), and Bitstream Cyberbit, a TrueType font for which I've  
installed all the necessary resources (that is, .tfm, .enc, .map, and  
.fd files) to run under pdflatex, following the standard CJK  
installation for OS X (following, that is, Olivier Delloye's expert and  
indeed indispensable instructions).  None of these fonts wrap properly.

I tried to see if there might be a problem with xelatex not finding the  
.tfm files etc. for Bitstream Cyberbit, but kpsewhich seemed to  
indicate that the paths for latex and xelatex were the same.

I'm not really knowledgeable enough about tex or latex to proceed  
further. I'll be happy to furnish you with a file with more Chinese,  
but it would be easy I think just to repeatedly paste together Chinese  
from your example file to see the problem. I certainly hope that  
xelatex can work properly with CJK, and without creating .tfm, .enc,  
.map, and .fd files, since they can only be created, at least to the  
best of my understanding, for TrueType, and not for Postscript or  
OpenType, and in any case, creating them for Bitstream Cyberbit was  
quite difficult and time-consuming.

Thanks so very much,


The error messages in the log file (I got similar messages using other  
CJK fonts):

Overfull \hbox (460.0pt too wide) in paragraph at lines 36--37

[several subsequent lines removed...]

[1] (./cjktest.aux)

LaTeX Font Warning: Some font shapes were not available, defaults  

>> Is there an easy way to get CJK to work under xelatex? Could someone  
>> send me an example file with the preamble, packages, and commands  
>> necessary to get CJK to work?  I use CJK with TeXShop and pdflatex in  
>> OSX, which was quite difficult to set up.  I would be very impressed  
>> indeed if it were as easy to get CJK to run under xelatex as it is  
>> under xetex!
> OK, let's see if I can impress you. :)
> Here's a short example that ought to work, assuming you have the Apple  
> Far Eastern fonts installed; you should be able to change the font  
> names to use Cyberbit or any other Unicode font you have handy, if  
> preferred.

Roger Hart
Assistant Professor, Departments of History and Asian Studies
University of Texas at Austin

office: Room 405, Garrison Hall
office phone: 512-475-7258
department fax: 512-475-7222
email: rhart at mail.utexas.edu


More information about the XeTeX mailing list