[FEATURE] LaTeX rendering in "Claude Code for VS Code" plugin
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 43 comments · opened Jan 6, 2026
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Currently "Claude Code for VS Code" plugin does not render LaTeX.
Proposed Solution
It would be great to support LaTeX rendering in "Claude Code for VS Code" plugin. Thanks! ☺️
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
Other
Use Case Example
_No response_
Additional Context
_No response_
43 Comments
Here is an example screenshot:
<img width="739" height="614" alt="Image" src="https://github.com/user-attachments/assets/4a2317f7-451a-4128-b4af-e499857d329b" />
I've wound up just copy-pasting the output latex into my markdown file so it renders automatically.
we really need this!
This would be fantastic!
yes, sorely missing that!
++++
definitely need this
I back this, currently VS Code Github Copilot with Opus 4.6 can render math correctly, but not Claude Code VS Code extension
Just noticed this issue myself, this would be great to have on VS code!
This would be really useful for me!!
This please
Need this please🥺🥺
how could every software, claude code, codex failed to support latex rendering and text select-response.
BUMP THIS PLEASE!!!!!
bump
Pleaseee!!!
Please!!!
temporary fix https://marketplace.visualstudio.com/items?itemName=nuriyev.claude-code-katex
Do you have a screenshot by chance? And how's the rendering peformance like?
| Before | After |
|--------|-------|
| <img width="505" alt="Image" src="https://github.com/user-attachments/assets/4813f18c-fcaa-419f-a636-a8c3651f8ec4" /> | <img width="503" alt="Image" src="https://github.com/user-attachments/assets/a26b6b99-9e0c-4643-8467-549134068ee4" /> |
performance seems to be fine
@ductai199x
that's prettt good! thank you for the share!! 🎉🎉🎉
this would be very appreciated, up vote ⬆️⬆️⬆️
Upvote!
The temporary fix from @MahammadNuriyev62 works great in the meantime!
Thank you!!! Helps alot
Amazing!!! Thanks a lot!!
Amazing work! Thanks!
Upvotting this. We need this 🙏🙏
Yes, we need this please. Especially in the terminal.
yes!! Please do this!
feel free to use https://marketplace.visualstudio.com/items?itemName=nuriyev.claude-code-katex in a meantime. and let me know if you're facing any issues!
https://github.com/user-attachments/assets/24b255ca-f800-484c-a27b-3123cd6c906e
For folks running Claude Code in a terminal rather than the VS Code extension (Windows Terminal, conhost, WezTerm, etc.) —
claude-code-katexis a great fit if you're in VS Code, but it doesn't help terminal-only setups. @andrewboldi mentioned the gap above.I built texpop to scratch that exact itch on Windows: a hotkey (
Ctrl+Alt+V) opens a popup that overlays the focused terminal exactly, picks the focused chat across multi-tab sessions, and renders the last assistant message with KaTeX + Markdown + custom callouts. Reads the JSONL transcripts on disk; fully offline; MIT.Not a replacement for first-party rendering inside Claude Code — that's the right long-term fix and what this issue is asking for. Just a stop-gap for the terminal cohort.
I made a VS Code extension called ClaudeTex to take care of this
I was having trouble with other implementations either failing on more complicated physics equations/matrices or opening separate preview tabs, so ClaudeTex renders inline in the existing Claude Code chat and includes extra handling for arrays, matrices, and safer $...$ parsing
Please add this support! This will be very helpful!
Please
This issue remains for Version 2.1.186
feel free to use https://marketplace.visualstudio.com/items?itemName=nuriyev.claude-code-katex for now 😇
my temporary workaround: https://marketplace.visualstudio.com/items?itemName=lihengzhuang.vibe-latex, supporting copy and paste
+1, need this support natively
+1, need this support natively
+1, need this support natively
I mostly have an issue with LaTeX rendering being absent in plans, only in the approval presentation view. Afterwards, I can use any Markdown previewer such as MPE on the approved plan and it's fine. But during the plan, for LaTeX, I always have to sidestep to Claude Code remote control, where most of the LaTeX is adequately rendered. It would be really helpful if it would also be rendered in the VSCode extension plan approval view.
VS Code chat does not render LaTeX math —
remark-math/rehype-katexare absent from the webview bundleSummary
Claude regularly emits LaTeX in its replies, both inline (
$w_r = 2n^2$) and as fenced`mathblocks. The same markdown renders correctly on github.com and in VS Code's own built-in markdown preview, but in the Claude Code chat panel it is displayed as literal LaTeX source.This makes any maths-heavy conversation hard to read. It comes up constantly for scientific and numerical work — I am documenting a reconstruction algorithm, so most of what I ask about is equations, and every reply has to be either squinted at or re-requested in Unicode.
Environment
| | |
|---|---|
| Extension |
anthropic.claude-code2.1.234 and 2.1.235 (both affected) || VS Code | 1.134.0 stable (
110a328ea54b) || Platform | Linux x64, Remote-SSH (
.vscode-server) |Reproduction
$\lambda_r = n^2|F_r|^2$and`mathblocks$\lambda_r = n^2|F_r|^2$; the fenced block renders as a monospace code box containing LaTeX sourceRoot cause
webview/index.jsis areact-markdownbundle, and it contains no math plugin or math renderer. Grep counts over the shipped bundle, identical in both versions:Without
remark-math,$…$is never parsed as maths, so there is noinlineMath/mathnode for any renderer to consume — the text passes through as literal characters. The`mathfence is treated as a code block with an unrecognised language, which is why it renders as monospace source.Two details suggest this is a missing dependency rather than a deliberate omission:
react-markdowncall site in the bundle passes plugins:``
js
``b(QQ, { remarkPlugins: [XA], components: { a: ({href, children}) => … } })
inlineMathappears in the bundled mdast utility's list of known phrasing types — the serialisation side is aware of maths nodes; only the parser and the renderer are absent.Suggested fix
The standard two-plugin recipe for
react-markdown:Notes that may reduce the cost:
~/.vscode-server/cli/servers/Stable-*/server/node_modules/katex, currently 0.16.22. So the dependency is already present in the environment, and matching that version would keep rendering consistent between the chat panel and the markdown preview.rehype-katexneeds KaTeX's stylesheet in the webview; the panel already sets a Content-Security-Policy, so the CSS needs to be served with the webview's existing asset/nonce mechanism rather than from a CDN.remark-mathtreats$as significant, so a currency-heavy message could render oddly.singleDollarTextMath: falserestricts inline maths to$$…$$if that is a concern.Why this cannot be worked around
MessageDisplaycannot help. It is documented observe-only — on exit 2 "the original text is displayed" — so a hook cannot transliterate the maths on the way out.The only user-side option is to instruct Claude to emit Unicode instead (
wᵣ = 2n²(1 − Iᵣ/λᵣ)), which loses fractions, integrals, matrices, and anything that needs two dimensions — and has to be re-established every session.Impact
Small, self-contained change; removes a papercut that affects every scientific, mathematical, or ML conversation. Claude already emits correct, GitHub-compatible maths markdown — this is only about the renderer catching up with what the model is already producing.
Still unfixed in 2.1.239 (and 2.1.238), confirming @nelsbuhrley's analysis above on a newer build. Same environment: Linux x64, VS Code Remote (
.vscode-server).Re-ran the same grep over the shipped bundle in
anthropic.claude-code-2.1.239-linux-x64(webview/index.js, 4.9 MB;webview/index.css, 389 KB):Two additional checks, in case they help rule out "the renderer is there but mis-wired":
.katex,.mord,.mrel,KaTeX_Main) inindex.css, and zero.woff/.woff2files anywhere in the extension directory. Even if a math plugin were present, there would be nothing to style the output with.MathMLhits are a red herring. The only math-adjacent strings in the bundle (MathML,mathMl,teXML) are namespace constants and attribute tables from the bundledhast/DOMPurify code, not a renderer.Also worth noting for anyone arriving here looking for a workaround: there is no user-side switch.
claude-code-settings.schema.jsondefines 11claude-code.*settings and none of them relates to math or to markdown plugins.Given the number of duplicates this has accumulated (#82758, #74027, #84413 open; several more closed), it would help to have this one treated as the canonical thread.
One workaround is to use claude desktop code with displaying block latex.