Skip to content

[Bug] LaTeX equations render incorrectly in WezTerm #48

Open

Description

@nexdep

Environment

  • markdown-reader version: 1.35.1
  • Terminal: WezTerm
  • Terminal dimensions during testing: 383 columns by 102 rows
  • Display scaling: 144 DPI
  • Operating environment: WSL, Ubuntu 26.04
  • Math configuration: math_mode = "image"
  • tmux: not used

Steps to reproduce

  1. Create a Markdown file containing:

    $$
    \frac{d\mathbf{N}(t)}{dt}
    =
    \mathbf{A}(t)\mathbf{N}(t).
    \tag{1}
    $$
  2. Open the file directly in WezTerm:

    markdown-reader example.md

Actual behavior

The display equation does not render cleanly or legibly in WezTerm. Image-mode
rendering is selected and terminal image cells are created, but the displayed
LaTeX appears malformed.

Switching to math_mode = "text" avoids the image-rendering problem, although
advanced LaTeX is then simplified. Also, \tag{1} is displayed as
tag1 rather than (1).

Expected behavior

The equation should render as a clear typeset image in WezTerm, including the
fraction, bold symbols, and equation number (1).

Additional information

  • WezTerm is detected and the terminal-image rendering path is active.
  • The problem occurs outside tmux.

Activity

  1. added
    bug
    on Sep 21, 2026
  2. leboiko commented on Oct 13, 2026

    @leboiko
    Owner

    #53 is merged on master with two improvements: Unicode fallback renders equation tags as (1) instead of tag1, and recognized WezTerm sessions prefer the documented iTerm2 protocol after a successful query, including WSL environments identified only by TERM_PROGRAM.

    The reported formula passes local decoded-raster ink and cell-geometry regressions, and protocol selection is tested. The original WSL/WezTerm GUI was unavailable here, so these checks do not prove that the displayed-image symptom is resolved. Keeping this issue open for that terminal verification; no follow-up issue was created. No release has been published yet.

  3. leboiko commented on Oct 13, 2026

    @leboiko
    Owner

    Reopened: the PR description’s negated closing phrase accidentally caused GitHub to close this issue when #53 merged. That wording is corrected.

    The merged tag fix and protocol-selection mitigation are tested, but the original WSL/WezTerm GUI symptom remains unverified. This issue stays open for that terminal check, as intended; no replacement or follow-up issue is needed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions