Typst Math in Anki

AnkiWeb addon 1725149528

Converts Typst math code into MathML or SVG for Anki flashcards, with inline/block editors, shortcut replacements, and custom preamble functions.
AI-generated summary; may contain mistakes.

card-creationformattingbeta

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
1 (πŸ‘ 1 Β· πŸ‘Ž 0)
Updated
2026-07-12
Anki versions
26.05~
Description language
en

Maintenance

active

  • Last update or commit was 81 days before the snapshot (2026-07-12).
  • The repository has 1 GitHub Actions workflows.

GitHub

Repository
xkevio/typst-anki Β· more by xkevio
Stars
⭐ 20 · forks 0 · open issues 3
Last commit
2026-07-12
License
CC0-1.0
Languages
Python, Typst, Just
Tests
0

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
24.1126.05+2026-07-12
History across monthly snapshots

Loading…

Similar addons

SmileAnki

Renders organic chemistry 2D structures inline from SMILES strings in Anki cards via custom tags, injecting SmilesDrawer and adding an editor button.

card-creationformattingbeta

Rating 0 πŸ‘ 0 Β· πŸ‘Ž 0 ⭐ 1 Anki 2.1.66~ Updated 2026-08-23
Fix Edit Menu's Shortcut-Tooltips

Replaces the editor's dropdown-menu generator to display shortcut tooltips for MathJax inline, block, chemistry, LaTeX, LaTeX equation, LaTeX math env., and Edit HTML.

formattingshortcuts

Rating 1 πŸ‘ 1 Β· πŸ‘Ž 0 Updated 2019-01-05

README

typst-anki

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 <kbd>Ctrl + M, T</kbd> for the inline math editor (<kbd>Ctrl+M, B</kbd> for the math block editor).

Alternatively, click Typst math replace or press <kbd>Ctrl + M, R</kbd> 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!

<p align="center"> <img src="images/image-2.png", width=30%> <img src="images/image-4.png", width=30%> <img src="images/image-3.png", width=30%> </p>

[!NOTE] When using MathML, toggle the HTML editor twice (by pressing <kbd>Ctrl + Shift + X</kbd>) to move the cursor out of the inserted math equation.

Installation

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.

Features

  • [x] Use Typst HTML export to utilize MathML (since Typst v0.15.0).
  • [x] Use Typst SVG export to ensure same visual look everywhere.

TODO

  • [ ] Replace functionality correctly inserts stylesheet while editor does not