mathjax / mathjax/MathJax

Spacing after `bmatrix`/fenced expressions before `\text` is wider in version 4 than version 3

Open
#3,544 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Expected Behavior v4
Dominant language
JavaScript
Stars
10.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Expected the space between the expressions and \text{ m/s} to match version 3.

Similar issue https://github.com/mathjax/MathJax/issues/3514?

MathJax 3:
Image
MathJax 4:
Image

Reproduction

<!DOCTYPE html>
<html>
<head>
    <!-- MathJax 3 -->
    <!-- <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>-->

    <!-- MathJax 4 -->
    <script src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script>
</head>
<body>
\begin{aligned}
\begin{bmatrix}
x \\
y \\
\end{bmatrix}\text{ m/s} \\[1pt]
\left\{x\hat\imath\right\}\text{ m/s} \\[1pt]
\end{aligned}
</body>
</html>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied HTML reproduction and compare the MathJax 4 output with MathJax 3 for both the bmatrix and fenced-expression cases. Done means the space before \text{ m/s} matches the version 3 rendering in both examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.