Convert Typst math code to MathMLor SVGs (via the Typst compiler) for use in Anki flashcards. Click either the Typst math inline button or press Ctrl + M, T for the inline math editor (Ctrl+M, B for the math block editor).
Alternatively, click Typst math replace or press Ctrl + M, R to replace all instances of typst math code between $...$ with rendered equations. Add custom functions inside preamble.typ—make sure to change your text color according to your system theme!
Note
When using MathML, toggle the HTML editor twice (by pressing Ctrl + Shift + X) to move the cursor out of the inserted math equation.
git clone git@github.com:xkevio/typst-anki.git
cd typst-anki/src/typst-anki
mkdir lib # <- this stores external dependencies for Anki.
pip install typst -t ./lib/
zip -r typst-anki.zip ./*Then, open Anki > Tools > Addons > Install from file > typst_anki.zip.
Or, if you wish, use just.
- Use Typst HTML export to utilize MathML (since Typst v0.15.0).
- Use Typst SVG export to ensure same visual look everywhere.
- Replace functionality correctly inserts stylesheet while editor does not


