Adding support for ideographic languages is quite tricky. However, once you are done with it, it will work quite well. Other than installing packages, there is some extra configuration work to do.
Your Linux distribution might already have a CJK (Chinese, Japanese, Korean) package ready for you, so you might be saved the hassle of manually installing everything. Do check before going forward!
There is the possibility of using the ucs package in order to write short snippets of CJK text, but that option is seriously limited as it does not handle, among other things, newlines. We will instead install the complete CJK-LATEX package and make it work for both LATEX and PDFLATEX. A lot of this material has been inspired by Pai H. Chou's page about how to setup PDFLATEX.
Download the CJK
package. Copy its unpacked files to an appropriate subfolder of
TEXMF, just like you did with the ucs package
before (see the section called “The ucs Package”). The files will be unpacked in a
CJK/X_Y.Z folder, it is not important that you
take them out, though it will probably be tidier for you to
Now you have to download a font that supports all the CJK characters
you need. You can choose any
*.ttf file that
covers them, but in this walkthrough we will use Cyberbit.
Unzip the file and rename
cyberbit.ttf, since uppercase might confuse your system.
cyberbit.ttf in a folder together with
and generate the
*.enc files with the command
$ ttf2tfm cyberbit.ttf -w cyberbit@Unicode@.
For some reasons, sometimes this does not produce the hundreds
of files it should. Should that be your case, you can download both
*.tfm files in an
appropriate folder, say
*.enc files may be installed in
Now we need a map file to connect the
*.enc files to the font. Download
and install it in
Download another file,
and place it in an appropriate folder. You may choose, for example,
The last file we have to generate is a PostScript Type 1
font, necessary to read DVI files generated with LATEX. Run the command
$ ttf2pfb cyberbit.ttf -o cyberbit.pfb, and copy the
cyberbit.pfb in a folder like
Let's now place
cyberbit.ttf among the fonts
where LATEX can find it. You could place it in a folder named
Check the configuration file you find at
$, and make sure that the
TTFONTS is uncommented and points to
the folder where you saved
To make it possible for PDFLATEX to use your CJK
fonts, it is necessary that you add a line in configuration file
map +cyberbit.map in the file to complete the
configuration for PDFLATEX.
To configure LATEX so that you can produce DVI
files with CJK characters, you have to add a line in file
ttfonts.map. The file might be in a folder named
$, but you will probably have to look
for it. Add the line
Now, you only have to run
and the system should be ready.
To test whether your configuration is correct, you can try to compile this test file.
There are many things that can go wrong when setting CJK support manually. If something seems not to work, the following checklist might help you.
Obviously, since you run LATEX as a user and not as root, you must allow ordinary users to access the new files. Make sure all folders and files are accessible using the chmod command.
If LATEX writes a DVI without problems, but you
cannot view it, it is almost certainly because of some problems in the
automatic generation of
fonts. They are supposed to be generated on the fly when viewing a
DVI file, but this might fail for a number of reasons: double-check
ttfonts.map for your custom line first. However,
it might happen that your ttf2pk command, which
is usually invoked by the DVI viewer, has been compiled
without support for the
kpathsea libraries. If this is the case,
will make no mention of kpathsea. As support for
these libraries is necessary, you might have to find a new package, or
recompile FreeType 1 by yourself.
There are a number of different input engines, and the choice can
depend also on personal preference. The author uses Skim,
a port to KDE of the Scim
engine. Refer to your distribution's documentation to learn how to
install these programs. Configuration of such programs can be tricky
too, in the case of Skim you will have to
define an environment variable
before starting X.