Skip to content

bug: LaTeX math expressions have white halos on dark backgrounds #2644

@sei40kr

Description

@sei40kr

Did you check docs and existing issues?

  • I have read all the snacks.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of snacks.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.11.4

Operating system/version

NixOS 25.11 (Xantusia) x86_64

Describe the bug

LaTeX math expressions rendered inline in documents show white halos/artifacts around text when using dark backgrounds. This occurs because ImageMagick performs anti-aliasing against a white background by default during PDF→PNG conversion, even though the final image has a transparent background.

Steps To Reproduce

  1. Set Neovim to dark background: :set background=dark
  2. Open a markdown file with LaTeX math expression: $E = mc^2$
  3. Observe white halos around the rendered math text

Expected Behavior

Math expressions should render cleanly without halos on both light and dark backgrounds, with anti-aliasing appropriate for the current background setting.

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/
main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    {
      "folke/snacks.nvim",
      opts = {
        image = {},
      },
    },
  },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleThis issue or PR has been inactive for a whilewontfixThis issue will not be fixed or implemented

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions