← 返回命令列表

Linux command

latex 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Compile LaTeX document

latex [document.tex]

Compile to PDF directly

pdflatex [document.tex]

Compile with XeLaTeX

xelatex [document.tex]

Compile with LuaLaTeX

lualatex [document.tex]

Continuous compilation

latexmk -pvc [document.tex]

Clean auxiliary files

latexmk -c

说明

LaTeX is a document preparation system for high-quality typesetting. It's the standard for scientific papers, theses, and technical documentation. Common engines: pdflatex (traditional), xelatex (Unicode/modern fonts), lualatex (Lua scripting). Most documents use pdflatex or lualatex.

参数

-interaction _mode_
Interaction mode: nonstopmode, batchmode.
-output-directory _dir_
Output directory.
-shell-escape
Enable shell commands.
-synctex _n_
Generate SyncTeX data.
-halt-on-error
Stop on first error.

FAQ

What is the latex command used for?

LaTeX is a document preparation system for high-quality typesetting. It's the standard for scientific papers, theses, and technical documentation. Common engines: pdflatex (traditional), xelatex (Unicode/modern fonts), lualatex (Lua scripting). Most documents use pdflatex or lualatex.

How do I run a basic latex example?

Run `latex [document.tex]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -interaction _mode_ do in latex?

Interaction mode: nonstopmode, batchmode.