[OS X TeX] CJK package on Mac

Bruno Voisin bvoisin at mac.com
Tue Dec 4 00:54:30 EST 2007

Le 3 déc. 07 à 22:30, Jung-Tsung Shen a écrit :

> [...]
> Here's the detailed instruction:
> http://authors.aps.org/names.html
> I have tried in just now on my Mac (OS 10.4 + TeXLive + TeXShop),
> following the instruction above (but had to change Big5 into Bg5), but
> the compiled test file did not show the characters correctly. They
> were all shown as ?????.
> My colleagues using Windows said it worked on the Windows machine. I
> have been trying to figure out why but only gone nowhere. I should
> mention that the Chinese characters showed up fine when the same
> document was compiled using xelatex.

Not being familiar with the CJK package, and not knowing Chinese,  
Japanese nor Korean, it's difficult to be sure.

Your description (use of TeXShop, no problem with XeTeX, no problem on  
Windows) suggests either an input encoding problem, or a font problem:

- Encoding: By default TeXShop considers input files (i.e. .tex files  
and the like, appearing in the editor window) to be in Macintosh Roman  
encoding. This setting can be changed in Preferences > Document. With  
XeTeX this is not usually a problem, because XeTeX documents tend to  
always contain the line

	%!TEX encoding = UTF-8 Unicode

making TeXShop ignore its encoding setting and use UTF-8, which is  
probably the best for CJK languages.

- Font: Have you checked the required fonts are present in your  
TeXLive installation (MacTeX with TeXLive-2007 I presume) and with the  
proper names? XeTeX can access fonts installed at the OS level (in ~/ 
Library/Fonts/, /Library/Fonts/ and /System/Library/Fonts/ on the  
Mac), but standard TeX can't.

As others have said, it's difficult to help without a minimal test  
file (posted somewhere on the web, so that input encodings can't be  
messed with as by email), or without (for me) studying the CJK package  
documentation first, which apparently would require quite some time.

The APS instructions give some hints regarding fonts and encodings:

> APS will support the following encodings from the CJK package:
> 	• Chinese: GB, Big5, and UTF 8
> 	• Japanese: JIS, SJIS (Shift-JIS), and UTF 8
> 	• Korean: KS and UTF8
> Because the Big5 and Shift-JIS encodings use some reserved TeX  
> characters, care must be taken to process files using these  
> encodings (see the CJK package documentation). Files may be prepared  
> using any of the fonts found in the CJK installation as well as the  
> Cyberbit font for UTF 8 encodings. Please select one of the standard  
> fonts from the distribution.

and earlier:
> The following font styles will be used when typsetting Chinese,  
> Japanese, or Korean characters in the final publication:
> 	• Simplified Chinese: SongMT
> 	• Traditional Chinese: SungMT
> 	• Japanese: MS Mincho
> 	• Korean: Batang

This seem to imply encodings and fonts are indeed important and a bit  
tricky here!

Bruno Voisin

More information about the MacOSX-TeX mailing list