-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Code ExampleContains an illustrative code example, solution, or work-aroundContains an illustrative code example, solution, or work-aroundv3
Milestone
Metadata
Metadata
Assignees
Labels
Code ExampleContains an illustrative code example, solution, or work-aroundContains an illustrative code example, solution, or work-aroundv3
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
dpvc commentedon Oct 2, 2019
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.
woody-li commentedon Oct 3, 2019
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 .
Any schedule to implement the linebreak?
dpvc commentedon Oct 4, 2019
I'm not sure what you want changed there. The macros are simply listed, and since
\\
is used within multi-line environments, it needs to be listed there. There is a link to Carol Fisher's page about the macros (written for v2), but that is not something we maintain, so she would have to maintain it.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.
dpvc commentedon Oct 4, 2019
In the meantime, you can do something like
to get multiple lines
woody-li commentedon Oct 4, 2019
Thanks for your reply.
The \displaylines solved my problem.
The information I said that adding a column in the macros table to show the support version.
SeanFlemingMathsPathway commentedon Oct 9, 2019
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.
T-Kuhn commentedon Feb 4, 2020
For some reason, I had to add a third
/
on my environment (Japanese WordPress blog.)This didn't work (everything was rendered on the same line):
This worked (2 lines):
dpvc commentedon Feb 4, 2020
@T-Kuhn, WordPress uses
\
as a special character, and it is often stripped out of WordPress posts (depending on what editor you are using). As an escape character, it can prevent the normal action of the character that follows it, so to get an explicit backslash into your post, you need to double it. That is why you need an extra backslash (because the first two equal a single backslash in the output). You probably should double the second one as well, but apparently that is not required.dpvc commentedon Feb 4, 2020
I'm moving this issue to the main MathJax issue tracker so that it can be found more readily by others.
T-Kuhn commentedon Feb 5, 2020
@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.
dpvc commentedon Feb 5, 2020
@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
x\_1
rather thanx_1
in some situations.92 remaining items
CaneMandarinesco commentedon Jan 28, 2024
2024 and still no fix?

dpvc commentedon Jan 28, 2024
@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.
JWock82 commentedon Apr 7, 2024
This affects the latest version of Jupyter lab. I'm finding my \\ backslashes are ignored in array cells. It used to work.
Nambers commentedon Oct 20, 2024
Any update on releasing? It been some months
sowiso commentedon Oct 25, 2024
To work around this, I'm trying to wrap any math that contains the
\\
pattern in\displaylines{
math}
.In v2, I could manipulate the math using AuthorInit, but v3 does not support that any more. Could anyone help me with how to get this done in v3, so manipulate the math before it gets rendered?
For reference, this is what works in v2 (but the for wrapping
displaystyle{}
):dpvc commentedon Oct 27, 2024
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.
dpvc commentedon Oct 27, 2024
Of course, there are uses of
\\
that should not be put into\displaylines
, such as\begin{align}...\end{align}
blocks, but you might be able to filter those out.In any case, the v3 approach for your situation is to use the
startup.ready
function in your MathJax configuration. For example:is a simple version that does what you ask, but could be made more sophisticated to avoid the environments that use
\\
already for line breaking.sowiso commentedon Oct 28, 2024
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
\displaylines
. For reference, here's my adjustment:support newline with mathjax. see mathjax/MathJax#2312