Skip to content

Latest commit

 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 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.

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

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

TODO

  • Replace functionality correctly inserts stylesheet while editor does not

About

Typst Math within Anki flashcards.

Topics

Resources

Stars

20 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages