LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

tectonic

Modernized self-contained LaTeX engine

TLDR

Compile LaTeX document
$ tectonic [document.tex]
copy
Compile with output directory
$ tectonic -o [output/] [document.tex]
copy
Compile with synctex
$ tectonic --synctex [document.tex]
copy
Keep intermediate files
$ tectonic --keep-intermediates [document.tex]
copy
Print mode (no network)
$ tectonic --only-cached [document.tex]
copy
Watch mode (V1 CLI)
$ tectonic --watch [document.tex]
copy
Use bundle
$ tectonic -b [bundle.tar] [document.tex]
copy
Build document using V2 CLI (with Tectonic.toml)
$ tectonic -X build
copy
Create new document workspace
$ tectonic -X new [project_name]
copy
Compile freestanding document (V2 CLI)
$ tectonic -X compile [document.tex]
copy

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.

SEE ALSO

pdflatex(1), xelatex(1), lualatex(1), latexmk(1)

Copied to clipboard
Kai