-
-
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
small problems with menclose #2571
Comments
Thanks for the report. You are correct that the misplacement is due to the change in size on one side only. I will look into how to resolve that. For 19 and 20, do you mean that the arrow should be on the fraction line (not the center of the plus)? We don't currently support RTL, but would like to in the future. Thanks also for the kudos. The arrows are my doing. I was pleased that I was able to do all the enclosures with CSS, and didn't have to resort to SVG as I did in v2. |
You are correct that the the text for 19 and 20 is incorrect -- copy/paste that wasn't updated. I'll fix up the codepen. |
…ke sure diagonal arrows fit the actual box used. (mathjax/MathJax#2571)
Fix issues with placement of menclose notations. (mathjax/MathJax#2571)
Issue Summary
There are some issues with positioning and length of 'strikes' arrows in menclose.
Also, RTL direction is not being handled (an issue only if RTL is meant to be handled).
Description:
Position and Length
Overall, there are some small rendering errors with the positioning of the strikes and arrow notation values. There are a few that are larger. You can see the contrast in the following. In the first example below, the arrows are close to correct -- the lines should go through the center of the '+' and through the division line as those are the centerpoint of the box. Within a subpixel, these are correct (shown zoomed at 200% to make it easier to see, but it is off at 100% also):
A problem with the above rendering is that the diagonal arrows are a little short and don't reach the box around the contents; the horizontal and vertical lines do touch the box.
If only
left
orright
is given (as opposed to box which is both left and right), the position is worse:I believe the problem occurs because the border padding is only added on one side. The positioning of the vertical line/arrow should not be affected by other decorations (as per the spec).
A similar problem happens with the horizontal positioning and
top
andbottom
:RTL
I didn't see anything in the MathJax docs that said MathJax supports right-to-left rendering. If it does, then you missed support of it on menclose. Here are three cases that should switch according to the spec:
Technical details:
I have put a large suite of test examples in codepen. It is using MathJax (see the JS section for details)
Kudos:
I discovered these problems when working on a polyfill for MathML Core. I used the clever ideas for drawing the pieces with CSS borders in my polyfill. A big round of applause to whomever came up the CSS for drawing the arrowheads! I wouldn't have thought you could do that if I hadn't seen it written down.
The text was updated successfully, but these errors were encountered: