Linux command
lualatex 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Compile LaTeX document
lualatex [document.tex]
Compile to specified output directory
lualatex -output-directory=[output/] [document.tex]
Compile in draft mode
lualatex -draftmode [document.tex]
Compile with shell escape
lualatex -shell-escape [document.tex]
Compile with interaction mode
lualatex -interaction=[nonstopmode] [document.tex]
Compile with job name
lualatex -jobname=[output] [document.tex]
Show version
lualatex --version
说明
lualatex is a TeX engine that combines LaTeX with the Lua programming language. It compiles LaTeX documents while allowing Lua scripting within the document. Lua integration enables dynamic content generation, complex calculations, and programmatic document manipulation. The fontspec package works seamlessly for OpenType and TrueType font handling. Unlike pdflatex, lualatex uses UTF-8 natively without additional packages. It can access system fonts directly, making font management simpler. Multiple compilation passes may be needed for documents with cross-references, tables of contents, or bibliographies. Tools like latexmk automate this process. Shell escape mode allows external program execution, needed by packages like minted for code highlighting. Use with caution on untrusted documents.
参数
- -output-directory=_DIR_
- Write output files to directory.
- -jobname=_NAME_
- Set output file base name.
- -interaction=_MODE_
- Set interaction mode (batchmode, nonstopmode, scrollmode, errorstopmode).
- -shell-escape
- Enable \\write18 shell commands.
- -no-shell-escape
- Disable shell commands.
- -draftmode
- Run without output, for syntax checking.
- -halt-on-error
- Stop at first error.
- -file-line-error
- Show file:line:error format.
- -synctex=_N_
- Generate SyncTeX data for editor integration.
- -fmt=_FORMAT_
- Use specified format file.
- --version
- Print version information.
- --help
- Show help.
FAQ
What is the lualatex command used for?
lualatex is a TeX engine that combines LaTeX with the Lua programming language. It compiles LaTeX documents while allowing Lua scripting within the document. Lua integration enables dynamic content generation, complex calculations, and programmatic document manipulation. The fontspec package works seamlessly for OpenType and TrueType font handling. Unlike pdflatex, lualatex uses UTF-8 natively without additional packages. It can access system fonts directly, making font management simpler. Multiple compilation passes may be needed for documents with cross-references, tables of contents, or bibliographies. Tools like latexmk automate this process. Shell escape mode allows external program execution, needed by packages like minted for code highlighting. Use with caution on untrusted documents.
How do I run a basic lualatex example?
Run `lualatex [document.tex]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -output-directory=_DIR_ do in lualatex?
Write output files to directory.