-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
The line break(\\) is not work #2312
Comments
Linebreaks are not yet implemented in version 3. This is one of the significant features from version 2 that has not yet been ported to version 3. |
Is it possible to update the support information in the symbols table at http://docs.mathjax.org/en/v3.0-latest/input/tex/macros/index.html . |
I'm not sure what you want changed there. The macros are simply listed, and since In any case, it is not a TeX issue, but an output issue, and the fact that line breaking isn't implemented is documented in several places.
It will be next year, probably in the first half of the year, but there is no specific timetable at the moment. |
In the meantime, you can do something like
to get multiple lines |
Thanks for your reply. The information I said that adding a column in the macros table to show the support version. |
I'm not sure if it is helpful, but I also found the use of \display{align} honours the newline instruction as well.
This also requires the addition of the '&' before the alignment point, and has the benefit of making the equations more readable in our use case. |
For some reason, I had to add a third
This worked (2 lines):
|
@T-Kuhn, WordPress uses |
I'm moving this issue to the main MathJax issue tracker so that it can be found more readily by others. |
@dpvc Thanks for your reply. In the meantime, I figured out that the third backslash is only required if the "Using Markdown" toggle on our specific WordPress blog is set to "on". So, at least in my case, this was a problem between different plugins interfering with each other. Seems like the backslash get's handled as an escape character in Markdown mode on our blog. |
@T-Kuhn, yes, Markdown uses the backslash as an escape character. You may also need to be concerned about underscores, as these are used to indicate italics. So you may need to do things like |
Any update or schedule about it? |
@woody-li, there is a 3.1 update that is nearly ready to release (hope to have it out by the end of the month). The next release should be at the end of the summer, and will mainly be the long-awaited additional font support for v3 (including STIX2 support and tools for building the data needed for supporting other web fonts). So line breaking and other features will most likely have to wait until next year. |
Would it be bad of an idea to add referrence to this task to "Not Yet Ported to Version 3" section in the documenation, for those who go there and want to know status of those items, and possibly for other items on the list? (I assume this ticket is representative for the "Currently, automatic line breaking support is missing from version 3. This is a key feature to be included in a future release." bullet). |
That's the reason why nearly nobody is using MathJax 3. I would put it as highest priority if you want to distribute MathJax 3 and see it being successful. I nearly swapped to Katex because of this missing feature, and maybe will do so. However, Mathjax is still my favorite (bolder font, line break of Jax 2 and other features). |
So, still not working... |
@Humam-Hamdan, line breaking support is in v4.0-alpha released last year, and in the 4.0-beta released last week. The official v4.0 is planned for the end of August. |
@dpvc ok, thx |
@dpvc Hi again, currently on ver 4.1. but still not working. |
@Humam-Hamdan it seems you missed a backslash at the end. You should have |
Well, it didn’t, tried the double slashes but sadly didn’t work. |
@Humam-Hamdan ok. What version of MathJax are you using? Please provide a minimal reproducible example if you can. For example, if you open the following HTML file in your browser, you should see the equation properly rendered. The line break error will still be present if you replace the MathJax version <html>
<head>
<script>
MathJax = {
tex: {
inlineMath: [
["$", "$"],
["$$", "$$"],
],
},
svg: { fontCache: "global" },
};
</script>
<script
id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@4.0.0-beta.3/tex-mml-chtml.js"
></script>
</head>
<body>
$$f(x)=c;c \in \mathbb{R} \\ \mathbb{L} = \{y|y=c; c \in \mathbb{R}\}$$
</body>
</html> |
@Humam-Hamdan, there is no version 4.1, so I'm not sure which version you are using (4.0.0-alpha.1 maybe?). @nhpf's file works for me as expected, as it does when I change to 4.0.0-alpha.1 (and add the es5 directory), in case that's what you were using. It also works at 4.0.0-beta.4, which is the current beta release. This is an even smaller test file: <!DOCTYPE html>
<html>
<head>
<script
id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@4.0.0-beta.4/tex-chtml.js"
></script>
</head>
<body>
$$f(x)=c;c \in \mathbb{R} \newline \mathbb{L} = \{y|y=c; c \in \mathbb{R}\}$$
</body>
</html> |
This is not a MathJax version. What is it really that this is the version of? Some MathJax plugin for your content-management system? Also, the output you show is not the output from the file that either @nhpf or I sent you, as the blackboard bold characters are different in the v4.0 beta versions. When you say you copied and pasted, did you create a new blank file, say |
Oh Ok, I'm on obsidian, Thanks. |
@CaneMandarinesco, line breaking is supported in v4, which is currently in beta release. There will be at least one more beta version before an official release. The current beta is pretty close to the final version, but as this is a major update, all the ducks need to be in a row, and things have been pushed back, from our earlier planned release date. |
This affects the latest version of Jupyter lab. I'm finding my \\ backslashes are ignored in array cells. It used to work. |
Any update on releasing? It been some months |
To work around this, I'm trying to wrap any math that contains the For reference, this is what works in v2 (but the for wrapping
|
I know it is frustrating to have to wait for this; I'm frustrated by it as well. We have made several beta releases this year, but the final release is still not ready. We are dealing with some issues with the changes made in the assistive technology support that still need to be worked out, and it is taking longer than anticipated. there will need to be one more beta release before the official v4. The betas are in use in production sites, so if the need is urgent, you could consider that. The current beta.7 is pretty close to the final version, and the beta.4 release predates the problems that we are working on, if you want to try those out. |
Of course, there are uses of In any case, the v3 approach for your situation is to use the MathJax = {
startup: {
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.inputJax[0].preFilters.add(({math}) => {
if (math.math.match(/\\\\/)) {
math.math = `\\displaylines{${math.math}}`;
}
});
}
}
} is a simple version that does what you ask, but could be made more sophisticated to avoid the environments that use |
Thanks David, this works! I added one extra check to avoid the wrapping in case of tabular environments, though when I was testing, it did not matter in the rendering of the environment when they were wrapped in if (math.math.match(/\\\\/) && !math.math.match(/\\begin\{/)) {
math.math = `\\displaylines{${math.math}}`;
} |
The latex:
x = a + b \\ y = b + c
The line-break isn't effect and it renders as single line.
However, it works fine and renders as two lines at verision 2.
The text was updated successfully, but these errors were encountered: