Linux command
pdflatex 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Compile LaTeX to PDF
pdflatex [document.tex]
Compile in non-stop mode
pdflatex -interaction=nonstopmode [document.tex]
Compile with shell escape
pdflatex -shell-escape [document.tex]
Output to specific directory
pdflatex -output-directory=[outdir] [document.tex]
Specify output name
pdflatex -jobname=[output] [document.tex]
说明
pdflatex compiles LaTeX documents directly to PDF format. It's part of TeX Live and MiKTeX distributions, and the most common way to produce PDFs from LaTeX source. The tool processes .tex files, handling typesetting, cross-references, and including graphics. Multiple runs may be needed for complete document processing.
参数
- -interaction= _mode_
- Interaction mode (batchmode, nonstopmode, scrollmode, errorstopmode).
- -output-directory= _dir_
- Output directory.
- -jobname= _name_
- Set output name.
- -shell-escape
- Enable shell commands.
- -halt-on-error
- Stop at first error.
- -file-line-error
- Show file:line:error format.
- -synctex= _n_
- Generate SyncTeX data (1 enables, -1 compressed).
- -draftmode
- Skip writing the final PDF output (for faster compilation checks).
- -no-shell-escape
- Disable execution of shell commands (default).
- -shell-restricted
- Allow only a restricted set of shell commands.
- -recorder
- Enable filename recording (writes .fls file).
- -fmt= _name_
- Use the specified format file.
- -output-format= _fmt_
- Output format: pdf (default) or dvi.
- --help
- Show usage information and exit.
- --version
- Show version information and exit.
FAQ
What is the pdflatex command used for?
pdflatex compiles LaTeX documents directly to PDF format. It's part of TeX Live and MiKTeX distributions, and the most common way to produce PDFs from LaTeX source. The tool processes .tex files, handling typesetting, cross-references, and including graphics. Multiple runs may be needed for complete document processing.
How do I run a basic pdflatex example?
Run `pdflatex [document.tex]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -interaction= _mode_ do in pdflatex?
Interaction mode (batchmode, nonstopmode, scrollmode, errorstopmode).