Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/xkevio/typst-anki
- Owner: xkevio
- License: cc0-1.0
- Created: 2024-07-16T17:33:44.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-02-04T16:28:19.000Z (7 days ago)
- Last Synced: 2025-02-04T17:31:09.451Z (7 days ago)
- Topics: anki, mathjax, svg, typst
- Language: Python
- Homepage:
- Size: 34.7 MB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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-ankimkdir 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).