anomalyco / anomalyco/opencode

[CLI / TUI] LaTeX math formulas ($...$, ...) rendered as raw text without formatting

Open
#49,486 3 comments 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Sep 17, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

When the assistant outputs mathematical expressions or logic formulas wrapped in single ($...$) or double ($$...$$) dollar signs (for example, $$\text{Prov}(x, y)$$ or $\exists x \text{Prov}(x, y)$), OpenCode CLI / TUI displays the raw LaTeX source code verbatim with the dollar signs, rather than rendering or formatting them into readable mathematical expressions.

Expected Behavior

Mathematical expressions wrapped in LaTeX delimiters should be nicely formatted or rendered in the CLI/TUI:

  1. Unicode/ASCII Fallback in CLI/TUI: Parse common LaTeX symbols, superscripts, subscripts, Greek letters, and operators into Unicode characters (e.g. \text{Prov}(x, y)Prov(x, y), \exists, \to, x^2).
  2. KaTeX / MathJax support in Desktop / Web GUI: Fully render LaTeX math equations when running in graphical/web mode.
  3. Prompt or parser-level enhancement: For terminal clients, provide guidance or pre-render transformations so mathematical equations remain readable.
Actual Behavior

The terminal outputs raw LaTeX source text including the $ / $$ delimiters directly (e.g., $$\text{Prov}(x, y)$$), which impacts readability for mathematical, logical, and algorithmic discussions.

Steps to Reproduce
  1. Ask OpenCode in CLI mode a math/logic question, e.g. $$\text{Prov}(x, y)$$ 这是什么表达式.
  2. Observe the AI response containing $/$$ delimiters displayed directly as raw text without formatting.
Environment
  • Tool: OpenCode CLI / TUI
  • OS: Windows / Linux / macOS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.