pLaTeX online
Compile pLaTeX online in your browser: the classic Japanese LaTeX, platex to DVI and dvipdfmx to PDF, with nothing to install.
Open in LaTeX.to Download the example (zip)
- Maintained, 1987
- Magic comment:
% !TeX program = platexon the first line of main.tex, which is how the example picks it under Auto. - License: Public domain, use freely.
- Files:
main.tex
% !TeX program = platex \documentclass[11pt]{jarticle} \title{pLaTeX で組む日本語} \author{日本語 \TeX の定番} \date{\today} \begin{document} \maketitle \section{はじめに} pLaTeX は、日本語を美しく組版するための古典的な \TeX システムです。 This document is typeset with pLaTeX, the classic engine for Japanese TeX. 内部では latex で DVI を作り、それを dvipdfmx で PDF に変換しています。 \section{和文組版の基本} pLaTeX は JIS X 0208 の文字集合をもとに、全角の文字を正しい幅で並べます。 句読点や括弧のまわりには自動的に適切なアキ(空白)が入り、行頭に句点や 閉じ括弧が来ないように禁則処理が働きます。特別な設定をしなくても、段落は 自然で読みやすく仕上がります。 \section{和欧混植} 日本語の文章のなかに英単語や数式を混ぜても、pLaTeX は和文と欧文のあいだに 適切なアキを入れて調整します。たとえば TeX や LaTeX という語、そして $E = mc^2$ のような数式も、まわりの日本語になじむように配置されます。 \section{まとめ} 長い歴史のなかで数多くの論文や書籍を支えてきた pLaTeX は、日本語組版の 定番として今も広く使われています。安定していて結果が予測しやすいことが、 その大きな理由です。 \end{document}
How to compile with pLaTeX on LaTeX.to
Everything runs in your browser: nothing to install, no login, no compile timeout.
- Click Open in LaTeX.to. The example opens as a project with main.tex in the editor and its finished PDF in the preview.
- Edit, then press Ctrl+Enter (Cmd+Enter on a Mac). The first compile downloads what this engine needs; after that a compile takes seconds.
What pLaTeX is
Ordinary TeX knows nothing about Japanese: that a full-width character is one em wide, that a line must not start with a closing bracket or a period, that a little space belongs between a kanji and a Latin word. pTeX, from ASCII Corporation in the late 1980s, built those rules into the engine, and pLaTeX is LaTeX on top of it (e-pTeX today). It writes a DVI file, and dvipdfmx turns that into the PDF with the Harano Aji Mincho and Gothic fonts embedded; on LaTeX.to that second step runs by itself.
The example on this page is a short jarticle document. Its punctuation sits at the right width, its lines break where Japanese lines break, and the mix of Japanese, English and a formula is spaced the way a typesetter would space it, with no package loaded.
When to use it
- A Japanese template or class handed to you:
jarticle,jreport,jbook, the verticaltarticlefamily, orjsarticlewithout theuplatexoption. Auto recognises all of them. - Anything a Japanese university, journal or publisher expects, which is still mostly pLaTeX.
- Not for a new document. Start those on upLaTeX, which is the same engine rebuilt around Unicode.
pLaTeX vs upLaTeX vs the Unicode engines
- pLaTeX: works in JIS X 0208, about 7,000 characters. All of everyday Japanese, but not every kanji used in names and place names, and not text that mixes Japanese with, say, Vietnamese or Greek. Existing documents and templates are more often pLaTeX.
- upLaTeX: every rule of pTeX plus the whole of Unicode. The classes are the same with a
uin front (ujarticle) or a[uplatex]option onjsarticle. New documents should be upLaTeX. - LuaLaTeX with
luatexja: the other Unicode route, writes PDF directly and loads fonts by name. - XeLaTeX with
xeCJK: handles the fonts but knows less about Japanese line breaking. - The
bxjsarticleclass compiles the same source on all of them.
More engines: upLaTeX and all engines.