Skip to content

chat: LaTeX math ($...$) is not rendered in messages #51725

Closed as duplicate

Description

@seedoilfan

Summary

Math written with LaTeX delimiters ($...$ and $$...$$) is shown literally in chat messages instead of being rendered, so the maths is unreadable.

Environment

  • opencode version: 2.0.16
  • OS: Darwin 25.5.0 (macOS, arm64)
  • Terminal: TERM=xterm-256color; TERM_PROGRAM and COLORTERM unset
  • Shell: /bin/zsh
  • Install/channel: latest
  • Active plugins: none found

Reproduction

  1. Open a chat.
  2. Send or receive a message with inline math, e.g. The distance is $d_i = \sqrt{(x_i-\bar{x})^\top S^{-1}(x_i-\bar{x})}$.
  3. Also try display math delimited by $$ ... $$.

Expected Behavior

The math renders as a formatted equation (or the delimiters are at least not shown as literal text).

Actual Behavior

The $...$ delimiters appear literally and the expression stays unformatted, making it hard to read. The user had to ask the assistant to stop using $...$ entirely.

Additional Context

Hit repeatedly while using opencode for a statistics assignment. Reasonable fixes: add KaTeX/MathJax-style rendering for $...$ and $$...$$, or, failing that, document that math isn't rendered and instruct models to avoid LaTeX delimiters in chat.

Activity

  1. github-actions commented on Sep 27, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #49486: LaTeX expressions with $...$ and $$...$$ are displayed as raw text in the CLI/TUI.
    • #34407: CLI math formulas appear as raw LaTeX instead of being rendered.
    • #39170: Inline LaTeX math is shown literally in the Desktop app.
    • #51432: Desktop messages display raw LaTeX rather than rendered math.
  2. neriousy commented on Oct 1, 2026

    @neriousy
    Member

    Closing as a duplicate of #40508. Same request: render LaTeX in the terminal UI. Tracking in the V2 TUI issue #40508.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions