tectonic
Typeset documents using TeX and LaTeX
TLDR
Compile a standalone TeX/LaTeX file
Compile a standalone TeX/LaTeX file with synctex data
Initialize a tectonic project in the current directory
Initialize a tectonic project in the specified directory
Build the project in the current directory
Start a watcher to build the project in the current directory on change
SYNOPSIS
tectonic [OPTIONS]
PARAMETERS
-o, --outdir DIR
Specify the directory where output files (e.g., .pdf) should be placed. By default, output goes into the current directory.
-k, --keep-intermediates
Do not delete intermediate files (like .log, .aux, .dvi) after a successful build. Useful for debugging.
-p, --print-stdout
Print the primary output (e.g., the PDF file content) to standard output. Useful for piping results.
-r, --reruns N
Specify the maximum number of times to re-run LaTeX to resolve cross-references, tables of contents, etc. Defaults to a reasonable number.
--keep-logs
Always keep the .log file, even if --keep-intermediates is not specified.
--warnings-as-errors
Treat any compiler warnings as fatal errors, causing the build to fail.
-c, --chatter LEVEL
Control the verbosity of the output. LEVEL can be minimal, default, high, or diagnostic.
--only-cached
Only use locally cached assets and do not attempt to download any missing resources from the network.
--synctex
Generate SyncTeX data for forward/inverse search functionality with text editors.
--set-config KEY=VALUE
Set a specific configuration variable. For advanced customization.
--version
Print the version information of Tectonic.
--help
Display help message and exit.
DESCRIPTION
Tectonic is a modern, cross-platform, self-contained TeX/LaTeX typesetting engine designed for reproducibility and ease of deployment. Unlike traditional TeX distributions, Tectonic aims to provide a complete and isolated environment, bundling all necessary components like fonts and packages internally.
It addresses common issues with traditional TeX setups, such as large distribution sizes and difficulties in achieving consistent, reproducible outputs across different systems. Tectonic achieves this by leveraging a 'Web-friendly' approach, where it can fetch missing resources (like TeX packages or fonts) on demand from remote caches, minimizing its initial footprint. This makes it particularly well-suited for automated build systems, continuous integration pipelines, and web services that require efficient and reliable document compilation.
CAVEATS
Although powerful, Tectonic is not a full drop-in replacement for a complete TeX Live or MiKTeX installation for all highly specialized or legacy scenarios. It's opinionated about its internal asset management, which might differ from a system-wide TeX distribution. Network access is often required for the first build of a document if necessary packages are not already cached locally. As an actively developed project, certain features or behaviors might evolve.
REPRODUCIBLE BUILDS
A core philosophy of Tectonic is to produce bit-for-bit identical PDF output for the same LaTeX source, regardless of the system or time of compilation. This is crucial for scientific publishing, automated pipelines, and ensuring consistency.
SELF-CONTAINED NATURE
Tectonic aims to be a single binary that includes almost everything needed to compile LaTeX documents, including common fonts and packages. This reduces the need for large external TeX installations and simplifies deployment across various environments.
ON-DEMAND ASSET FETCHING
When a document requires a package or font not pre-bundled or locally cached, Tectonic can intelligently download it on the fly from a remote asset server (like the TeX Live archives). This 'pull-on-demand' model keeps the Tectonic binary relatively small while still providing access to a vast ecosystem of TeX resources.
HISTORY
Tectonic was initiated and is primarily maintained by the tectonic-typesetting open-source community, with significant contributions from Jonathan Kew (also known as pkgw). The project began with the goal of creating a modern, robust, and reproducible TeX engine that could overcome the challenges of traditional TeX distributions, particularly in automated and cloud environments. It is written in Rust and first gained public attention around 2017-2018, steadily growing its feature set and user base as a reliable alternative for efficient LaTeX compilation.