ltx treats LaTeX documents like modern software codebases, featuring incremental builds, automatic bibtex/biber resolution, and a tight write-compile-preview watch mode loop.
Architecture Layout
+-------------------------------------------------+
| ltx CLI |
+-------------------------------------------------+
|
v
+-------------------------------------------------+
| Dependency Graph Engine |
| - Scans src/main.tex |
| - Resolves \input / \include transitive trees |
+-------------------------------------------------+
|
v
+-------------------------------------------------+
| Compiler Orchestrator |
| - Executes pdflatex / xelatex / lualatex |
| - Runs biber / bibtex / makeindex |
| - Drives multi-pass loop until stability |
+-------------------------------------------------+
|
v
+-------------------------------------------------+
| Isolated Build Dir |
| - Keeps root clean |
| - Copies final PDF to build/ |
+-------------------------------------------------+Project Case Study & Features
Why ltx
Most LaTeX workflows are stitched together from shell scripts, latexmk, and muscle memory. ltx treats your document the way a modern build tool treats a codebase:
- Correct by construction — dependency-aware compilation means bibliographies, indices, and multi-pass cross-references resolve without manual re-runs.
- Fast — incremental builds, parallel auxiliary passes, and a Rust core mean large multi-file theses and papers compile in a fraction of the time.
- Predictable — one
ltx.tomldescribes your project; builds behave the same on your machine, your co-author's machine, and in CI.
Features
- 🚀 Incremental builds — only recompiles what changed, including transitive
\input/\includegraphs. - 🔁 Automatic multi-pass resolution — handles
biber/bibtex,makeindex, and repeated engine passes until the document is stable. - 👀 Watch mode — rebuilds on save for a tight write–compile–preview loop.
- 🧹 Clean workspace — auxiliary files are isolated to a build directory, never scattered next to your
.texsources. - 🔌 Engine-agnostic — works with
pdflatex,xelatex, andlualatex.
Challenges & Obstacles
Parsing LaTeX source code files for active inputs, package imports, and bibliography references to construct a reliable, cyclic-free dependency graph. Ensuring compilation terminates correctly even when LaTeX throws errors or warnings.
Key Lessons Learned
Learned the details of LaTeX compiler engines (pdflatex, xelatex, lualatex) and auxiliary tool flows (biber, makeindex). Gained deeper experience in asynchronous process handling and file system monitoring in Rust.