CJK-LaTeX is a LaTeX package which enables LaTeX typesetting Chinese, Japanese and Korean without running any external programs. The latest version is 4.2.0. The package and CJK fonts can be downloaded at any CTAN repository. The document coming with the package isn't up to date. Although the installation of the TEX related code/files is straightforward, it took me some time to get the fonts working. In what follows, I'll describe how I set it up on my system. I'm using Mandrake Linux 7.2 on an IBM Thinkpad 600E. The distribution comes with teTex 1.0.7. The TEX directory is /usr/share/texmf.
#ls
README contrib/ doc/ examples/ texinput/ utils/
#cd texinput
#mkdir /usr/share/texmf/tex/CJK
#mv * /usr/share/texmf/tex/CJK/
If you are not superuser, follow INSTALL to set up appropriate environment variables.
#cd utils/hbf2gf
#./configure --with-kpathsea-dir=/usr
#make
I didn't specify prefix and didn't do a make install. I like to copy files by myself instead of letting make mess around. Copy compiled hbf2gf to any directory in your PATH. You may need rehash if you are using tcsh.
xdvi will try to create pk files from tfm files. It does that by calling mktexpk, a shell script, which in turn calls hbf2gf. If you compiled hbf2gf with kpathsea, it should be able the find the config file (/usr/share/texmf/hbf2gf/gsfs14.cfg in my case). But it can't find the hbf file, which contains the bitmaps of characters. What I did first is to put the full path name in the hbf_header entry. It worked. But it's ugly. I read the man page of hbf2gf again and found how it uses kpathsea to locate files. hbf2gf will search for .hbf files in the path specified by the environment variable T1FONTS. This variable is defined in /usr/share/texmf/web2c/texmf.cnf. Find T1FONTS and append ;$TEXMF/hbf2gf// to it. The trailing double slashes, which tell TEX to search the subdirectory too, aren't really necessary.%cd examples %latex GB.tex ... %xdvi GB.dvi