Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input like "x + \text{a{b}c}" renders parts on top of each other when using Node #2577

Closed
thomasjm opened this issue Dec 7, 2020 · 2 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3 v3.1
Milestone

Comments

@thomasjm
Copy link

thomasjm commented Dec 7, 2020

Issue Summary

The input x + \text{a{b}c} renders visually wrong, with parts piled up on top of each other. This seems to only happen when using the Node demos. I can't reproduce it in MathJax-demos-web by putting the same string into tex-svg.html.

Steps to Reproduce:

git clone git@github.com:mathjax/MathJax-demos-node.git
cd MathJax-demos-node
npm install
./direct/tex2svg "x + \text{a{b}c}" > test.html # No need for the CSS to see the problem
google-chrome test.html

Technical details:

  • MathJax Version: 3.1.2
  • Client OS: Ubuntu 20.04
  • Browser: Chrome 87.0.4280.66

Supporting information:

The result looks like this:

Screenshot from 2020-12-06 17-37-55

I don't see any other errors.

@thomasjm
Copy link
Author

thomasjm commented Dec 7, 2020

Note: it also happens with nested math such as x + \text{a$b$c}

@dpvc dpvc added Accepted Issue has been reproduced by MathJax team v3 labels Dec 7, 2020
@dpvc
Copy link
Member

dpvc commented Dec 7, 2020

Thanks for the report. This is an issue with the textmacros extension, and it is related to #2524. Apparently there are situations that didn't get resolved by the fix for that issue. I'll look into it.

In the meantime, you can disable the textmacros extension (if you aren't using its features) using the --packages option to load only those you need (or the full list minus textmacros), or you can modify the tex2svg script to leave out textmacros automatically.

dpvc added a commit to mathjax/MathJax-src that referenced this issue Jan 31, 2021
dpvc added a commit to mathjax/MathJax-src that referenced this issue Jan 31, 2021
@dpvc dpvc added this to the 3.1.3 milestone Jan 31, 2021
dpvc added a commit to mathjax/MathJax-src that referenced this issue Feb 9, 2021
Use mrow rather than inferredMrow if text mode produces more than one. (mathjax/MathJax#2577)
@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Feb 9, 2021
@dpvc dpvc added Fixed v3.1 and removed Merged Merged into develop branch labels Apr 27, 2021
@dpvc dpvc closed this as completed Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3 v3.1
Projects
None yet
Development

No branches or pull requests

2 participants