tectonic
Modernized self-contained LaTeX engine
TLDR
SYNOPSIS
tectonic [-o dir] [--synctex] [--keep-intermediates] [options] file.tex
DESCRIPTION
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.
PARAMETERS
-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
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).
CAVEATS
Initial compilation downloads packages. Network required for new packages. Some exotic packages may be missing. Different from traditional TeX workflow.
HISTORY
Tectonic was created by Peter Williams starting around 2016. It builds on the XeTeX engine with modern tooling, addressing pain points of traditional TeX distributions.
