Page MenuHomePhabricator

MathJax Error "Bracket argument to \\ must be a dimension" in \begin{align}
Closed, ResolvedPublic

Description

Intention:
When I use something like \\[5px] to add 5px space between lines in a formula of an align-enviroment I get the error "Bracket argument to \\ must be a dimension".

Steps to Reproduce:

  1. Save a page with the code:

<math>\begin{align}
1+1=1 \\[5px]
2+2=4
\end{align}</math>

Actual Results:
When rendering the above equation with MathJax, one gets the error "Bracket argument to \\ must be a dimension".

Expected Results:
The equation should be rendered properly with 5px space between each line.

Reproducible: Always

The problem do not occur when one uses for example "ex" as a dimension (e.g. "\\[2ex]"). I also noticed that there is natively more vertical space in MathJax between lines inside equations so that one can also omit the extra space argument.

I do not know whether there are plans to change the default math rendering to MathJax, but if so this bug might be a problem. That's why I reported it.


Version: unspecified
Severity: minor

Details

Reference
bz69554

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:30 AM
bzimport set Reference to bz69554.
bzimport added a subscriber: Unknown Object (MLST).

Thanks for reporting this. It is a bug in MathJax -- I've reported it at https://github.com/mathjax/MathJax/issues/890. Shouldn't be hard to fix.

Thanks again for your help!
Peter (from the MathJax team.)