-
Notifications
You must be signed in to change notification settings - Fork 20
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
mrow-like elements and space-like / embellished operator / core operator #183
Comments
The spec seems to be silent on unknown elements other than a list of unknown MathML elements. Does HTML dictate what should happen for other elements? E.g., |
I think the spec does say it e.g. "Unknown MathML elements with display: math behave the same as the mrow element" https://mathml-refresh.github.io/mathml-core/#new-display-math-value and in several other places. |
In a call, @davidcarlisle pointed out that the behavior for non-MathML elements not in mtext are specified by the HTML parser to break out of MathML. However, @fred-wang also pointed out that one can manipulate the DOM via Javascript and put them in MathML, so we do need to say what should happen. |
@NSoiffer I'm not sure I follow the connection with this issue? |
consensus from feb 3: approved with special case for the math root |
…llished operator / core operator, since it's not included in mrow-like. w3c/mathml#183
Automatic update from web-platform-tests Update space-like tests. (#21568) w3c/mathml#183 -- wpt-commits: 56c5d893f8a3fc6cf2a889d1c42616098ac7959b wpt-pr: 21568
Automatic update from web-platform-tests Update space-like tests. (#21568) w3c/mathml#183 -- wpt-commits: 56c5d893f8a3fc6cf2a889d1c42616098ac7959b wpt-pr: 21568 UltraBlame original commit: 83194ea778725b67db177ae0c1333449101e6e00
Automatic update from web-platform-tests Update space-like tests. (#21568) w3c/mathml#183 -- wpt-commits: 56c5d893f8a3fc6cf2a889d1c42616098ac7959b wpt-pr: 21568 UltraBlame original commit: 83194ea778725b67db177ae0c1333449101e6e00
Automatic update from web-platform-tests Update space-like tests. (#21568) w3c/mathml#183 -- wpt-commits: 56c5d893f8a3fc6cf2a889d1c42616098ac7959b wpt-pr: 21568 UltraBlame original commit: 83194ea778725b67db177ae0c1333449101e6e00
Automatic update from web-platform-tests Update space-like tests. (#21568) w3c/mathml#183 -- wpt-commits: 56c5d893f8a3fc6cf2a889d1c42616098ac7959b wpt-pr: 21568
@fred-wang: can this be closed? If not, what's left to do? |
This commit updates tests after [1] [2]: * merror, mprescripts, none, unknown are now treated as other mrow-like elements. * maction and semantics are moved into a separate file and new tests added now that they are mrow-like elements with some hidden children. [1] w3c/mathml#182 [2] w3c/mathml#183
tests for space-like definition have been updated but we need to do that for embellished op too. Doing it in web-platform-tests/wpt#22381 |
This commit updates tests after [1] [2]: * merror, mprescripts, none, unknown are now treated as other mrow-like elements. * maction and semantics are moved into a separate file and new tests added now that they are mrow-like elements with some hidden children. [1] w3c/mathml#182 [2] w3c/mathml#183
…ators., a=testonly Automatic update from web-platform-tests Update MathML tests for embellished operators. (#22381) This commit updates tests after [1] [2]: * merror, mprescripts, none, unknown are now treated as other mrow-like elements. * maction and semantics are moved into a separate file and new tests added now that they are mrow-like elements with some hidden children. [1] w3c/mathml#182 [2] w3c/mathml#183 -- wpt-commits: c38ae4ac2e0af285deb06f33c75e1699d0718942 wpt-pr: 22381
…ators., a=testonly Automatic update from web-platform-tests Update MathML tests for embellished operators. (#22381) This commit updates tests after [1] [2]: * merror, mprescripts, none, unknown are now treated as other mrow-like elements. * maction and semantics are moved into a separate file and new tests added now that they are mrow-like elements with some hidden children. [1] w3c/mathml#182 [2] w3c/mathml#183 -- wpt-commits: c38ae4ac2e0af285deb06f33c75e1699d0718942 wpt-pr: 22381
…ators., a=testonly Automatic update from web-platform-tests Update MathML tests for embellished operators. (#22381) This commit updates tests after [1] [2]: * merror, mprescripts, none, unknown are now treated as other mrow-like elements. * maction and semantics are moved into a separate file and new tests added now that they are mrow-like elements with some hidden children. [1] w3c/mathml#182 [2] w3c/mathml#183 -- wpt-commits: c38ae4ac2e0af285deb06f33c75e1699d0718942 wpt-pr: 22381 UltraBlame original commit: 8e8fe19364e1c1ddc7d7ce589aa2fd8d8e23572c
…ators., a=testonly Automatic update from web-platform-tests Update MathML tests for embellished operators. (#22381) This commit updates tests after [1] [2]: * merror, mprescripts, none, unknown are now treated as other mrow-like elements. * maction and semantics are moved into a separate file and new tests added now that they are mrow-like elements with some hidden children. [1] w3c/mathml#182 [2] w3c/mathml#183 -- wpt-commits: c38ae4ac2e0af285deb06f33c75e1699d0718942 wpt-pr: 22381 UltraBlame original commit: 8e8fe19364e1c1ddc7d7ce589aa2fd8d8e23572c
…ators., a=testonly Automatic update from web-platform-tests Update MathML tests for embellished operators. (#22381) This commit updates tests after [1] [2]: * merror, mprescripts, none, unknown are now treated as other mrow-like elements. * maction and semantics are moved into a separate file and new tests added now that they are mrow-like elements with some hidden children. [1] w3c/mathml#182 [2] w3c/mathml#183 -- wpt-commits: c38ae4ac2e0af285deb06f33c75e1699d0718942 wpt-pr: 22381 UltraBlame original commit: 8e8fe19364e1c1ddc7d7ce589aa2fd8d8e23572c
The following elements are laid out as an mrow in MathML Core:
Unknown MathML Elements (e.g. mfenced)
maction
mphantom
mrow
mstyle
semantics
merror
math
mprescripts
none
After #139 #160 and #180, most of these elements use the same definition for space-like and embellished operators. @rwlbuis pointed out that it is not the case of merror, but that sounds a clear mistake to me.
The math element does not have any parent so the fact of being being embellished operator or space-like is not really important in general. The only difference is the case of a math with a single operator and other space-like elements, where the mrow-layout will or will not add space around the operator depending on whether math is treated as an embellished operator. If that's really important, we can add a special case in the https://mathml-refresh.github.io/mathml-core/#layout-of-mrow
The two last ones are generally empty, without padding/border/margin and in any case only used as "markers" inside mmultiscripts. So in general being embellished operator or space-like or laid out as mrow is not important at all ; this change should not be a big deal.
So my proposal is to define "mrow-like" elements to be one of the elements above i.e. the ones using the mrow layout (with perhaps additional CSS rules). Then change the definitions of space-like and embellished operators:
https://mathml-refresh.github.io/mathml-core/#definition-of-space-like-elements
A MathML Core element is a space-like element if is is:
An mtext or mspace,
Or an mrow-like element all of whose in-flow children are space-like.
https://mathml-refresh.github.io/mathml-core/#dfn-embellished
A MathML Core element is an embellished operator if is is:
Or one scripted MathML element or an mfrac, whose first in-flow child exists and is an embellished operator;
Or an mrow-like element whose in-flow children consist (in any order) of one embellished operator and zero or more space-like elements.
https://mathml-refresh.github.io/mathml-core/#dfn-core-operator
The core operator of an mo element; is the element itself.
The core operator of an embellished scripted element or is the core operator of its first in-flow child.
The core operator of an embellished mrow-like element is the core operator of its unique embellished operator in-flow child.
From the spec point of view, introducing a new concept simplifies definitions, improve readability and facilitate maintenance. Maybe the most obvious way to show the latter point is that the definition of Dictionary-based attributes is already out-of-sync: https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes (I'll open a separate issue for it)
Similarly from the implementer point of view, it's also easier to handle similar elements consistently rather than adding particular cases.
Note that I already followed that approach by introducing https://mathml-refresh.github.io/mathml-core/#dfn-scripted-mathml-elements
So to summarize, the proposal is:
math
root if we really want to preserve the layout of a math with a single mo and space-like children.The text was updated successfully, but these errors were encountered: