-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Render LaTeX math ($...$ and $$...$$) in markdown viewer and terminal block output #9677
Copy link
Copy link
Open
Labels
area:agentAgent workflows, conversations, prompts, cloud mode, and AI-specific UI.Agent workflows, conversations, prompts, cloud mode, and AI-specific UI.area:editor-notebooksEditors, notebooks, markdown rendering, LSP, and code display.Editors, notebooks, markdown rendering, LSP, and code display.area:shell-terminalTerminal input/output, shell integration, prompt behavior, and block rendering.Terminal input/output, shell integration, prompt behavior, and block rendering.enhancementNew feature or request.New feature or request.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
Metadata
Metadata
Assignees
Labels
area:agentAgent workflows, conversations, prompts, cloud mode, and AI-specific UI.Agent workflows, conversations, prompts, cloud mode, and AI-specific UI.area:editor-notebooksEditors, notebooks, markdown rendering, LSP, and code display.Editors, notebooks, markdown rendering, LSP, and code display.area:shell-terminalTerminal input/output, shell integration, prompt behavior, and block rendering.Terminal input/output, shell integration, prompt behavior, and block rendering.enhancementNew feature or request.New feature or request.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
Pre-submit Checks
Describe the solution you'd like?
Warp currently treats LaTeX math delimiters as plain text in both the markdown viewer and streaming terminal output. I'd like both surfaces to recognize and typeset LaTeX math:
$...$delimiters$$...$$delimitersThis should apply in two places:
.md/.markdownfile contains math delimiters, render the math typeset rather than as raw$\sigma(x) = \frac{1}{1+e^{-x}}$.Is your feature request related to a problem? Please describe.
A large and growing share of Warp users run AI coding/research agents in the terminal, and many of those conversations involve math: ML derivations, statistics, optimization, numerical methods, physics. Today the agent's responses display as raw
$...$and$$...$$strings, which is hard to read and breaks the flow of an otherwise polished agentic experience. This really slows down iteration speed for me. Same problem when the agent writes.mdfiles (plans, notes, derivations) and the user opens them in the viewer.For the technical / research / academic segment of Warp's user base, this would be one of the highest-leverage rendering improvements available.
Additional context
Scope and behavior
$...$(inline) and$$...$$(display) as math delimiters, matching pandoc / GitHub markdown conventions.\$as a literal dollar sign (not a delimiter).$followed immediately by a digit should not parse as math (so$30,000is unaffected) — same convention pandoc uses.$...$as math (treat as literal code).Implementation notes (optional, for whoever picks this up)
Candidate approaches for the Rust pipeline:
latex2mathml+ a MathML/SVG renderer, or a bundled KaTeX WASM / CLI build producing SVG glyphs that the existing viewer renderer can draw. The terminal-block path may need a more constrained renderer than the viewer pane (line-height / inline glyph alignment matters more there).Request
@oss-maintainers — could you consider applying a readiness label (
ready-to-specorready-to-implement)? Happy to refine the spec or verify implementations.Operating system (OS)
macOS
How important is this feature to you?
5 (Can't work without it!)
Warp Internal (ignore) - linear-label:39cc6478-1249-4ee7-950b-c428edfeecd1
None