mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
## 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"
/>
|
||
|---|---|---|
| .. | ||
| big.md | ||
| math.md | ||
| math.png | ||
| test-mermaid.md | ||
| test.aux | ||
| test.css | ||
| test.html | ||
| test.jpg | ||
| test.jsx | ||
| test.md | ||
| test.mmd | ||
| test.norg | ||
| test.org | ||
| test.pdf | ||
| test.png | ||
| test.scss | ||
| test.svelte | ||
| test.tex | ||
| test.tsx | ||
| test.typ | ||
| test.vue | ||
| test2.md | ||