snacks.nvim
snacks.nvim copied to clipboard
feature: Typst Equation Preview
Did you check the docs?
- [x] I have read all the snacks.nvim docs
Is your feature request related to a problem? Please describe.
Recently, inline equation rendering for latex was added using pdflatex
and tectonic
. I'd appreciate it if you could also implement the same for typst
equations.
Describe the solution you'd like
Typst equations are rendered using the typst compile
command then displayed, similarly to latex equations.
Describe alternatives you've considered
Don't display inline typst equations.
Additional context
A simple typst template might look like
#set page(width: auto, height: auto, margin: (x: 2pt, y: 2pt))
#set text(size: 12pt, fill: rgb("#FF0000"))
$ 5 + 5 = 10 $
and can be rendered directly to png with the command typst compile --format png my_typst_file.typ
. The above example renders to