Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper line break syntax for Mathjax latex environment #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HyunggyuJang
Copy link

@HyunggyuJang HyunggyuJang commented Oct 30, 2021

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.

jody-frankowski and others added 2 commits July 17, 2021 11:20
These are the delimiters Mathjax uses for display equations.
Note that as noted at https://docs.ankiweb.net/math.html#mathjax, you should use
<br> as line breaker rather than wrapping it as <div>.
@orgtre
Copy link

orgtre commented Oct 31, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants