-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Vertical misalignment of arrays #2083
Comments
Yes, this is the expected behavior at the moment. In fact, the commit that you reference specifically established this behavior (as described in the commit message). The easiest way to get the two to be the same size would be either to add padding to the one without the line to make it the same size as the other, or to add negative margin to the one with the line to remove the extra padding that it gets because of the line. The first could be handled via:
to match the extra frame spacing that the line forces on the array, while the second would be
to remove the extra vertical spacing from the array with the line. (You could use -.4em in place of the 0, but because the lines do extend .4em beyond the array, you might not want to do that.) |
Thank you for the answer.
I do not understand why this behavior is introduced. P.S. I am trying various features of MathJax currently and amazed by its quality and flexibility. Thank you for the great library! |
It has to do with how the underlying MathML is handled (since the TeX is turned into MathML). In version 3, the lines will not extend as they do in v2. In version 2, any line causes the MathML frame spacing to be used (and the frame spacing is in both directions). The TeX conversion to MathML could have set the frame spacing to 0, but didn't in v2.
You are welcome, and thank you for the kind words. |
Minimal test case: https://jsbin.com/vedulobegu/1/edit?html,output
The top padding of (the first line of) a LaTeX
array
changes depending on existence of horizontal rules inside the array.In the above test case, top edges of two
array
s are misaligned with each other.It seems that the difference comes from this code: 577b37e#diff-2f75a19c51cea069923d362e44d2deb0R154
Is this expected behavior? Is there any workaround to align them?
The text was updated successfully, but these errors were encountered: