TeX and the Japanese language


pTeX, from ASCII Corporation, is a multibyte extension of TeX, tuned to meet the Japanese publisher's typesetting needs.

For Windows, use Akira Kakuto's W32TeX packages (see my installation guide in Japanese).

For Linux/*BSD/Mac OS X, it's easier to make world from source code.

For details, please refer to my pTeX and Japanese typesetting page (still incomplete).


See The CJK package for LaTeX by Werner Lemberg.



Developed by John Plaice and Yannis Haralambous, Omega extends TeX for 16-bit Unicode character set. Currently the Omega Project page is in trouble; CTAN:systems/omega is out of date. The newest version seem to be ``Omega (Web2C 7.4.5) 3.14159-'' included in teTeX 2.0.2. 1.23.4 archived at http://omega.enstb.org/distrib/.

Lambda is LaTeX on Omega.

With some tweaking Omega/Lamda can typeset Japanese. Omega-J and other projects used freely available Japanese fonts converted to bitmaps, but those were less than satisfactory.

I recommend using dvipdfmx which converts DVI to PDF, either with or without Japanese fonts embedded, If you don't have Japanese fonts, you can still create Japanese PDFs that can be viewed/printed with freely-available Adobe Reader, which downloads the necessary Japanese fonts on demand. These Adobe fonts are of very good quality. Also note that for professional typesetting you need at least two fonts: mincho (明朝 -- serif) and gothic (ゴシック -- sans serif, usually thicker).

Detailed Steps
Download Adobe Reader 7. Open any Japanese PDF document. You'll see a message: "Missing Component Found: Adobe Reader has found component LangPkg/Japn: and its size is 9.73MB. Do you want to proceed with the download of this component?". Then click "OK". After the installation is done, look into the directory C:\Program Files\Adobe\Acrobat 7.0\Resource\CIDFont. There you'll find KozMinProVI-Regular.otf (小塚明朝) and KozGoPro-Medium.otf (小塚ゴシック).

Adobe Reader 6/7 is not yet available on Linux. For Acrobat Reader 5, get the Asian font packs from Adobe. The Japanese font pack for Acrobat Reader 5 only includes KozMinPro-Regular-Acro.otf (小塚明朝), but no gothic fonts. Look for HeiseiKakuGo-W5-Acro (平成角ゴシック) included in the Japanese font pack of Acrobat Reader 4, and put it into where KozMinPro-Regular-Acro.otf is (e.g. /usr/local/Acrobat5/Resource/Font/). Note that Acrobat Reader 5 has a bug in printing Japanese documents with Ghostscript. Either use Acrobat Reader 4 for printing, or use Koji Nakamaru's acrolpr.pl filter.

Install dvipdfmx

Obtain and install dvipdfmx. Windows and Mac OS X binaries are available.

If you have compiled teTeX, and want to compile the current snapshot of dvipdfmx yourself, then do as follows:

tar xvzf dvipdfmx-YYYYMMDD.tar.gz
cd dvipdfmx-YYYYMMDD
./configure --prefix=/usr/local/teTeX --with-kpathsea=/usr/local/teTeX
make install

See if it works with the standard LaTeX:

latex hello       # hello.tex into hello.dvi
dvipdfmx hello    # hello.dvi into hello.pdf

Try some Japanese

Download the Omega font metric (OFM) omrml.ofm, make a copy of it by the name omgbm.ofm, and put the two OFMs in somewhere omega and lambda can read (e.g. texmf/fonts/ofm/public/japanese/).

Make sure texmf/dvipdfm/config/cid-x.map contains these lines:

omrml  UniJIS-UCS2-H  Ryumin-Light
omgbm  UniJIS-UCS2-H  GothicBBB-Medium

Here's a test document in utf-8:

% this is an example.
\InputTranslation currentfile \ORGin

\DeclareFontShape{OT1}{omjamc}{m}{n}{<-> s * [0.92469] omrml}{}
\DeclareFontShape{OT1}{omjamc}{bx}{n}{<-> s * [0.92469] omgbm}{}


Hello, Japanese!



Typeset it with lambda. Convert the DVI into PDF with dvipdfmx. You can view the PDF with Adobe Reader on any platform. The screenshot on the right is Acrobat Reader 5.x with Asian font packs on my Linux box.

Note: omrml.ofm is made from this omrml.opl, which is a modification of Hideyuki Suzuki's omrml.opl. The only difference is that he sets height : depth = 0.9 : 0.1, whereas I set height : depth = 0.88 : 0.12.

Improving the typesetting quality

You've seen that typesetting Japanese with Lambda is easy, but there are limitations with this simple method, though.

These rules can be implemented by OVF (Omega virtual fonts) and OFM (Omega font metrics). But for simplicity (and lack of experience on my part :-) I chose to use OTP (Omega translation processes).

Furthermore, \parindent should be one fullwidth, and \baselineskip should be wider.

% this is an example.
\ocplist\OCPjalist=\addbeforeocplist 1000 \OCPja\nullocplist
\InputTranslation currentfile \OCPutf


「何人ものニュートンがいた(There were several Newtons)」
(Newton was always ambivalent)」と語っている.


  \small 山本義隆『熱学思想の史的展開』(現代数学社,1987年)より


The line length must be an integral multiple of a fullwidth.

Burasage (hanging punctuations)

In traditional typesetting, Japanese periods and commas (,.、。) can protrude into the right margin. This practice is called burasage. Some widely used DTP systems including pTeX can't do it, and JIS X 4051:1995 doesn't mention it. Zoonekynd (see below) shows how to do it. Note that parentheses and other closing marks don't usualy protrude. In my openion, burasage is a good thing, but it is not a must, especially for TeX which doesn't hang Latin punctuations.

Using Cyberbit

Bitstream Cyberbit is a TrueType font, containing characters from many languages, encoded with Unicode. It can be obtained from ftp.netscape.com/pub/communicator/extras/fonts/windows/. Read the ReadMe.htm file first. Then download Cyberbit.zip. The Omega Font Metric file, cyberb.ofm, can be extracted or obtained elsewhere (e.g. here).

Put the TrueType font, cyberbit.ttf (renamed to lowercase, in accordance with the UNIX tradition), somewhere your TeX system can find. For example, the texmf.cnf file for teTeX 2.0 says: TTFONTS = .;$TEXMF/fonts/truetype// so you'll have to put it into $TEXMF/fonts/truetype/ or one of its subdirectories, or in the current directory. Similarly, put the ofm file appropriately, e.g. in $TEXMF/fonts/ofm/. You might need to invoke texhash or texmflsr.

For dvipdfmx, cid-x.map must contain a line like this:

cyberb Identity-H cyberbit/UCS

Here's your document (in utf-8):

% this is an example.
\InputTranslation currentfile \OCPutf

Hello, Omega! 日本語は難しい。


Run lambda, then dvipdfmx. The resulting PDF file should embed a subset of BitstreamCyberbit-Roman.

Japanese characters in Cyberbit are very slender, and doesn't look very great among Latin characters. I don't recommend using Cyberbit for professional Japanese typesetting.

Note that a Unicode point alone cannot determine a glyph, because CJK glyphs are `unified'. For example, the Unicode point U+9AA8 (`bone') corresponds to the glyphs shown in the figure. They are used in Japan, mainland China (Symplified Chinese), and Taiwan (Traditional Chinese), respectively. The respective fonts are HiraMinPro (ヒラギノ明朝 Pro), STSong (华文宋体 (華文宋体)), and LiSong Pro (儷宋 Pro). Japanese and Symplified Chinese glyphs are almost right-left symmetric to each other, and cannot be used interchangeably. For us, one font (such as Cyberbit) is not enough.

[Note: In HTML we can write <span lang="ja">骨</span> for , and <span lang="zh">骨</span> for , but cannot distinguish simplified and traditional Chinese characters.]

Other multi-language Unicode fonts are STSong (Mac OS X 10.2 and later) and Arial (Windows/Office 2000 and later).

Editors that can handle utf-8


Other References

Haruhiko Okumura

Last modified: 2004-12-26 14:00:50