TeX’s intermediate formats — DVI, PostScript (PS), and PDF — connect through a small set of converters. Knowing the chain lets you get from any starting point to the format you need. This page maps the routes (tool details are in “DVI converters” and “Producing PDF”).
The conversion map
latex and the Japanese (u)platex emit DVI. From there you convert as needed — DVI→PS with dvips, PS→PDF with ps2pdf (Ghostscript), and DVI→PDF with dvipdfmx. Meanwhile, pdflatex / lualatex / xelatex emit PDF directly, skipping DVI.
| Conversion | Tool |
|---|---|
.tex → DVI | latex / (u)platex |
DVI → PS | dvips |
PS → PDF | ps2pdf (Ghostscript) |
DVI → PDF | dvipdfmx |
.tex → PDF(直接) | pdflatex / lualatex / xelatex |
The two common routes
The direct route is one step with pdflatex and friends (Western text, fast). The DVI route is latex/(u)platex → DVI → dvipdfmx → PDF (Japanese, EPS, PSTricks). For print workflows or EPS, the PostScript detour dvips → ps2pdf is also used.
terminal
# 直接 / direct
pdflatex doc.tex # → doc.pdf
# DVI 経由(日本語など)/ via DVI
uplatex doc.tex && dvipdfmx doc # → doc.pdf
# PostScript 経由 / via PostScript
latex doc.tex && dvips doc && ps2pdf doc.ps # → doc.pdfWhen to use which route
- PDF directly →
pdflatex/lualatex/xelatex. - Japanese →
(u)platex→dvipdfmx. - Print submission, EPS, PSTricks →
latex→dvips→ps2pdf. - In practice you do not type these by hand —
latexmkand friends automate the route (see “Build tools”).