Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xkevio/typst-anki

Typst Math within Anki flashcards.
https://github.com/xkevio/typst-anki

anki mathjax svg typst

Last synced: 7 days ago
JSON representation

Typst Math within Anki flashcards.

Awesome Lists containing this project

README

        

# typst-anki

Convert `typst` math code to `MathJax` (via pandoc) or `SVG`s (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`](src/typst-anki/user_files/preamble.typ)—make sure to change your text color according to your system theme!





> [!IMPORTANT]
> On MacOS, make sure `pandoc` is available under `/usr/local/bin/pandoc` otherwise Anki cannot find it.

## Installation

```sh
git clone [email protected]:xkevio/typst-anki.git
cd typst-anki/src/typst-anki

mkdir lib # <- this stores external dependencies for Anki.
pip install typst -t ./lib/
pip install pypandoc -t ./lib/

zip -r typst-anki.zip ./*
```

Then, open Anki > Tools > Addons > Install from file > `typst_anki.zip`.
(Pandoc needs to be installed on your system and available via `$PATH`.) Or, if you wish, use [`just`](https://github.com/casey/just).

## TODO

- [ ] **Feature:** Use Typst HTML export when it releases (MathML).