This extension converts the default LaTeX math blocks in Pandoc to Typst math blocks. This allows you to write Typst math inside inline Pandoc math ($...$) and Pandoc display math ($$ ... $$).
Thank you very much to @cderv for providing the foundation of the lua filter. Here, I'm mostly packaging it.
quarto add sverrirarnors/typst-mathThis will install the extension under the _extensions subdirectory.
If you're using version control, you will want to check in this directory.
Simply add the typst-math filter in your yaml header:
---
title: "`typst-math` Example"
format: typst
format:
typst:
filters:
- typst-math
---and then use typst math within either inline math or display math. Note that for display math, you need to add a new line after the $$, like so:
$$
[math here]
$$
This filter only works for the typst format.
Here is the source code for a minimal example: example.qmd, and the output example.pdf.