lukesmurray / markdown-anki-decks

Tool for converting markdown files into anki decks
MIT License
130 stars 12 forks source link

Support Latex Inline Math $$ #5

Closed yannickfunk closed 2 years ago

yannickfunk commented 2 years ago

First of all thank you for this nice tool, Unfortunately it was not fitting for my purpose, because inline math used in the markdown file with $$ was not converted to mathjax (aka parse $$ to ( ) ). It would be very nice if this feature could be added

lukesmurray commented 2 years ago

Inline math is supported by markdown-anki-decks. It is documented in the readme (see Mathjax in the readme). You need to use \\( and \\) as your delimiters.

<!-- this will render inline math -->

\\(\sqrt{x}\\)

Anki does not use $ out of the box because it overlaps with Anki's built-in cloze deletion syntax (see anki documentation).

Let me know if the solution works for you and I'll reopen the issue. Also open to ideas for alternative, but Anki-compatible syntaxes, if you want to help improve the experience of writing math in markdown-anki-decks.

rasmus-kirk commented 10 months ago

It seems to have a lot of issues with stuff like \\( x_a = y_a \\).