-
Notifications
You must be signed in to change notification settings - Fork 14
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 Alignment of <mo> delimiters #205
Comments
I don't think the first edit is needed, as minsize only applies to stretchy operators (which may implicitly have that property via the operator dictionary). eg https://www.w3.org/TR/MathML3/chapter3.html#presm.presatt says
https://www.w3.org/TR/mathml-core/#operator-fence-separator-or-accent-mo
|
That’s a reasonable position. My aim was to eliminate ambiguity. If everyone agrees with David’s interpretation of the current specification, then the first edit is superfluous. |
Is the underlying problem with the first chromium issue, that chromium does not set |
The delimiters do change size when a |
We discussed this at the core meeting today. The feeling was that the problem is that the So I would suggest that @ronkok's proposal be tweaked: In 3.2.4.3, the second clause should be changed to (change is in bold): This change means that clause 4 of the "Otherwise" part kicks in and ascent and descent are set correctly:
|
I haven't checked things in details, but I agree with @davidcarlisle that per MathML full |
A related mo alignment issue is shown at chrome |
We discussed this again at the meeting today. The feeling is that since the MathML full spec says For the record: @dginev mentioned that CSS has a method to set min/max width/height. As noted in the call, this sets the bounding box min/max, not the min/max of a stretchy char. So there is no conflict between these attributes/properties. @ronkok: we propose to close this issue. Do you object to that? |
@NSoiffer, Thank you for the follow-up. I agree completely with a decision to forego the first edit that I suggested in this issue. But the original post also contains a second suggested edit to MathML-Core section 3.2.4.3:
That edit is still worthwhile. Its adoption would eliminate a vertical mis-placement of parentheses as shown here. I think closing this issue would be premature until that suggestion is at least considered. Perhaps you think it should be a separate, stand-alone issue. I would be happy to open one if you prefer. |
I have been asked by arXiv to raise awareness of the impact of this issue, cross-referencing arXiv/html_feedback#354 (comment) |
The working group discussed this yesterday, minutes follow:
|
I think that Chromium issue #40066018 is the one you seek. |
Chromium issue #40068339 may have the same root cause. |
This is maybe unrelated to the present discussion, but https://w3c.github.io/mathml-core/#dfn-shape-a-stretchy-glyph takes the target size Tascent + Tdescent as a parameter (since the MATH table only provides advanceMeasurement) and then https://w3c.github.io/mathml-core/#layout-of-operators calculates a Δ to make sure the actual selected glyph and the ideal (Tascent, Tdescent) target would have their vertical centers aligned. Below is an example, but without debugging more I'm not sure how to interpret the browsers's behavior here. I guess it would be interesting to check what TeX or Microsoft Word do for equivalent setup.
|
Hi, as I commented on chromium's tracker, I verified that the three bugs https://issues.chromium.org/issues/332931380/blocking are fixed by https://chromium-review.googlesource.com/c/chromium/src/+/5402478 ; so I don't think we need any further changes besides what we agreed in #103 #205 (comment) is a bit more tricky, as it involves embellishment. I believe it should be handled separately. Per MathML Core, the mrow layout stretches the (maybe embellished) operators with the ascent/descent of the "2x" by calling layout with the corresponding block stretch constraints, so I don't see why the vertical alignment of the embellished op can't be correct. I suspect it's a bug in Chromium, but will need some debugging. |
I am closing this issue as complete. Chrome Canary now renders these delimiters at the correct vertical alignment. A big thank you to @fred-wang. I this this is terrific and I have contributed $500 to MathML-Core-Support. |
@ronkok you're welcome and thanks for your donation. I'm tentatively converting your original tests to WPT: https://chromium-review.googlesource.com/c/chromium/src/+/5433295 (I was not able to reproduce with custom web fonts used by MathML wpt tests, so I'm using the default font instead, which might not make the test very robust, but let's see). |
I propose two edits to MathML-Core section 3.2.4.3 Layout of operators.
The first edit is shown below in bold.
stretchy
property or has theminsize
attribute:There is a current problem with
<mo>
delimiters in both Chromium and WebKit. This problem affects a parenthesis which does not havestretchy="true"
but has been up-sized with aminsize
attribute. Such delimiters should be vertically aligned to be centered on the math axis. Both Chromium and WebKit fail to make that adjustment.You can see an example if you navigate to the Temml Mozilla tests and scroll down to line 14. There are more examples in the Wikipedia tests, in lines 178 & 179.
I propose a second edit after the line which reads “Otherwise, the
stretch axis
of the operator is block. The following steps are performed.”I propose to insert item 2 below.
<mtext>
.This problem also occurs in both Chromium and WebKit. An example can be seen here. Those parentheses do not need to stretch, and they don’t. So far, so good. The problem is that they do not need an adjustment to their vertical alignment. But the alignment has been changed. They are placed too high.
My first proposal is related to Chromium Issue 1468676. My second proposal is related to Chromium Issue 1350167.
The text was updated successfully, but these errors were encountered: