claude-code - 💡(How to fix) Fix [BUG] Inline KaTeX math (`$...$`) no longer renders in chat output — only block `$$...$$` works (regression)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When Claude's reply contains inline math wrapped in single dollar signs ($...$), it doesn't render — the raw source is shown instead, dollar signs included. For example, $q_0$ appears as the literal text "$q_0$" rather than a typeset q-zero.

Block math wrapped in double dollar signs ($$...$$) on its own line still renders correctly as typeset KaTeX. So only inline math is broken; block math is fine.

What Should Happen?

Inline math wrapped in single dollar signs ($...$) should render as typeset KaTeX, the same way block math ($$...$$) does, with the dollar delimiters hidden. For example, the start state is $q_0$ should display a typeset q-zero, not the literal text $q_0$. Inline math should render the way it did in earlier versions and the way block math still does today.

Error Messages/Logs

Steps to Reproduce

  1. Ask Claude anything whose answer naturally contains inline math, e.g. "explain a Turing machine's transition function".
  2. Claude replies with a sentence containing inline $...$, such as: the start state is $q_0$ and the alphabet is $\Sigma = {0,1}$.
  3. Observe that each inline $...$ segment shows as raw text with visible dollar signs, not typeset math.
  4. For contrast, note that block math on its own line renders correctly:

$$\delta: Q \times \Gamma \to Q \times \Gamma \times {L,R}$$

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.156 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Surface: Claude Code desktop app (macOS). The Terminal/Shell dropdown has no desktop-app option, so it may not reflect the actual surface.

Reproducible 100% of the time this session: every inline $...$ expression shows raw dollar signs, while every $$...$$ block renders correctly. Inline single-$ math rendered fine in earlier versions, so this looks like a regression.

<img width="1049" height="371" alt="Image" src="https://github.com/user-attachments/assets/a62ccbff-f968-4c0f-ad6f-ba3ca994421d" />

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING