LaTeX renderer

TL;DR · AI 摘要
Simon Willison发布基于Web的LaTeX渲染工具,支持URL片段共享和多种渲染库集成。
核心要点
- 工具使用MathJax 4.1.3和faster-latex 0.3.1实现渲染
- 通过URL片段实现文档共享和编辑状态切换
- 采用iframe sandbox机制防范XSS攻击
结构提纲
按章节快速跳转。
思维导图
用一张图看清主题之间的关系。
查看大纲文本(无障碍 / 无 JS 友好)
- LaTeX渲染工具
- 核心功能
- URL片段共享
- 编辑/渲染视图切换
- 多源加载
- 技术实现
- MathJax 4.1.3
- faster-latex 0.3.1
- DOMPurify 3.4.16
- 安全机制
- iframe sandbox
金句 / Highlights
值得收藏与分享的关键句。
工具使用Pako 2.1.0实现自定义LaTeX压缩字典
URL片段机制使文档成为可书签的共享链接
iframe sandbox机制有效隔离渲染环境
Tool: LaTeX renderer
Simon Willison’s Weblog
Newsletter
#smallhead
Sponsored by:
Teleport
— AI agents (and sub-agents they spawn) are given the same access as humans, but they never sleep. Learn how to monitor and constrain their behavior with isolated ephemeral trusted runtimes.
15th October 2026
Tool
LaTeX renderer
— LaTeX renderer turns LaTeX source into a rendered view, either a single display equation typeset by MathJax or a full document or prose fragment typeset by faster-latex, with a live preview beside the editor and a toolbar switch between Edit and Rendered views. Source can be typed, loaded from a URL or GitHub Gist, or picked from built-in examples, and the page keeps the LaTeX in the URL fragment so it can be shared as a readable or compressed link.
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 agents how to construct URLs that will render as documents. Claude used that file to generate this link to a deck that explains how the URL format works:
Tiny Little Office inspired me to have Claude Code (Opus 5.5 Extra) build a similar tool that works with LaTeX. Here's the sequence of prompts I used:
I want a tool where you can link to it with a fragment hash #code-here and it treats that code as LaTeX and renders it really effectively. It should also support a prefix which means the latex is compressed with a custom compression dictionary optimized for latex. Use the best available latex render library from a CDN (consider WebAssembly too). If loaded without a fragment hash show an editor you can paste latex into and then toggle to a "rendered" view. That rendered view should be bookmarkable. The #fragment view should let you switch to edit source too.
Since it was working in my tools repo I told it to take inspiration from the <iframe sandbox="..."> mechanism used by my existing SVG in Markdown tool as protection against XSS risks:
Safe from XSS? We could run in an iframe sandbox like we do on the SVG markdown render project
I had it copy the Gist/URL loading feature from that tool as well:
We should have an option to load latex from a URL (or gist) similar to the markdown SVG tool
Here's an example link . The tool uses Pako 2.1.0 , MathJax 4.1.3 , faster-latex 0.3.1 , and DOMPurify 3.4.16 .
Posted
at 2:07 am
Recent articles
- Hello Python 3.15, goodbye 3.10, and now I can use 3.11 - 12th October 2026
- A new feature for my blog, built using my voice - 9th October 2026
- Claude Haiku 5.5 - 7th October 2026
- We're going to need default hard budget caps on pretty much everything - 3rd October 2026
#primary
This is a beat by Simon Willison, posted on 15th October 2026 .
latex
4
paul-ford
21
tools
80
urls
ai
2,285
generative-ai
2,027
llms
1,993
Monthly briefing
Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.
Pay me to send you less!
Sponsor & subscribe
.metabox
#secondary
#wrapper
- Disclosures
- Colophon
- ©
- 2002
- 2003
- 2004
- 2005
- 2006
- 2007
- 2008
- 2009
- 2010
- 2011
- 2012
- 2013
- 2014
- 2015
- 2016
- 2017
- 2018
- 2019
- 2020
- 2021
- 2022
- 2023
- 2024
- 2025
- 2026