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

[BUG] MathJax 3 Line Break Bug - Support MathJax 2 and/or 4 #1776

Open
battaglia01 opened this issue Sep 19, 2023 · 3 comments
Open

[BUG] MathJax 3 Line Break Bug - Support MathJax 2 and/or 4 #1776

battaglia01 opened this issue Sep 19, 2023 · 3 comments
Assignees
Labels

Comments

@battaglia01
Copy link

Describe the bug

MathJax 3 has a well-known line break bug which causes line breaks not to work:

$$
a = 1 \\
b = 2 \\
c = 3 \\
d = 4
$$

looks like this with the new MathJax 3:

image

It should look like this:

image

Solution

This was working in MathJax 2. Many people haven't upgraded to MathJax 3 as a result of this bug. Even Jupyter didn't upgrade to MathJax 3 for a long time because of this.

I would suggest letting the user choose different MathJax versions - it would be great if we could go back to MathJax 2.

Or, the new MathJax 4 should be released any day now - they're a few weeks behind.

@battaglia01
Copy link
Author

I note that if you set the "MathJax V3 Script Src" to the 4.0.0 beta:

https://cdn.jsdelivr.net/npm/mathjax@4.0.0-beta.3/tex-mml-chtml.js

then this works again.

I am not sure if MathJax 4 is backwards compatible with MathJax 3 in every way but it seems to work so far. I'd suggest supporting this version officially.

@yuriever
Copy link

yuriever commented Sep 28, 2023

I think this should not be considered as a bug. MathJax is designed to be as similar as LaTeX.

In LaTeX the standard multiline equation is the align environment with & and \\. $$ or equation* should not be used to display multiline equations.

In MathJax 3 align environment has been supported long ago.

@battaglia01
Copy link
Author

battaglia01 commented Sep 28, 2023

No, that is not correct. MathJax was designed to support line breaks with \\ even though they aren't in LaTeX. MathJax 3 broke this but planned to reimplement it, and now they have with MathJax 4. Again, this is a well known issue that has been talked about extensively.

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

No branches or pull requests

3 participants