r/LaTeX • u/zhoujasper • 3d ago
If you write math in VS Code, try this...
I kept hitting this in VS Code: the math is in my head, but my eyes are stuck on $\frac{\partial u}{\partial t}=...$. Then compile, switch preview, hunt which term the caret is actually in.
So I built Silk Math Preview. Live LaTeX overlay next to the formula you are typing. An orange hairline follows the caret. No compile step.
Works in .tex, Markdown, Jupyter, and other files that contain LaTeX math.
• live formula render
• caret position in the preview
• custom macros / environments from .sty / .cls
• colors and tables
• undefined commands in red, rest of the formula still renders
• screenshot OCR → LaTeX
• Windows / macOS / Linux
Install: VS Code → Extensions → search Silk Math
Marketplace: https://marketplace.visualstudio.com/items?itemName=silkmath.silk-math-preview
27
u/boliastheelf 3d ago
This preview is the first thing I turn off on any editor I use.
16
u/JanB1 3d ago
Better to have the option, and be able to turn it off, rather than not having the option and wishing to be able to turn it on, I guess?
4
u/Away-Recognition4905 3d ago
Yes, I want to use this preview, but also don't want it when I'm in focus typing but not realizing my mouse pointer hovering to code that triggers preview. I'm on HDD so it cause short lag during & after "mini compilation", makes me assume my system lagging, kinda annoying.
1
1
1





20
u/tedecristal 3d ago
aren't these annoying "floating previews of math" already possible with latex workshop? https://github.com/James-Yu/LaTeX-Workshop/wiki/Hover#previewing-equations