snacks.nvim/tests/image
Daniel Wennberg 66e3dc4619
fix(image): avoid nested math environments (#2345)
## Description

Inline LaTeX equation preview renders equations twice, partly on top of
each other, if you use nested math environments. Minimal reproducer:

```latex
\documentclass{article}
\begin{document}
\begin{equation}
  \begin{aligned}
    x_+ &= \frac{-b + \sqrt{b^2 - 4ac}}{2a} \, , \\
    x_- &= \frac{-b - \sqrt{b^2 - 4ac}}{2a} \, .
  \end{aligned}
\end{equation}
\end{document}
```

While, adding a test case for this to `test.tex` I also corrected a
package name such that it compiles without error.

## Screenshots

**Before**
<img width="248" height="203" alt="Screenshot 2025-10-24 at 16 22 05"
src="https://github.com/user-attachments/assets/ab55ef8c-1f04-49e5-b731-95b638ac9db7"
/>

**After**
<img width="248" height="203" alt="Screenshot 2025-10-24 at 16 23 33"
src="https://github.com/user-attachments/assets/4d3d53f6-7122-452f-b891-5a712f79fe40"
/>
2025-10-29 14:47:52 +01:00
..
big.md test(image): added big test markdown doc 2025-03-01 08:05:59 +01:00
math.md feat(image.doc): allow configuring the header for latex / typst inline in the document. Closes #1303 2025-02-19 23:06:51 +01:00
math.png feat(image): refactor of treesitter queries to support inline image data 2025-02-17 12:49:38 +01:00
test-mermaid.md feat(image): added support for mermaid diagrams in markdown 2025-02-18 00:17:05 +01:00
test.aux fix(image): avoid nested math environments (#2345) 2025-10-29 14:47:52 +01:00
test.css feat(image): added support for a bunch of aditional languages 2025-02-16 14:16:15 +01:00
test.html feat(image): refactor of treesitter queries to support inline image data 2025-02-17 12:49:38 +01:00
test.jpg feat(image): added support for a bunch of aditional languages 2025-02-16 14:16:15 +01:00
test.jsx feat(image): adde support for Image in jsx 2025-02-16 15:13:34 +01:00
test.md feat(image): added support for base64 encoded images in url. Closes #2304 2025-10-21 22:59:36 +02:00
test.mmd feat(image): added support for mermaid diagrams in markdown 2025-02-18 00:17:05 +01:00
test.norg test(image): math for neorg 2025-02-27 15:22:54 +01:00
test.org feat(images): added support for org-mode. Closes #1276 2025-02-18 23:54:17 +01:00
test.pdf fix(image): avoid nested math environments (#2345) 2025-10-29 14:47:52 +01:00
test.png feat(image): added support for a bunch of aditional languages 2025-02-16 14:16:15 +01:00
test.scss feat(image): added support for a bunch of aditional languages 2025-02-16 14:16:15 +01:00
test.svelte feat(image): add support for svelte (#1277) 2025-02-18 16:49:40 +01:00
test.tex fix(image): avoid nested math environments (#2345) 2025-10-29 14:47:52 +01:00
test.tsx feat(image): added support for a bunch of aditional languages 2025-02-16 14:16:15 +01:00
test.typ feat(image.doc): allow configuring the header for latex / typst inline in the document. Closes #1303 2025-02-19 23:06:51 +01:00
test.vue feat(image): added support for a bunch of aditional languages 2025-02-16 14:16:15 +01:00
test2.md feat(image): refactor of treesitter queries to support inline image data 2025-02-17 12:49:38 +01:00