Linux command
tex 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Compile document
tex [document.tex]
Compile with jobname
tex -jobname=[output] [document.tex]
Interaction mode
tex -interaction=nonstopmode [document.tex]
Initialize format
tex -ini [format.tex]
说明
tex is the original TeX typesetting engine created by Donald Knuth. It reads plain TeX source files and produces DVI (Device Independent) output, which can then be converted to PostScript, PDF, or other formats using tools like dvips or dvipdfm. TeX uses the plain TeX macro format by default, which provides basic typesetting commands without the higher-level abstractions of LaTeX. It excels at mathematical typesetting, producing publication-quality output for equations, formulas, and technical documents. TeX serves as the foundation upon which LaTeX, ConTeXt, and other macro packages are built.
参数
- -interaction _MODE_
- Set interaction mode: batchmode, nonstopmode, scrollmode, or errorstopmode.
- -jobname _NAME_
- Set the job name instead of deriving it from the input file name.
- -ini
- Start in INI mode for dumping formats; no format is preloaded.
- -output-directory _DIR_
- Write output files in DIR instead of the current directory.
- -halt-on-error
- Stop processing at the first error.
- -file-line-error
- Print error messages in file:line:error format.
- -recorder
- Enable the filename recorder, creating a .fls file listing opened files.
- -fmt _NAME_
- Use NAME as the format instead of the default.
FAQ
What is the tex command used for?
tex is the original TeX typesetting engine created by Donald Knuth. It reads plain TeX source files and produces DVI (Device Independent) output, which can then be converted to PostScript, PDF, or other formats using tools like dvips or dvipdfm. TeX uses the plain TeX macro format by default, which provides basic typesetting commands without the higher-level abstractions of LaTeX. It excels at mathematical typesetting, producing publication-quality output for equations, formulas, and technical documents. TeX serves as the foundation upon which LaTeX, ConTeXt, and other macro packages are built.
How do I run a basic tex example?
Run `tex [document.tex]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -interaction _MODE_ do in tex?
Set interaction mode: batchmode, nonstopmode, scrollmode, or errorstopmode.