anomalyco / anomalyco/opencode

Desktop app does not render inline LaTeX math ($...$)

Open
#39,170 4 comments 2 reactions 1 assignee View on GitHub

@Brendonovich is already working on this.

Since Jul 27, 2026.

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

Description

Description

When using the opencode Desktop app (Windows), block-level LaTeX math enclosed in $$...$$ renders correctly, but inline math enclosed in $...$ is displayed as raw LaTeX source code instead of being rendered.

Steps to reproduce:

  1. Ask the AI agent to output inline math, e.g., $E = mc^2$
  2. Observe that it appears as literal $E = mc^2$ text
  3. Compare with block math $$...$$, which renders properly

Expected behavior:
Inline math $...$ should be rendered the same way as block math $$...$$.

Environment:

  • opencode Desktop (latest version)
  • Occurs on all platforms

The issue is likely in the Markdown renderer — it only applies math rendering to fenced $$ blocks but does not handle inline $ delimiters. This is a common oversight in Markdown math implementations; libraries like KaTeX or MathJax handle both out of the box.

Plugins

No response

OpenCode version

Latest

Steps to reproduce

No response

Screenshot and/or share link
Image
Operating System

Windows11

Terminal

No response

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.