mathjax / mathjax/MathJax

[v4.1.0] Spacing Difference Around "=" and "-" After Upgrading from MathJax 2.7.4 to 4.1.0

Open
#3,533 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Issue description
We recently upgraded MathJax from version 2.7.4 to 4.1.0 in our web application. After the upgrade, we observed a visual change in how the symbols "=" (equals) and "-" (minus) symbols are positioned relative to adjacent input text boxes..

There has been no change in the LaTeX input. The only change is the MathJax version

Observed behavior in MathJax 2.7.4
In version 2.7.4, the "=" and "-" symbols are rendered with appropriate spacing and appear visually aligned relative to the input text boxes.

Attached Screenshot of MathJax 2.7.4 output
Image

Observed behavior in MathJax 4.1.0
In version 4.1.0, there is no visible spacing between the symbols and the adjacent input text boxes, causing them to appear directly attached when compared to version 2.7.4.

Attached Screenshot of MathJax 4.1.0 output
Image

Attached HTML file
Mathjax-4.1.0-math-symbol-close-TextBox.html

Reproduction

  • No change in the LaTeX input
  • Only the MathJax version was upgraded to 4.1.0
  • The issue specifically affects the rendering/spacing of the "=" and "-" symbols near input elements..

Summary

  • MathJax 2.7.4: Symbols render with expected spacing.
  • MathJax 4.1.0: Symbols appear closer to adjacent input text boxes.
  • This results in a visible spacing difference in the UI

Question

  1. Is this spacing change expected behavior in MathJax 4.1.0?
  2. Is there a recommended configuration or approach to achieve rendering similar to MathJax 2.7.4?

Any guidance on supported or recommended solutions would be appreciated.

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 by running the attached Mathjax-4.1.0-math-symbol-close-TextBox.html and compare its output with MathJax 2.7.4 using the same LaTeX and input elements. Investigate whether the spacing change is expected in MathJax 4.1.0 and identify a supported configuration or approach that provides the earlier rendering, then document the result.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.