louietan / anki-editor

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

Proper line break syntax for Mathjax latex environment #95

Open HyunggyuJang opened 2 years ago

HyunggyuJang commented 2 years ago

Current state of this package doesn't foster mathjax as a first citizen of anki's latex export. Doesn't handle environment starting with \begin at all for now, and even if enabling it with #91, still doesn't render properly when latex fragment contains line breaks.

This is due to the fact that the line breaks within latex environment are wrapped with <div>, rather than <br>, which is the proper one as one can see from Anki's official document.

The minimal example where mathjax broke down is following.

\begin{align*}
\forall \epsilon > 0, \exists \delta > 0, \forall y, \\
\lvert x - y \rvert < \delta \implies \lvert f(x) - f(y) \rvert < \epsilon.
\end{align*}

After current pull request gets merged, such fragment starts to get handled properly.

orgtre commented 1 year ago

This was fixed in the develop branch here and is not an issue in orgtre/anki-editor as far as I can see.