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

MathJax3 left curly brace misaligned and not smooth #2311

Closed
MacroUniverse opened this issue Feb 2, 2020 · 4 comments
Closed

MathJax3 left curly brace misaligned and not smooth #2311

MacroUniverse opened this issue Feb 2, 2020 · 4 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3
Milestone

Comments

@MacroUniverse
Copy link

MacroUniverse commented Feb 2, 2020

Hi,
I found these two little bugs after switching to MathJax3 (I'm using Chrome browser)

  1. The brace is not smooth when there are many lines (html page)
    image
    image
  2. The brace is lower than it should be (html page)
    image
    image
  3. Also, if multiple & are used for alignment, no error will be reported, but this is not allowed in LaTeX
@MacroUniverse MacroUniverse changed the title MathJax3 left curly brace misaligned and not smooth MathJax3 left curly bracket misaligned and not smooth Feb 2, 2020
@MacroUniverse MacroUniverse changed the title MathJax3 left curly bracket misaligned and not smooth MathJax3 left curly brace misaligned and not smooth Feb 2, 2020
@dpvc
Copy link
Member

dpvc commented Feb 3, 2020

Your second issue is a duplicate of #2186 and #2038.

For your first, can you say what browser and OS you are using? Does it change if you zoom in or out?

@MacroUniverse
Copy link
Author

MacroUniverse commented Feb 6, 2020

@dpvc I'm using Windows 10, and it become smooth if I zoom in really large. The misalignment is always within one pixel, looks like it's because the upper and lower part has some kind of gradien, but the middle part does not.

@dpvc
Copy link
Member

dpvc commented Feb 10, 2020

What browser are you using?

The middle part is handled using a transform that stretches the piece (vertically) so that only one piece is needed regardless of the size of the brace. That means that the rounding to pixel positions may not be exactly the same for the stretched and unstreched parts. Because that is dependent on scaling and other factors, it may be hard to find a solution that works at all scales in all browsers on all platforms.

I'll have to see what I can figure out.

@dpvc
Copy link
Member

dpvc commented Mar 5, 2020

I have made a pull request with a change that helps the brace situation at most scaling factors.

For now, you can add

mjx-stretchy-v > * > mjx-c {
    transform: scaley(1.0000001) ! important
}
mjx-stretchy-h > * > mix-c {
   transform: scalex(1.00000001) ! important
}

to the CSS for your page in order to get the same result until the next release of MathJax is available.

@dpvc dpvc removed their assignment Mar 5, 2020
dpvc added a commit to mathjax/MathJax-src that referenced this issue Mar 30, 2020
Improve multi-glyph stretchy characters in Chrome.  (mathjax/MathJax#2311)
@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Mar 30, 2020
@dpvc dpvc added the Fixed label Apr 10, 2020
@dpvc dpvc closed this as completed Apr 10, 2020
@dpvc dpvc removed the Merged Merged into develop branch label Sep 3, 2020
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
Projects
None yet
Development

No branches or pull requests

2 participants