# Your terminal can't render LaTeX. Here's a 10-second fix for Claude Code and Codex

> Source: <https://dev.to/vladimirrotariu/your-terminal-cant-render-latex-heres-a-10-second-fix-for-claude-code-and-codex-1adf>
> Published: 2026-07-18 01:36:22+00:00

Ask Claude Code or Codex to explain some math and your terminal shows this:

H(p) = $-\sum_{i} p_{i} \log p_{i}$

That is LaTeX. A browser renders it into a clean equation. A terminal renders it into dollar-sign noise, because a TUI has no math engine to run. The more math-heavy your work (ML, statistics, optimization, proofs), the worse the output gets exactly where you need it clear.

That is the hard, unsolved path: it needs a graphics backend like Kitty or SIXEL, plus a fallback for SSH and tmux. There is a cheaper move. The model does not have to output LaTeX at all.

Unicode already has most inline math: ∑, ∫, √, ≤, ≥, ∈, α, β, σ, x², pᵢ, set notation, even small matrices. A terminal renders all of it, because it is just text. So you teach the model to skip LaTeX and emit the Unicode directly:

before: H(p) = $-\sum_{i} p_{i} \log p_{i}$

after: H(p) = − ∑ᵢ pᵢ · log pᵢ

[ claude-math](https://github.com/vladimirrott/claude-math) does exactly that. It has no runtime; it is a

`SKILL.md`

the agent loads, with a glyph cheatsheet so the mapping stays consistent. It is copy- and search-safe (plain Unicode, not the "mathematical alphanumeric" styling codepoints that break find-in-page), and the same file works in Claude Code and Codex.npx claude-math install # Claude Code

npx claude-math install --codex # Codex CLI

Restart your agent and math comes back as text you can read.

**One caveat, stated plainly:** this is a workaround, not native rendering. A dense derivation is still clearer as typeset math, and on a GUI surface that already renders LaTeX you want the LaTeX, not Unicode. claude-math is deliberately a terminal tool. Buh that fills an agent's answers, it is an immediate improvement.

Repo: [https://github.com/vladimirrott/claude-math](https://github.com/vladimirrott/claude-math)

If the Unicode mapping ever looks wrong, that is exactly the kind of issue I want to hear about.
