AivexaNewsSearch
AI news for builders and product teamsChecked every hour

LaTeX renderer

Collected Oct 16, 2026

Simon Willison has released a LaTeX renderer, a browser-based tool that accepts LaTeX source in a URL fragment and renders it directly, so any document becomes a shareable and bookmarkable link. The project was inspired by Paul Ford and Aboard Foundary's Tiny Little Office, a suite of web app content editors whose signature behavior is storing all document data in the URL's #fragment section.

Tiny Little Office bundles a Word Processor, Outliner, Presentation Builder, Spreadsheet, Calculator, Drawing Tool, Diagram Maker, Animator, Calendar, and Trip Planner. Because each document lives in the fragment, every one produces a link that can be bookmarked or passed to someone else. It also ships an llms.txt file describing how agents should construct URLs that render as documents; Willison notes Claude used that file to generate a link to a deck explaining the URL format. That combination — a URL scheme plus a machine-readable description of it — is what prompted him to commission a similar tool for LaTeX.

The tool was built by Claude Code, which Willison refers to as "Opus 5.5 Extra," working from a sequence of prompts. The first asked for a tool that, when linked with a fragment hash containing code, treats that code as LaTeX and renders it well. He also asked for a prefix indicating the LaTeX is compressed with a custom compression dictionary optimized for LaTeX. He specified using the best available LaTeX render library from a CDN, with WebAssembly as a candidate, and asked that a visit with no fragment hash show an editor for pasting LaTeX with a toggle to a rendered view, that rendered view being bookmarkable. From the fragment view, users can switch back to editing the source.

Two further prompts copied mechanisms from Willison's earlier SVG in Markdown tool. One is the iframe sandbox pattern, used so the renderer is protected against XSS risks — rendering untrusted markup in a sandboxed frame limits what injected script can reach. The other is the tool's Gist and URL loading feature, letting users point the renderer at LaTeX hosted elsewhere rather than only supplying it inline.

The implementation relies on four libraries: Pako 2.1.0, MathJax 4.1.3, faster-latex 0.3.1, and DOMPurify 3.4.16. Read together, these choices map onto the requirements: Pako handles the compressed-fragment format, MathJax and faster-latex cover mathematical rendering, and DOMPurify sanitizes output before it reaches the document.

This is a pattern worth understanding on its own terms. Putting content in a URL fragment means the data never has to reach a server — the fragment is not sent in HTTP requests, so the document lives entirely client-side, and sharing is just copying a URL. The cost is URL length: fragments have practical browser and chat-app limits, which is precisely where the custom LaTeX compression dictionary earns its place, trading decode work for shorter links. Sandboxing in an iframe is the corresponding safety measure, since rendering arbitrary user-supplied markup inline would otherwise expose the page to cross-site scripting.

Willison links to an example document generated with the tool. He tagged the post latex, paul-ford, tools, urls, ai, generative-ai and llms.

Why it matters: developers who share mathematical content — documentation, papers, notebook exports, teaching material — get a zero-backend way to publish LaTeX as a link, with compression and sandboxing as the two problems that had to be solved first. The prompt sequence is also a small case study in specifying a tool precisely: render library, fallback editor, security model and remote-loading behavior were each called out, and the resulting stack is a handful of named client-side libraries. Whether the compression dictionary and fragment-length ceiling hold up for genuinely large documents is the practical question to test before relying on it.

Read at Simon Willison

Based on reporting from the original publisher. Visit the source for full context and later updates.

Publisher excerpt

Tool: LaTeX renderer Inspired by Paul Ford and Aboard Foundary's new web app Tiny Little Office , which provides a suite of web app content editors (a Word Processor, Outliner, Presentation Builder, Spreadsheet, Calculator, Drawing Tool, Diagram Maker, Animator, Calendar, and Trip Planner). Tiny Little Office's signature trick is to store all of the document data in the #fragment section of the URL, so every document created using it becomes a bookmarkable and shareable link. It also has an llms.txt file telling ag