FerroTeX: The Scientific LaTeX Compiler Platform

April 9, 2026 ยท View on GitHub

CI Open VSX License Powered by Rust

FerroTeX is a high-fidelity, research-grade LaTeX language platform designed for precision, reproducibility, and deep observability. Built entirely in Rust ๐Ÿฆ€, it provides a modular ecosystem for modern scientific typesetting.


๐Ÿ—๏ธ Architecture & Ecosystem

FerroTeX is designed as a modular set of components rather than a monolithic extension.

graph TD
    A[Editors / CLI] -->|LSP/DAP| B[ferrotexd]
    B --> C[ferrotex-analysis]
    B --> D[ferrotex-dap]
    C --> E[ferrotex-syntax]
    D --> F[Tectonic / TeX Engine]
    B --> G[ferrotex-build]
    G --> H[ferrotex.lock]

Core Crates

  • ferrotex-syntax: Lossless, fault-tolerant parser using rowan. Preserves 100% of source fidelity including trivia.
  • ferrotex-analysis: Semantic engine for LaTeX. Implements context-aware completion and jaggy matrix detection.
  • ferrotex-build: DAG-based build graph with content-addressable reproducibility (SHA256).
  • ferrotex-dap: Debug Adapter Protocol implementation for stepping through TeX passes and register inspection.

๐Ÿ’Ž Technical Pillars

1. Scientific Reproducibility

FerroTeX introduces the concept of a Hermetic Build to the TeX world.

  • ferrotex.lock: Captures SHA256 hashes of all inputs, including system packages and local includes.
  • Content-Addressing: Ensures that your paper builds identically across machines and time.

2. Deep Semantic Intelligence

Unlike traditional matchers, FerroTeX performs structural analysis of the Document Object Model (DOM).

  • Matrix Dimension Tracking: Detects mismatched ampersands & in complex environments like matrix or aligned, even when using \multicolumn.
  • Macro Expansion Analysis: Uses abstract interpretation to prevent recursion loops and verify macro safety.
  • Deprecated-Command Diagnostics: Real-time warning diagnostics for LaTeX 2.09 font commands (\bf, \it, \rm, etc.), $$...$$ display math, and obsolete packages (times, a4wide). Each diagnostic carries a one-click quick-fix code action.
  • BibLaTeX Support: \addbibresource is indexed identically to \bibliography; \RequirePackage is scanned alongside \usepackage.

3. Professional Observability (DAP)

Debug your TeX source like code. The integrated Debug Adapter Protocol (DAP) shim allows:

  • Pass-Level Stepping: Pause on macro expansion or file inclusion.
  • Register Shadowing: Real-time inspection of \count, \dimen, and \skip registers.

๐Ÿš€ Status: v0.24.0 (The "Diagnostic Completeness" Update)

FerroTeX v0.24.0 closes the gap between the static analysis already present in the workspace index and what is surfaced through LSP. Deprecated LaTeX 2.09 font commands, obsolete $$ display math, and obsolete packages now produce live warning diagnostics with quick-fix code actions โ€” no rebuild required.

Performance (M1 Max / Linux x64)

  • Syntax Indexing: ~1.8ms per 10k LOC.
  • LSP Startup: <45ms.
  • Log Streaming: Zero-allocation parsing at >60 MB/s.

Platform Support

PlatformBinary BundledSupport Status
Linux (x64)โœ…Production Ready
macOS (Silicon/Intel)โœ…Production Ready
Windows (x64)โœ…Production Ready

๐Ÿ› ๏ธ Developer Setup

Requires Rust 1.70+.

# Clone and build
git clone https://github.com/jxoesneon/FerroTeX
cd FerroTeX
cargo build --release

# Run CLI parse on a log file
./target/release/ferrotex parse main.log

๐Ÿค Contributing & Community

We are building a robust toolchain for the future of scientific publishing.

๐Ÿ“„ License

Licensed under the Apache License, Version 2.0. See LICENSE for details.


Built with โค๏ธ by the FerroTeX Contributors.