The bin directory of TeX Live 2024 lists six commands — ptex, uptex, eptex, euptex, platex, uplatex — and ls -l shows every one of them to be a symlink to a single executable called euptex. The family of LaTeX engines built for Japanese — pTeX, upTeX, e-pTeX, e-upTeX — converged on one implementation over a quarter of a century. This page follows that convergence by reading the actual banners, logs, and measured values. The craft of vertical setting and line-breaking belongs to other pages; what this one owns is the engine itself.
Six commands, one executable
There is no executable named platex. In TeX Live 2024, platex is a symlink to euptex, and so are ptex, uptex, eptex, and uplatex. What differs is the format each one loads. A TeX-family program looks at the name it was invoked under and loads the format file (.fmt) of that name. The mapping lives in fmtutil.cnf, where two lines sit side by side: platex euptex language.dat *platex.ini and uplatex euptex language.dat *uplatex.ini. The second column is the engine, the fourth is the ini file used to dump that format. In other words, pLaTeX and upLaTeX are two different formats riding on one and the same engine, e-upTeX.
$ ls -l /usr/local/texlive/2024/bin/universal-darwin/ | grep -E "ptex|platex"
lrwxr-xr-x platex -> euptex
lrwxr-xr-x ptex -> euptex
lrwxr-xr-x uplatex -> euptex
lrwxr-xr-x uptex -> euptex
lrwxr-xr-x eptex -> euptex
-rwxr-xr-x euptex # the only real binary
$ grep -E "^(platex|uplatex|ptex|uptex|eptex) " texmf-dist/web2c/fmtutil.cnf
platex euptex language.dat *platex.ini
eptex euptex language.def *eptex.ini
ptex euptex - ptex.ini
uplatex euptex language.dat *uplatex.ini
uptex euptex - uptex.iniRun all six and keep only the first line, and the structure shows itself. The body of the banner is identical every time — This is e-upTeX, Version 3.141592653-p4.1.1-u1.30-230214-2.6 (TeX Live 2024) — and only the parenthesis changes: the platex side prints (utf8.euc), the uplatex side (utf8.uptex). That parenthesis names the internal Japanese encoding, and it is the only outward clue that separates the pTeX line from the upTeX line. People often ask why running platex prints “e-upTeX”; nothing is wrong — that is what a healthy installation looks like.
$ for c in ptex uptex eptex euptex platex uplatex; do
> printf "%s: " $c; echo "\\end" | $c | head -1
> done
ptex: This is e-upTeX, Version 3.141592653-p4.1.1-u1.30-230214-2.6 (utf8.euc) (TeX Live 2024) (preloaded format=ptex)
uptex: This is e-upTeX, Version 3.141592653-p4.1.1-u1.30-230214-2.6 (utf8.uptex) (TeX Live 2024) (preloaded format=uptex)
eptex: This is e-upTeX, Version 3.141592653-p4.1.1-u1.30-230214-2.6 (utf8.euc) (TeX Live 2024) (preloaded format=eptex)
platex: This is e-upTeX, Version 3.141592653-p4.1.1-u1.30-230214-2.6 (utf8.euc) (TeX Live 2024) (preloaded format=platex)
uplatex: This is e-upTeX, Version 3.141592653-p4.1.1-u1.30-230214-2.6 (utf8.uptex) (TeX Live 2024) (preloaded format=uplatex)What p4.1.1-u1.30-230214-2.6 in the banner means
That long run of digits is not one version number but four separate lineages spliced together. The leading 3.141592653 is bare TeX, p4.1.1 is pTeX, u1.30 is upTeX, 230214 is e-pTeX (a date), and the trailing 2.6 is e-TeX. This is not guesswork: the engine exposes each as a primitive, so you can read them out from inside a document with \the\ptexversion and friends. Once you can read that line, the question what is e-pTeX has a concrete answer — it is pTeX with the e-TeX extensions merged in, and the e-upTeX actually running here stacks upTeX on top of that, four layers deep.
% read the version primitives back out of the running engine
\typeout{PTEX=\the\ptexversion.\the\ptexminorversion\ptexrevision}
\typeout{UPTEX=\the\uptexversion\uptexrevision}
\typeout{EPTEX=\the\epTeXversion}
\typeout{ETEX=\the\eTeXversion\eTeXrevision}
% PTEX=4.1.1 UPTEX=1.30 EPTEX=230214 ETEX=2.6| Banner fragment | Where it comes from | How to read it back |
|---|---|---|
3.141592653 | Knuth’s bare TeX | the banner itself, not a primitive |
p4.1.1 | pTeX — the Japanese extensions from ASCII | \ptexversion, \ptexminorversion, \ptexrevision |
u1.30 | upTeX — the Unicode recasting | \uptexversion, \uptexrevision |
230214 | e-pTeX — a date used as the version | \epTeXversion |
2.6 | the e-TeX extensions | \eTeXversion, \eTeXrevision |
What pTeX built into the engine: writing direction and JFM
Two things forced pTeX to be a modification of the engine rather than a macro package: writing direction (\tate and \yoko) and JFM, the Japanese Font Metric. It was built at ASCII Corporation — the publisher known in Japan for its computer and game magazines — and the p stands for publishing: the goal was a Japanese TeX fit for commercial print. Writing direction sounds like a matter of which way the characters run, but inside TeX it is an event in which the meaning of a box’s dimensions swaps over. Measure it and the numbers say so outright.
Put the same three kana in an \hbox and compare its dimensions in horizontal and vertical mode. Horizontally the height is 8.46753pt and the depth 1.15465pt — the asymmetric shape of something sitting on a baseline, exactly as in Latin type. Vertically both height and depth become 4.8111pt: exactly half of the 9.6222pt full-width em, split evenly. In vertical setting the character does not rest on a baseline at all; it straddles the centre line of the column. Switching that interpretation of the dimensions inside the engine is the core of pTeX, and it is the part no macro package can imitate.
\documentclass{utarticle} % ut... = upLaTeX, vertical writing
\begin{document}
\setbox0=\hbox{あいう}
\typeout{TATE w=\the\wd0\space h=\the\ht0\space d=\the\dp0}
\yoko
\setbox0=\hbox{あいう}
\typeout{YOKO w=\the\wd0\space h=\the\ht0\space d=\the\dp0}
\end{document}
% TATE w=28.86658pt h=4.8111pt d=4.8111pt
% YOKO w=28.86658pt h=8.46753pt d=1.15465ptWhere the spacing lives: \kanjiskip and \xkanjiskip
Spacing between Japanese characters is not part of the glyph width; it enters as glue — stretchable, shrinkable space. The pTeX family keeps it in two registers: \kanjiskip between two Japanese characters, \xkanjiskip where Japanese meets Latin. Measured in ujarticle at a 10pt body, \kanjiskip is 0.0pt plus 0.4pt minus 0.5pt — zero natural width but elastic, so it becomes the slack the line-breaker plays with. \xkanjiskip is 2.40555pt plus 1.0pt minus 1.0pt, and that awkward-looking 2.40555 is exactly the 9.6222pt full-width em divided by four: a quarter-em. The traditional rule that a quarter of a space goes between Japanese text and a Latin word sits right there as a register default.
\documentclass{ujarticle}
\begin{document}
\typeout{KANJISKIP=\the\kanjiskip}
\typeout{XKANJISKIP=\the\xkanjiskip}
\setbox0=\hbox{あ}\typeout{EM=\the\wd0}
\setbox0=\hbox{あAい}\typeout{WITH=\the\wd0}
{\xkanjiskip=0pt \setbox0=\hbox{あAい}\typeout{WITHOUT=\the\wd0}}
\end{document}
% KANJISKIP=0.0pt plus 0.4pt minus 0.5pt
% XKANJISKIP=2.40555pt plus 1.0pt minus 1.0pt
% EM=9.6222pt WITH=31.5555pt WITHOUT=26.7444pt
% 31.5555 - 26.7444 = 4.8111 = 2 x 2.40555| Register | Value measured in TeX Live 2024 | What it governs |
|---|---|---|
\kanjiskip | 0.0pt plus 0.4pt minus 0.5pt | space between two Japanese characters; no natural width, pure elasticity |
\xkanjiskip | 2.40555pt plus 1.0pt minus 1.0pt | space where Japanese meets Latin; exactly a quarter of the 9.6222pt em |
\prebreakpenalty | 10000 for the ideographic comma | characters that must not begin a line; 10000 means never break |
\postbreakpenalty | 10000 for the opening corner bracket | characters that must not end a line; kinsoku is expressed as penalties |
\jcharwidowpenalty | 500 | discourages a paragraph ending with a single Japanese character on its own line |
The point worth carrying away is that kinsoku is not encoded as a rule but as a number. TeX breaks lines by summing costs over candidate break points and choosing the cheapest, so giving the comma a penalty of 10000 — the ceiling value — is all it takes to make “never start a line here” absolute. Turn the number down and the prohibition loosens. JFM, meanwhile, is a metric that records not only the width, height, and depth of each Japanese glyph but how much space belongs between which pair of characters, and that is where the tightening around punctuation and brackets comes from. How individual punctuation marks are tuned, and where \inhibitglue earns its keep, belong to the Japanese-typesetting pages.
The difference between pTeX and upTeX, decided by one character
The whole difference comes down to the character code used internally. pTeX works internally in EUC-JP or Shift_JIS, which effectively binds it to the kanji in the JIS standard. upTeX is Unicode inside, so no such fence exists. Abstract statements do not land, so try it with a single character — the “tall” variant of the surname character taka, 髙 (U+9AD9). Feed it to platex and the run stops with ! LaTeX Error: Unicode character ^^e9^^ab^^99 (U+9AD9) not set up for use with LaTeX. Hand the same character to uplatex (via \documentclass[uplatex]{jsarticle}) and it runs straight through to Output written on ... .dvi. When a document full of personal and place names suddenly fails under platex, this is almost always why.
$ platex kanji.tex # \documentclass{jsarticle} + 髙
! LaTeX Error: Unicode character ^^e9^^ab^^99 (U+9AD9)
not set up for use with LaTeX.
$ uplatex kanji2.tex # \documentclass[uplatex]{jsarticle} + 髙
Output written on kanji2.dvi (1 page, 304 bytes).upTeX has been developed since 2007 by Takuji Tanaka. The uplcore.ltx shipped with TeX Live still carries the line Copyright (c) 2016 Takuji Tanaka in its header, testifying to where this branch came from. The design idea that pays off most is \kcatcode, which lets you decide, range of characters by range of characters, whether something is treated as Japanese text or as Latin text. That is why upTeX can set not only Japanese but simplified and traditional Chinese and Korean Hangul in one and the same document — the description in tlmgr info uptex says outright that it processes the four scripts simultaneously. None of that was within reach in the pTeX era.
Where e-pTeX came from: a university coursework report
e-pTeX began as a coursework report that Hironori Kitagawa handed in for a university practical called Computational Mathematics II. It sounds unlikely, but the document still ships with TeX Live as eptex_resume.pdf — its cover reads “Computational Mathematics II, work log,” and the team name is epsilon. The same report notes that Akira Kakuto had run an experiment combining pTeX with e-TeX on 30 December 2007, calling the result peTeX, and remarks in passing that the reversed order of the p and the e is rather pleasing. The README of TeX Live’s ptex-manual bundle states that such older documents are included “for historical reasons only.” The founding paperwork of an engine that now compiles thousands of Japanese documents a day survives as a student submission.
What did the e-TeX extensions add? Integer arithmetic such as \numexpr, a \protected prefix that stops a macro from expanding where it should not, a far larger pool of registers, and the groundwork for bidirectional setting. Unglamorous — but a great many modern LaTeX packages are written on the assumption that these exist. So more and more of the Japanese ecosystem stopped working without e-TeX, and e-pTeX / e-upTeX became the default. Without \protected, a command placed inside a \section argument expands into the table of contents and breaks it; that is a daily occurrence, not a theoretical worry. The end point of that convergence is the view we started with: six commands, one euptex.
Who maintains all of this now
The Japanese TeX Development Community, usually written texjporg. The moment the work passed from a company to a community is stamped into the copyright notices themselves. The first two lines of plcore.ltx — the core of pLaTeX — as shipped in TeX Live 2024 read Copyright (c) 2010 ASCII MEDIA WORKS and Copyright (c) 2016-2020 Japanese TeX Development Community, followed by This file is part of the pLaTeX2e system (community edition). The upLaTeX counterpart, uplcore.ltx, lists three parties in the same place: ASCII MEDIA WORKS, Takuji Tanaka, and the Japanese TeX Development Community. Thirty years of Japanese TeX passing from a publisher to an individual to a community, folded into three comment lines.
Outside that line there is also pTeX-ng, whose command is named ApTeX, a reimplementation by Clerk Ma. It supports the e-TeX, pTeX, and upTeX primitives to stay compatible with e-upTeX while widening the internals to the whole of Unicode, and it embeds libdpx — dvipdfmx turned into a library — so that it emits PDF directly, without a DVI stage. To be straight about it, though: it is not in TeX Live 2024. tlmgr info ptex-ng answers cannot find package ptex-ng. (A trace of its existence does ship: the ctex package includes an engine definition file called ctex-engine-aptex.def.) The working default remains e-upTeX; pTeX-ng is something you install separately to experiment with.
| Engine | Internal character code | e-TeX | What it actually is in TeX Live 2024 |
|---|---|---|---|
pTeX | EUC-JP / Shift_JIS | no | no separate binary; ptex is a symlink to euptex |
upTeX | Unicode (UTF-8) | no | likewise; uptex is also a symlink to euptex |
e-pTeX | EUC-JP / Shift_JIS | yes | the eptex format; banner shows (utf8.euc) |
e-upTeX | Unicode (UTF-8) | yes | the one real binary; both platex and uplatex run on it |
pTeX-ng / ApTeX | Unicode (up to 0x10FFFF) | yes | not shipped; tlmgr info ptex-ng reports it cannot be found |
In practice: from uplatex through dvipdfmx to PDF
The pTeX family does not emit PDF. Its output is always DVI, which dvipdfmx then converts to PDF. That is the decisive difference from pdfTeX, XeTeX, and LuaTeX, which write PDF directly, and not knowing it is what leaves people stuck at “I ran uplatex and got no PDF.” The standard sequence is uplatex twice — so cross-references and the table of contents settle — then dvipdfmx once. Note that dvipdfmx is itself a symlink to xdvipdfmx in TeX Live, so ls -l will show a name you did not expect; that too is normal.
\documentclass{ujarticle} % uj... = upLaTeX, horizontal; ut... = vertical
\begin{document}
こんにちは、\LaTeX。日本語が美しく組めます。
\[ E = mc^2 \]
\end{document}$ uplatex document.tex # pass 1 -> document.dvi + document.aux
$ uplatex document.tex # pass 2 -> cross-references settle
$ dvipdfmx document.dvi # -> document.pdf- If no PDF appears, first check whether the
.dviexists. If it does, the fault is on thedvipdfmxside; if it does not, it is on theuplatexside. That single check halves the search space. - If the text comes out garbled, check in order that the source is saved as UTF-8 and that the class targets upLaTeX (
ujarticle/utarticle, or\documentclass[uplatex]{jsarticle}). On the engine side the switches are-kanji=STRING(input and output;euc|jis|sjis|utf8|uptex) and-kanji-internal=STRING(the internal code;euc|sjis|uptex). - When asking for help or filing a bug, always include three things: the command name (
platexoruplatex), the first banner line from the log, and the encoding the source was saved in. Whether the banner says(utf8.euc)or(utf8.uptex)settles half the question by itself. - Starting something new? Absent a required template, use UTF-8 source with
uplatex,dvipdfmx, andjlreqor the class your institution supplies. If an existing template assumesplatex, follow its build procedure rather than modernising it for fashion. - If you need free choice of fonts, do not force the pTeX route; consider LuaLaTeX with LuaTeX-ja or XeLaTeX with xeCJK, where system OpenType fonts can be named directly and PDF comes out in one step.
The decision folds up like this. For proven, fast, safe Japanese papers: e-upTeX (uplatex) → dvipdfmx. If you need system fonts or Lua-side extension: LuaLaTeX. If you already have XeTeX material: XeLaTeX with xeCJK. And it is worth not mistaking the age of the pTeX line for a defect. It was the decision to put vertical writing and JFM inside the engine, taken in the 1980s, that made commercial Japanese publishing possible in TeX at all. When you type uplatex today, what you start is the fortieth year of that decision.