Page MenuHomePhabricator

Trailing linebreak via `\\` in <math> matrix should be ignored
Closed, ResolvedPublicBUG REPORT

Description

Enable "Client side MathJax rendering" in Special:Preferences → Apperance → Math. Then preview a page with the contents

<math>
\begin{bmatrix}
1 & 0  \\
\end{bmatrix}
</math>

The rendered matrix has an additional empty line at the bottom of matrix due to the double backtick (\\):

image.png (121×124 px, 1 KB)

This does not happen in pdflatex or with the old SVG-based <math> tags.

If you enable "MathML (experimental; no images)" in the settings instead, you also get an extra line below but it's much smaller.

Event Timeline

Dexxor renamed this task from Trailing newline in <math> should be ignored to Trailing newline in <math> matrix should be ignored.Feb 19 2025, 9:04 AM
Dexxor renamed this task from Trailing newline in <math> matrix should be ignored to Trailing linebreak via `\\` in <math> matrix should be ignored.

Change #1170744 had a related patch set uploaded (by JeanCASPAR; author: JeanCASPAR):

[mediawiki/extensions/Math@master] Ignore trailing line breaks in matrix-like environments

https://gerrit.wikimedia.org/r/1170744

Change #1170744 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Ignore trailing line breaks in matrix-like environments

https://gerrit.wikimedia.org/r/1170744