[tex-live] MacOS X + CJK

John Tang Boyland boyland at solomons.cs.uwm.edu
Tue Aug 1 05:11:16 CEST 2006

On 30 Jul 2006 08:07:20 EDT, Jonathan Kew wrote:
] On 30 Jul 2006, at 3:09 am, John Tang Boyland wrote:
] > I like using emacs for CJK things since it is able go display CJK
] > characters correctly, when (it seems) TeXShop doesn't know how.
] > Perhaps if I install cyberbit ?
] TeXShop displays CJK characters fine, using the fonts included with  
] Mac OS X. I'm not sure how well it would work with non-Unicode  
] encodings, though; I guess you'd have to explicitly set the encoding  
] of the source file (see Preferences and check the Help). If you have  
] the encoding set to MacOS Roman or something like that, then it'll  
] certainly have trouble.

OK.  That works.  (For the record: I have to set the encoding to
Unicode before reading the file, or else texshop loads it in Mac OS
Roman and won't change it).

] A Unicode Chinese document in TeXShop typesets fine through XeTeX (or  
] XeLaTeX) with no special effort; just choose one of the Unicode- 
] compliant Chinese fonts included with Mac OS X; no need for special  
] packages to support different encodings, etc., it "just works".

Well there must be SOME special effort: if I take a Unicode chinese
file that has no CJK macros in it and process with xelatex, it
typesets without errors but all chinese characters are omitted (the
log includes warnings that the characters are not present in cmr10 --
no surprise).

Obviously the trick is to "choose one of the Unicode-compliant Chinese
fonts included with Mac OS X" as you said. I tried setting the font
from the TeXShop Format>Font menu but of course that only sets the
font for the *viewing* of the file, not the typesetting of it.  What's
the incantation to set the font for the typesetting of the file?
Looking at the SIL XETEX web page, it seems one can define a low-level
font-changing command, but it seems to me that I would need to have a
separate command for each size of text I want, and that I would also
need to switch fonts whenever mixing Chinese and English.

And unfortunately, emacs' write-cjk-file misbehaves on UTF-8 encoded
chinese files -- it insists on using the jsso bitmapped fonts (as
documented in previous CJK emails to this list in 2003) which in my
case causes everything to crash since it can't make them.  I don't see
a easy way to make/get them.  Again, I'm sure that with enough tex
font wizardry, it should be possible to find a way for things to work.
I guess my experience just shows that texlive still isn't ready for
non-CJK-font experts to use: the loaded defaults don't work with each
other (cjk-write-file by default chooses a font that isn't included,
for example).

For the record, even my current workaround to get mixed English and
Chinese to typeset on MacOSX (using cjk-write-file) fails if I try to
put a character in a title etc.  It still tries to make bitmapped pk
files (in pdflatex, which I though was smart about fonts) and crashes.

(In any case, things are even more confused because I'm trying to
maintain two tex distributions on one machine: texlive and the teTeX
that texShop wants to use.  Unfortunately they seem incomparable, so I
can't just use one versus the other.  I'm wondering whether I could
just "smush" them together, but that's its own maintenance nightmare.)

Thanks for all the help and sorry for wasting people's emails with my
ignorant screeds.


More information about the tex-live mailing list