Documents your agent can write, check and typeset without TeX.
texwright turns Markdown, LaTeX or a JSON document tree into PDF or HTML with its own TeX-style engine. Equations, cross-references, citations, footnotes and figures come out the way LaTeX sets them. There is no TeX installation and no browser: it is one Node.js package with no dependencies, and a check that answers in milliseconds tells the agent what to fix and where.

Page 2 of the showcase, as texwright set it
Give it to your agent in one line.
Paste this into any coding agent. The guide it points to is written for models: the syntax, the check-fix-render loop and what each diagnostic means.
Read https://sophiaxt.com/texwright/AGENTS.md and use texwright to make PDFs from Markdown or LaTeX.
Install from this page
npm installs straight from the tarball here. Nothing to register, nothing else to download.
npm install -g https://sophiaxt.com/texwright/texwright-latest.tgz
texwright doc.md -o doc.pdf
Or unzip and run
The zip is the same package. Unzip it anywhere with Node.js 20 or later and run it in place.
node texwright/dist/src/cli.js doc.md -o doc.pdf
As an MCP server
Eight tools: render, check, fix, outline, preview a page as PNG, the schema, the guide, and new documents from templates.
{
"mcpServers": {
"texwright": { "command": "texwright", "args": ["mcp"] }
}
}SVG figures, drawn the way a browser draws them.
Agents make their figures as SVG: charts, diagrams, Mermaid and draw.io exports. texwright now draws gradients, transparency, masks, blend modes, filters, text on paths, HTML labels and full CSS selectors. Each pair below is Chrome on the left and texwright's PDF on the right, the PDF drawn by poppler.

Chrome

texwright PDF

Chrome

texwright PDF

Chrome

texwright PDF

Chrome

texwright PDF

Chrome

texwright PDF

Chrome

texwright PDF

Chrome

texwright PDF

Chrome

texwright PDF
Problems come back as data, with the fix attached.
doc.md:3:5 E REF001 Reference to undefined label "sec:intr" | Did you mean "sec:intro"? | fix "sec:intr" -> "sec:intro" safe
01 · Check
Every stage but page layout, in milliseconds. One line per problem, with a code, a position and a hint.
texwright check doc.md --diagnostics compact
02 · Fix
Most diagnostics carry their fix as an edit. The unambiguous ones apply in one go.
texwright check doc.md --fix
03 · Render
The result says which page each heading, figure and table landed on.
texwright doc.md -o doc.pdf
04 · Look
The page as a PNG from texwright's own rasterizer, so the agent can see what it made.
texwright preview doc.md --page 2
A paper, a homework set or a report, from plain text.


Mathematics by TeX's rules
amsmath and amssymb, numbered rows in align and gather, siunitx, mhchem and physics commands without loading anything.
References that resolve
Sections, figures, tables, equations, theorems and listings numbered, with @fig:x, \ref, \eqref, \cref and exact page references.
Citations
BibTeX or CSL-JSON, numeric or author-year.
Pages like LaTeX's
Knuth-Plass line breaking, TeX hyphenation, footnotes at the foot of the page, floating figures, Latin Modern type.
Three inputs, mixed freely
Markdown with pandoc's extensions, a LaTeX article subset, or a JSON document tree. LaTeX works inside Markdown.
Layout from the document
Paper, margins, size, theme, running heads and authors as pandoc's front-matter keys. No template to edit.
Tested on what models actually write.
We asked models for 80 documents (papers, homework, lecture notes, lab reports, CVs, letters, exams) written for pandoc or an ordinary LaTeX installation, then rendered them as they came. 79 render with no errors and no warnings. The one that does not draws its figure in TikZ. The method and the held-out results are in the paper.
What it does not do yet. TikZ and pgfplots drawings are reported rather than drawn: export those figures as SVG. Hyphenation is English only. Arabic, the Indic scripts and right-to-left text are not supported, the PDF is not tagged for screen readers, and PDF files cannot be used as figures.
Everything, at addresses that do not move.
texwright-latest.zip and texwright-latest.tgz always hold the newest version, so an agent can keep one address.
| File | What it is | Size | SHA-256 |
|---|---|---|---|
| texwright-0.1.0.zip | The package as a zip. Unzip and run with Node.js. | 1.7 MB | 179123c08fbd7351… |
| texwright-0.1.0.tgz | The same package for npm install. | 1.5 MB | 276ee255fc24f60d… |
| AGENTS.md | The guide for agents: syntax, the loop, diagnostics. | ||
| CHEATSHEET.md | One page of syntax. | ||
| texwright-paper.pdf | The paper: design, engine, benchmark, security. | 189 KB | |
| release.json | Version, install line, sizes and full SHA-256 hashes. | ||
| llms.txt | This page for language models. |
texwright is written by Thomas Garren at SOPHIA XT and released under the MIT licence. Its text is set in Latin Modern (GUST Font License) and its mathematics in the KaTeX fonts (SIL Open Font License); both ship inside the package.