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

v4-beta.3 vcenter superscript sometimes too high? #3091

Open
pkra opened this issue Aug 22, 2023 · 3 comments
Open

v4-beta.3 vcenter superscript sometimes too high? #3091

pkra opened this issue Aug 22, 2023 · 3 comments
Labels
Accepted Issue has been reproduced by MathJax team Merged Merged into develop branch Test Needed v4
Milestone

Comments

@pkra
Copy link
Contributor

pkra commented Aug 22, 2023

This might be working as intended but I'd like to make sure.

This is not a great example without the images but I think the bounding boxes still exhibit the problem well enough.

Rough example: \begin{array}{cccccccc} \mu (\vcenter{\img[][23pt][12pt][{\ydiagram{2}}]{Images/imga6e7d436279b36ae53cb717cbf4d8abb.svg}}^+, E) = 1 & & \mu (\vcenter{\img[][12pt][23pt][{\ydiagram{1,1}}]{Images/img702ab7f412e90ac9256defbedc136351.svg}}^+, E) = 2 & \\\end{array}

The first superscript comes out

image

Whereas the second seems noticeably higher

image

Since the bounding box info is overlapping, here's a before/after with the full example (with STIX Two):

Before:
image

After:
image

@dpvc
Copy link
Member

dpvc commented Aug 23, 2023

It's an error. In the line-breaking updates, I moved handling of \vcenter from the internal TeXAtom node to the mrow node, and apparently didn't handle the bounding box quite right. I will look into it and provide a fix if I can.

@dpvc dpvc added Accepted Issue has been reproduced by MathJax team Investigate v4 labels Aug 23, 2023
@pkra
Copy link
Contributor Author

pkra commented Aug 23, 2023

Thanks, Davide!

@dpvc
Copy link
Member

dpvc commented Sep 11, 2023

OK, I found the issue. There is a function getBaseCore() that find the core node of the base of an msup, msub, or msubsup node (something like finding the core of an embellished operator, but the base doesn't have to be an operator). This was not taking into account the changes I mentioned above relating to how \vcenter was implemented. I have made a PR to resolve the issue (mathjax/MathJax-src#1000).

@dpvc dpvc added this to the v4.0 milestone Sep 15, 2023
dpvc added a commit to mathjax/MathJax-src that referenced this issue Sep 15, 2023
Propery handle placement of scripts on \vcenter, \vbox, and \vtop (mathjax/MathJax#3091)
@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Sep 15, 2023
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 Merged Merged into develop branch Test Needed v4
Projects
None yet
Development

No branches or pull requests

2 participants