Skip to content

math equations not rendered #37326

Closed as not planned
Closed as not planned

Description

@xvkjbmj

Description

math equations not rendered

Plugins

no

OpenCode version

Opencode Desktop v1.18.2

Steps to reproduce

Let model output math equations

Screenshot and/or share link

Image

Operating System

windows 11

Terminal

No response

Activity

  1. github-actions commented on Jul 16, 2026

    @github-actions
    Contributor

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

    If your issue is specifically about a different scenario, please clarify how it differs from the above.

  2. logiczr commented on Jul 19, 2026

    @logiczr

    same in 1.18.3,can't render equation correctly.

  3. GraoMelo commented on Jul 20, 2026

    @GraoMelo

    @logiczr @xvkjbmj

    Do you have the same problem in Chrome?
    I don't know if you're aware, but Chrome runs on the OpenCode engine.
    Use the keys:
    Ctrl + Shift + I
    Enable DevTools mode and take a look:

    use the console:

    allow pasting: 
    
    navigator.userAgent
    
    

    'Mozilla/5.0 (yours.o; xxx; x64) AppleWebKit/537.36 (KHTML, like Gecko) OpenCode/1.18.3 Chrome/148.0.7778.218 Electron/42.3.3 Safari/537.36'

    is possible, try to use:
    https://www.mathjax.org/

  4. 17-zh commented on Jul 21, 2026

    @17-zh

    Same issue in 1.18.4: equations are not rendered correctly. They were rendered correctly in 1.17.x, but stopped working after I upgraded via an in-place/overwrite installation.
    🤠🤠
    Markdown rendering still works normally; only LaTeX math such as $E=mc^2$ and $$E=mc^2$$ is displayed as raw text.

  5. rob-the-bot commented on Jul 23, 2026

    @rob-the-bot

    Same issue. I can confirm that LaTeX math still works in desktop app version 1.17.13 on Windows, but not later versions.

  6. 8Nothing8 commented on Jul 23, 2026

    @8Nothing8

    As far as I can tell from the source code, opencode 1.18.4 can only render LaTeX in two ways:

    1. Inline math via \(...\)
    2. Block math via the explicit block format:
    $$
    ...
    $$
    

    Single-line $$...$$ and $...$ are no longer supported, which breaks the most commonly used LaTeX syntax across both user and assistant messages.


    You may be able to avoid this problem by including a formatting requirement in the prompt

  7. rob-the-bot commented on Jul 23, 2026

    @rob-the-bot

    As far as I can tell from the source code, opencode 1.18.4 can only render LaTeX in two ways:

    1. Inline math via \(...\)
    2. Block math via the explicit block format:
    $$
    ...
    $$
    

    Single-line $$...$$ and $...$ are no longer supported, which breaks the most commonly used LaTeX syntax across both user and assistant messages.

    You may be able to avoid this problem by including a formatting requirement in the prompt

    Thanks! Yep just confirmed that this works with the latest OpenCode Desktop app (version 1.18.4).

    @robPTY

  8. github-actions commented on Sep 22, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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