LaTeX + AI

LaTeX + AI

Project overview

This projects uses AI agents, and subagents running in parallel, in VS Code to automate and streamline technical document creation, via the powerful markup language LaTeX ("lay-tek"). Whether you want to have your own content reformatted, or have AI help write the content, using LaTeX means no document conversions, manual formatting, or copy/paste, since the AI can work natively.

Project type

Agentic AI

Year

2026

My role

Personal project

Client

N/A

Tools used

Visual Studio Code, Git for version control, and ChatGPT or Gemini via API keys in the VS Code agents window.

What can it do?

Agents are systems that autonomously plan and execute tasks. In this pipeline we can make it as "agentic" as we want. Let's say we use the Plan Agent, and have an assets/ folder in our environment. We want the AI to take all of the content in it and compile a professional report.

The Plan Agent would begin by researching the task, ask clarifying questions, then draft an implementation plan. You can iterate with it collaboratively for as many rounds as necessary. Once approved, it would create a task plan and delegate work to subagents, such as one to extract and classify asset contents, another to organize them into a logical outline, another to synthesize and write report sections, and another to generate the required LaTeX structure, figures, tables, citations, and formatting. Once these tasks complete, the Plan Agent would merge the outputs, resolve inconsistencies, and compile the document.

Why LaTeX?

LLMs are text prediction machines, and therefore output raw text. In a typical chat window, we've solved this by having certain symbols mean something. When Claude types bold text, it's using Markdown and actually typing **bold text** but your browser renders it for you. This would be a markup language: a system that uses annotations, tags, or codes to define the structure, formatting, or meaning of content. Change what those symbols do, and you change every instance of them.

LaTeX is just a markup language that has a LOT of control over document structure. For instance, let's say you want to change the entire look of your 200 page report. That's defined in the \documentclass[text size, columns, paper size]. Change one line of text, and it handles updating everything for you instantly, because text isn't assigned its own unique formatting. Citations, hyperlinks, etc. are all variables with values assigned.