LaTeX renderer in three prompts
Three prompts that build an online LaTeX renderer: one for the features, then two short follow-ups for security and importing.
- Author
- Simon Willison ↗
- Models / tools
- Claude Opus 5.5
- License
- 未声明
- Original language
- en
I want a tool Safe from XSS? load latex from a URLRead the full prompt in the author’s original post ↗
Only an excerpt is shown here; full-text republication permission has not been verified.
Attribution required — keep the author’s name and original source when reusing this prompt. Author: Simon Willison | Original source ↗
How to use it
| Variable | What to enter | Example |
|---|---|---|
文档格式 | Document format | — |
分享时的编码方式 | How shared links are encoded | — |
渲染库 | Rendering library | — |
你项目里已有的隔离实现 | An existing sandbox implementation in your own project | — |
导入来源 | Import sources | — |
Models / tools: Claude Opus 5.5
- Send the first prompt to set the features, and once that works, add the security and import requests one round at a time.
What it can do
These are three prompts Simon Willison published on his blog. He sent them one after another in Claude Code to build an online LaTeX renderer, which is already listed in our AI Apps section. The first describes the tool: render the LaTeX found after the # in the URL, show an editor when there is none, and let you switch to a rendered view you can bookmark. The second asks whether it is safe from XSS and has it use an iframe sandbox the way another of his projects does, and the third adds loading LaTeX from a URL or a Gist. What sets it apart is that it shows prompting as incremental development: settle the features first, then add security and importing in two short follow-ups, each pointing to something the author had already built. Send the first prompt to set the features, and once that works, add the security and import requests one round at a time.
Who it is for
Developers building small web tools with AI coding tools who want to learn to add requirements round by round. If you don't write code, you won't need it.
Before you use it
The author used Claude Code with Claude Opus 5.5. The second and third prompts refer to another of the author's projects, so point them at a real implementation in your own project instead. Asking for XSS protection does not guarantee the finished tool is safe. Your source code goes to the AI service you choose, and costs depend on that service. The blog has no reuse licence, so we show only a fragment of each prompt; see the author's post for the full text.
Follow the stated license. Do not use the output to replicate someone else’s work or a real person’s likeness.
Author examples
Based on the author's public posts. Not tested by AI Inspiration World.