Linux command
tectonic 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Compile LaTeX document
tectonic [document.tex]
Compile with output directory
tectonic -o [output/] [document.tex]
Compile with synctex
tectonic --synctex [document.tex]
Keep intermediate files
tectonic --keep-intermediates [document.tex]
Print mode
tectonic --only-cached [document.tex]
Watch mode
tectonic --watch [document.tex]
Use bundle
tectonic -b [bundle.tar] [document.tex]
Build document
tectonic -X build
Create new document
tectonic -X new [project_name]
Compile freestanding document
tectonic -X compile [document.tex]
说明
tectonic is a modernized, self-contained LaTeX engine that automatically downloads packages, runs the correct number of compilation passes, and produces reproducible output. Unlike traditional TeX distributions, it requires no separate TeX Live installation — missing packages are fetched from the network on demand. The engine automatically handles the multiple compilation passes that LaTeX typically requires for resolving references, tables of contents, bibliographies, and cross-references. Watch mode (--watch) recompiles whenever source files change, providing live preview when paired with a PDF viewer. Tectonic uses bundles — self-contained package collections — to ensure reproducible builds where the same input always produces identical output. The --only-cached flag enables offline compilation using previously downloaded packages. The V2 CLI (activated with -X) provides a cargo-like interface anchored around a Tectonic.toml file. Use `tectonic -X build` for project builds and `tectonic -X compile` for freestanding documents. This approach makes Tectonic well-suited for CI/CD pipelines and collaborative writing projects under version control.
参数
- -o _DIR_
- Output directory.
- --synctex
- Generate SyncTeX data.
- --keep-intermediates
- Keep .aux, .log, etc.
- --keep-logs
- Keep log files.
- --only-cached
- Don't download packages.
- --watch, -w
- Watch and recompile.
- -b _FILE_
- Use bundle file.
- Print mode (PDF to stdout).
- --format _FMT_
- Output format.
- --untrusted
- Disable shell-escape.
- -c _FILE_
- Config file.
- -h, --help
- Show help.
- -X _SUBCOMMAND_
- Activate V2 CLI (build, compile, new, init, dump, show, watch).
FAQ
What is the tectonic command used for?
tectonic is a modernized, self-contained LaTeX engine that automatically downloads packages, runs the correct number of compilation passes, and produces reproducible output. Unlike traditional TeX distributions, it requires no separate TeX Live installation — missing packages are fetched from the network on demand. The engine automatically handles the multiple compilation passes that LaTeX typically requires for resolving references, tables of contents, bibliographies, and cross-references. Watch mode (--watch) recompiles whenever source files change, providing live preview when paired with a PDF viewer. Tectonic uses bundles — self-contained package collections — to ensure reproducible builds where the same input always produces identical output. The --only-cached flag enables offline compilation using previously downloaded packages. The V2 CLI (activated with -X) provides a cargo-like interface anchored around a Tectonic.toml file. Use `tectonic -X build` for project builds and `tectonic -X compile` for freestanding documents. This approach makes Tectonic well-suited for CI/CD pipelines and collaborative writing projects under version control.
How do I run a basic tectonic example?
Run `tectonic [document.tex]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o _DIR_ do in tectonic?
Output directory.