louietan / anki-editor

Emacs minor mode for making Anki cards with Org
699 stars 87 forks source link

keep MathJax compatible LaTeX environment #60

Open appetrosyan opened 4 years ago

appetrosyan commented 4 years ago

Anki supports either providing a LaTeX equation via [$$] ... [/$$] or a MathJax using \[ ... \]. The latter is much more useful because it allows us to use cloze deletions.

Seeing as any LaTeX environment is being exported surrounded with the former tags and not the latter, I woulkd suggest adding an option not to convert the \( \) \[ \] family of delimiters to the [$$] ... [/$$]. To allow those of us using mathJax to do what we want.

nicories commented 4 years ago

That's already possible, just set anki-editor-use-math-jax to true.

I think it should become the new default, especially now that AnkiDroid supports it as well. Or at least be documented.

appetrosyan commented 4 years ago

Doesnt produce the expected result.

psii commented 4 years ago

It does! I had the same problem, but when setting the option before the package is loaded, it works, i.e.:

(setq-default anki-editor-use-math-jax t)
(require 'anki-editor)

;; Or using the use-package stuff
(use-package anki-editor
  :after org
  :init
  (setq-default anki-editor-use-math-jax t))