TeX was built for Western text, so setting Japanese well needs dedicated extensions. History left several families to choose from, but the short answer is: for new work, use LuaLaTeX, save your source as UTF-8, and use the jlreq class. This page explains why Japanese is special and which family to pick.
Why Japanese needs special handling
The original TeX could address only 256 characters per font (128 in its earliest days). Fitting the thousands of Japanese characters in meant tricks such as splitting a font into 256-glyph sub-fonts — which is exactly why Japanese-capable engines were created.
The typesetting rules differ, too. Japanese needs kinsoku — keeping punctuation, closing brackets, and the middle dot off the start of a line, and opening brackets off the end of a line — plus a measured gap between Japanese and Western text (\xkanjiskip), full-width metrics and punctuation spacing, and even vertical writing. The pTeX family handles all of this by scoring each candidate break (so many penalty points if this character lands at a line start or end, and so on) and choosing the layout that minimizes the total penalty.
The Japanese engine families
Serious Japanese support began with pTeX, an engine from the former ASCII Corporation. Takuji Tanaka then extended it to Unicode Japanese as upTeX. Putting LaTeX on top of these gives pLaTeX / upLaTeX, which both use the traditional route — produce a DVI file, then convert it to PDF with dvipdfmx (today maintained by the Japanese TeX Development Community).
Modern engines that spread internationally can now handle Japanese too. The main one is LuaLaTeX + luatexja, which ports pTeX’s typesetting to LuaLaTeX, uses Lua scripting and OpenType/TrueType fonts directly, and outputs PDF without DVI. XeLaTeX uses xeCJK, and even pdfLaTeX can set basic Japanese with the CJK (CJKutf8) package.
| Engine | Class / package | Notes |
|---|---|---|
upLaTeX / pLaTeX | jsarticle, jlreq | Via DVI; vertical writing; traditional; often required by journals |
LuaLaTeX | ltjsarticle, jlreq + luatexja | Direct PDF, system fonts, Unicode. Best default for new work |
XeLaTeX | xeCJK + bxjsarticle, etc. | Easy OpenType fonts |
pdfLaTeX | article + CJKutf8 | Minimal; wrap text in \begin{CJK}{UTF8}{min} |
Classes and packages
The most modern choice is the jlreq class. Designed around the “Requirements for Japanese Text Layout (JLReq),” it needs just \documentclass{jlreq} and runs on LuaLaTeX, pLaTeX, or upLaTeX alike (the engine is auto-detected, or you can pass platex/uplatex/lualatex as a class option).
\documentclass{jlreq} % LuaLaTeX / upLaTeX / pLaTeX で動く
\begin{document}
こんにちは、\LaTeX! これは日本語の組版です。
\end{document}In the traditional family, jsclasses (jsarticle, jsbook, for pLaTeX/upLaTeX) is standard, and ltjsclasses (ltjsarticle, etc.) is its LuaLaTeX counterpart. To change the Japanese fonts under LuaLaTeX, use luatexja-fontspec.
\usepackage{luatexja-fontspec}
\setmainjfont{Noto Serif CJK JP} % 明朝
\setsansjfont{Noto Sans CJK JP} % ゴシックCharacter encoding
Save your source as UTF-8 — that is the standard today. EUC-JP, Shift_JIS, and ISO-2022-JP were common in the past (converted with tools like nkf), but sticking to UTF-8 is the safe choice now. upTeX and LuaTeX are Unicode-native, and modern pLaTeX assumes UTF-8 input too. Watch out for mixed line endings (LF vs CRLF).
Which to choose
- Starting fresh? LuaLaTeX + jlreq (or ltjsarticle). System OpenType fonts, direct PDF, strong Unicode.
- Want speed or have existing assets? upLaTeX + jsarticle. Fast builds and a long track record for Japanese.
- If your venue mandates pLaTeX, follow it. Some journal classes assume pLaTeX.
- Mostly English with a little Japanese? XeLaTeX + xeCJK or pdfLaTeX + CJK can be enough.