Skip to content

Render inline TeX math as Unicode in the TUI - #45501

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/828bf7b48345b05bc6c2fb5cb2798412c3b71dbe
Sep 14, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/828bf7b48345b05bc6c2fb5cb2798412c3b71dbe

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Render inline TeX math as Unicode in the TUI

What changed

Convert supported expressions inside $...$ and \(...\) to readable Unicode in regular and streaming Markdown. For example, $\alpha^2 + \beta_{10}$ renders as α² + β₁₀. Support a bounded TeX subset including symbols, superscripts, subscripts, square roots, and parenthesized fractions, with verbatim fallback for unsupported expressions.

Exclude code, links, HTML, and display equations from conversion, and avoid interpreting common currency and shell syntax as math. Preserve file citation paths and keep streaming cache boundaries outside display equations.

Testing

Add snapshots for inline rendering and narrow wrapping, plus regression tests for unsupported input, parser limits, Markdown contexts, file citations, and streaming display boundaries across chunks and widths.

## What changed

Convert supported expressions inside `$...$` and `\(...\)` to readable Unicode in regular and streaming Markdown. For example, `$\alpha^2 + \beta_{10}$` renders as `α² + β₁₀`. Support a bounded TeX subset including symbols, superscripts, subscripts, square roots, and parenthesized fractions, with verbatim fallback for unsupported expressions.

Exclude code, links, HTML, and display equations from conversion, and avoid interpreting common currency and shell syntax as math. Preserve file citation paths and keep streaming cache boundaries outside display equations.

## Testing

Add snapshots for inline rendering and narrow wrapping, plus regression tests for unsupported input, parser limits, Markdown contexts, file citations, and streaming display boundaries across chunks and widths.

GitOrigin-RevId: 828bf7b48345b05bc6c2fb5cb2798412c3b71dbe
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/828bf7b48345b05bc6c2fb5cb2798412c3b71dbe branch from 39c9753 to ad8a5e3 Compare September 14, 2026 19:29
@copyberry
copyberry Bot merged commit ad8a5e3 into main Sep 14, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/828bf7b48345b05bc6c2fb5cb2798412c3b71dbe branch September 14, 2026 19:29
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant