\usecases{FormaTeX}
What will you build?
FormaTeX is a LaTeX compilation API. Any stack that can make an HTTP request can generate production-quality PDFs. Here are the most common patterns.
\input{ai-pipelines}
AI & LLM pipelines
LLMs write LaTeX. FormaTeX compiles it.
Chain any LLM with FormaTeX and you have a pipeline that goes from a natural-language prompt to a typeset PDF — no local TeX installation, no infrastructure. Works with Claude, OpenAI, Gemini, Groq, or any model that outputs text. The MCP server lets Claude Code compile LaTeX directly inside an AI chat without writing any code at all.
// Generate LaTeX with any LLM, compile with FormaTeX
const latex = await anthropic.messages.create({
model: "claude-opus-4-6",
messages: [{ role: "user", content: "Write a project summary as a LaTeX document" }],
}).then(r => r.content[0].text);
const pdf = await fetch("https://api.formatex.io/api/v1/compile/sync", {
method: "POST",
headers: {
"X-API-Key": process.env.FORMATEX_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ latex, engine: "pdflatex" }),
});
// Binary PDF in response body — pipe directly to storage or user
await writeFile("output.pdf", Buffer.from(await pdf.arrayBuffer()));\input{automation}
Document automation
Invoices, contracts, certificates — at API speed.
Define a LaTeX template once, expose a JSON endpoint, and let your backend generate PDFs on demand. The templates API accepts {{variable}} placeholders — callers POST plain JSON and receive a compiled PDF. Scale to thousands of documents per hour using the async queue. No PDF library quirks, no rendering drift between runs.
Dear ...
\input{edtech}
EdTech & scientific platforms
Math typesetting that actually works.
Render math-heavy exams, worksheets, lecture notes, and research papers server-side. amsmath, TikZ, pgfplots, bibliography management — all supported. No client-side rendering, no MathJax inconsistencies. A compile call returns a PDF that prints identically every time, across every device.
Calculus II — Final Examination
University of Sciences · Spring 2026 · 90 minutes
∫ab f (x) dx = F(b) − F(a)
Fundamental Theorem of Calculus
Let f(x) = x² + 3x − 2. Find all critical points and classify each.
Evaluate the definite integral using the Fundamental Theorem of Calculus.
Prove that lim(x→∞) of 1/x = 0 using the ε-δ definition.
\input{ci-cd}
GitHub Actions & CI/CD
PDF artifacts from your LaTeX source. On every push.
Compile LaTeX in any CI pipeline with a single API call — no TeX Live installation, no Docker image maintenance. Use the async endpoint for large documents, pipe the binary response to your artifact store, and attach the PDF to your release. Works in GitHub Actions, GitLab CI, CircleCI, or any shell that has curl.
name: Compile LaTeX to PDF
on: [push]
jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compile with FormaTeX
run: |
curl -X POST https://api.formatex.io/api/v1/compile/sync \
-H "X-API-Key: ${{ secrets.FORMATEX_API_KEY }}" \
-H "Content-Type: application/json" \
-d "{\"latex\": $(jq -Rs . < main.tex), \"engine\": \"latexmk\"}" \
--output thesis.pdf
- uses: actions/upload-artifact@v4
with:
name: thesis-pdf
path: thesis.pdf\input{mcp}
MCP / AI agent tools
Your AI agent compiles LaTeX natively.
FormaTeX ships a first-class MCP server. Add it to Claude Code, Cursor, Windsurf, or any MCP-compatible client and the AI gains direct access to a full LaTeX compilation stack — compile documents, fill templates, check syntax — all from within an AI conversation. No terminal switching, no context breaks. Available on all plans.
{
"mcpServers": {
"formatex": {
"command": "formatex-mcp",
"env": {
"FORMATEX_API_KEY": "fex_a8k2mP9..."
}
}
}
}Claude can now compile documents, fill templates, check syntax — all from chat. Works with Claude Code, Cursor, VS Code, Windsurf, Cline, and any MCP client.
\input{resume}
Resume & CV builders
LaTeX quality. SaaS reliability.
LaTeX produces the finest typographic output for resumes and CVs — and FormaTeX makes it an API call. Accept user input, inject it into a LaTeX template, compile with xelatex, and return a pixel-perfect PDF. No local TeX, no per-server setup. The templates API handles variable substitution — you call the endpoint and pipe the binary response back.
Jane Doe
jane@doe.dev · London, UK · github.com/janedoe
Experience
Senior Engineer
2023 – present
Acme Corp · London
Software Engineer
2021 – 2023
Meridian Labs · Remote
Skills
\subsection{Also used for}
More patterns
Financial reports
Quarterly reports and prospectuses where layout precision is non-negotiable.
Academic journals
Paper formatting for arXiv, IEEE, ACM, and institutional repositories.
Certificate generation
Diploma systems with custom typography and institutional branding.
Technical docs
Generate versioned PDF docs from source — auto-built on every release.
Legal documents
Contracts and term sheets where consistent formatting matters.
Book publishing
Chapter-by-chapter LaTeX to final PDF with TOC, bibliography, cross-refs.
Arabic & multilingual docs
RTL languages, bidirectional text, and Unicode fonts via XeLaTeX and polyglossia.
