[tex-live] MacOS X + CJK

John Tang Boyland boyland at solomons.cs.uwm.edu
Wed Aug 2 04:12:04 CEST 2006


On 01 Aug 2006 13:09:37 +0200, Werner LEMBERG wrote:
] > 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.
] 
] You are beating the wrong dog.  

No doubt!

] Emacs doesn't use UTF-8 internally;
] instead, UTF-8 is mapped onto its internal encodings.  

I was referring to the problem mentioned in
  http://lists.ffii.org/pipermail/cjk/2003-May/000394.html
If a file is opened with Unicode encoding, cjk-write-file is unable to
use GB or Big5 encoded fonts and so *latex falls back to cyberbit or else
bitmapped fonts which look bad.

The problem isn't with the CJK macros, I don't think.

] If you use, for
] example, `Chinese-Bg5' as your language environent within Emacs (with
] function `set-language-environment'), Big 5 encoding is tried first.
] If that fails, Emacs tries GB 2312, etc., etc.  Have a look at the
] function `utf-translate-cjk-load-tables' in file `utf-8.el' for the
] exact order.
] 
] With other words, your UTF-8 codes are mapped to various CJK
] encodings, including Japanese, if you use cjk-enc.el.  The solution to
] this problem is simple: Don't use cjk-enc.el for Unicode encoded
] files!  Instead, you should use utf-8 encoding directly, probably
] using CJKutf8.sty to combine it with LaTeX's utf8 support.  Have a
] look into the CJKutf8.tex example file for its usage.

It looks fine but when I run it with texlive/2005 on MacOSX, I get various problems
probably because I don't have X installed:

pdflatex CJKutf8.tex
...
kpathsea: Running mktextfm larm1000
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input larm1000
This is METAFONT, Version 2.71828 (Web2C 7.5.5)
kpathsea: Running mktexfmt mf.base
fmtutil: running `mf -ini   -jobname=mf -progname=mf -translate-file=cp227.tcx mf.ini' ...
dyld: Library not loaded: /usr/X11R6/lib/libXt.6.dylib
  Referenced from: /usr/local/texlive/2005/bin/i386-darwin/mf
  Reason: image not found
/usr/local/texlive/2005/bin/i386-darwin/mktexfmt: line 882:   712 Trace/BPT trap          ${1+"$@"} 1>&2

To my untutored eyes, this looks as if it is trying to make bitmapped fonts.

] > 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).
] 
] The default is always `song', regardless whether you use
] cjk-write-file or not.  This is documented!  Just select your own font
] shapes; the README in the example directory gives a complete list of
] available fonts, and the example files themselves show how to change
] the fonts.

I understand that if I write enough CJK macros, I can get things to work.  Perhaps
I was lulled into a sense that cjk-write-file would do that work for me.
But apparently it relies on a font (song) that isn't by default installed in texlive.
If song is not available, it tries kai, and if kai is not available, it fails.
I found out from where to get these fonts (they're right there in CTAN).
My point is simply that out-of-the-box, the examples don't work.
(And for cjk-write-file, I had to hand-installed the .el files of course.)

The example file for cjk-write-file that I was using was chinese.tex in
the texshowcase on TUG's web page:
	http://www.tug.org/texshowcase/chinese.tex
The page doesn't guarantee that everything works immediately, but since this
file included text that indicated that cjk-write-file would handle the "messy"
CJK macros that I as a neophyte didn't want to meddle with, I had hoped it would
work, and indeed it did work with help from this list and the CTAN CJK fonts

thanks again,

John


More information about the tex-live mailing list