SHAHRIAR LABSIntelligence in Motion
    Back to Blog
    AI SkillsJune 5, 2026

    latex-engineer: Automate LaTeX & PDF Generation

    latex-engineer is an AI skill that generates LaTeX projects, compiles PDFs, and auto-debugs TeX errors for coding agents — making LetX-quality output accessible anywhere.

    latex-engineer is an AI agent skill that generates LaTeX projects, compiles PDFs, and auto-debugs TeX errors — bringing LetX-quality LaTeX handling to any AI coding agent workflow. Built by Shahriar Labs, it closes the gap between "write some LaTeX" and "produce a compilable, well-formatted document."

    The LaTeX-AI Gap

    LaTeX is notoriously brittle. A missing end{document}, a misconfigured bibliography, or an undefined macro in a custom package — and compilation silently fails or produces corrupt output. AI agents without LaTeX specialization generate plausible-looking code that fails to compile in 30–40% of cases for complex documents.

    latex-engineer solves this with a compile-debug-fix loop: generate → compile → parse error output → fix → recompile. It handles the 20 most common TeX error classes automatically and escalates only genuine structural problems to the user.

    Supported Document Types

    • Research papers: IEEE, ACM, Elsevier, APA — correct class files, citation formatting, figure placement.
    • Theses/dissertations: Multi-chapter structures with front matter, chapter cross-references, bibliography per chapter or global.
    • CVs and resumes: moderncv, AltaCV, custom templates — compiles to clean, ATS-readable PDF.
    • Slides: Beamer presentations with themes, overlays, math-heavy content.
    • Math documents: Heavy amsmath, theorem/proof environments, commutative diagrams (tikz-cd).

    The LetX Connection

    latex-engineer and LetX are complementary. LetX is the human-facing collaborative editor — real-time sync, browser-based TeX Live compilation, CRDT conflict resolution for co-authors. latex-engineer is the agent-facing layer — it brings the same compilation quality to automated document generation workflows, CI-driven PDF generation, and agent-assisted academic writing pipelines.

    Frequently Asked Questions

    What is latex-engineer?
    An AI skill that generates LaTeX projects, compiles PDFs, and auto-debugs TeX errors without human intervention.
    What LaTeX tasks does it handle?
    Research papers (IEEE/ACM/APA), theses, CVs, Beamer slides, heavy math documents, bibliography management.
    How does it handle compilation errors?
    Parses compiler output, identifies error type, proposes fix, recompiles — iterates up to 5 times before escalating.
    How does it relate to LetX?
    latex-engineer is the agent skill layer; LetX is the human collaborative editor. Complementary, not competing.

    Written by Shihab Shahriar Antor — AI Engineer & Founder of Shahriar Labs. Building LetX, QuantumSketch, and open-source AI agent skills.