How to create Japanese language documents under GNU/Linux using LaTeX

Mark Alford. Last updated: 2011-Oct-19.

For inputting Japanese characters in Linux, see Viewing and creating Japanese documents under GNU/Linux.
If you just want to create a Japanese text file, see How to create a Japanese text file using emacs.

These instructions work for the TeX Live TeX distribution. They were tested with TeX Live 2011 (installed manually, not via yum, see below) in Fedora 13. For instructions appropriate to TeX Live 2007 see the previous version of this document.

(1) Install TeX Live 2011

In principle, this should just involve installing the TeX system using a package manager like yum. If your Linux distribution does not include TeX Live 2011 (for example, the official TeX packages for Fedora 13, 14, and 15 are based on the older TeX Live 2007 distribution, which is much more primitive) a manual installation of TeX Live 2011 is necessary. Do the following as root.

  1. Download TeX Live. I downloaded the ISO file and burned a DVD from it.
  2. Ensure that you have Perl installed, along with its interface to the Tk library. In Fedora, yum install perl-Tk
  3. Mount the TeX Live DVD, and cd to its top level directory. Run the install script, making sure that it will create files that are readable by all users:
    umask 002
    perl install-tl -gui
    In the preferences window that comes up, under language collections -> language support, make sure that CJK is included. You can do other customizations too. In the preferences window you can also toggle the default paper size between A4 and Letter. Then click "Install" at the bottom.
  4. To make sure xetex will work,
    cp /usr/local/texlive/2011/texmf-var/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
    fc-cache -fsv

To make this TeX Live distribution available to any given user, add the following to their .bash_profile:

PATH=/usr/local/texlive/2011/bin/i386-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2011/texmf/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2011/texmf/doc/info:$INFOPATH; export INFOPATH

(Note that the first line should be modified for different architectures, e.g. for 64-bit Linux replace "i386" with "x86_64". TeX Live may also warn you that you need to unset some existing environment variables, e.g. "unset LATEX_MK_DIR".) Now all the standard TeX commands will run the TeX Live 2011 versions, in /usr/local/texlive/2011.

(2) Japanese typesetting using TeX

In TeX Live 2011 there are various ways to achieve this. For all of them you need to be able to create TeX (plain text) files containing Japanese text: see How to create a Japanese text file using emacs.

For more general information on Japanese and computing, see Jim Breen's Japanese page.

Please sent comments, corrections, improvements to alford(at)

Mark Alford's IBM Thinkpad GNU/Linux page,

Valid XHTML 1.0!