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

define the -likes in the spec? #221

Closed
bkardell opened this issue Jun 9, 2020 · 8 comments
Closed

define the -likes in the spec? #221

bkardell opened this issue Jun 9, 2020 · 8 comments
Labels
MathML Core Issues affecting the MathML Core specification

Comments

@bkardell
Copy link
Collaborator

bkardell commented Jun 9, 2020

It strikes me reading the spec now that I had some trouble with understanding this for a while, and I have heard some confusion from others as well when we say things like "mrow-like". We list which elements are mrow-like, but I can't find anywhere where we actually define what these grouping mean. I'd like to suggest that in the spec, in section 2.1, just after the list of elements - it seems like we are missing important words explaining this? I don't have a concrete solution to this, but maybe I could help if we agree that makes sense... Perhaps something to the effect of

Many of these elements have common rendering qualities and interactions. For ease of understanding, we often refer to the following 'groups' of elements based on their rendering interactions.

  • mrow-like elements are container elements which ... explain here... the following elements are said to be 'mrow-like'
  • same for scripted, radical ..... token?
@NSoiffer
Copy link
Contributor

NSoiffer commented Jun 9, 2020 via email

@bkardell
Copy link
Collaborator Author

bkardell commented Jun 9, 2020

I mean... It's possible that you might just be "comfortable with it"? "How are they -like?" is my basic question and it seems a reasonable one. This came up on the CG call just last week - we said a new link element would be "row-like" and there was a question about if this affected whether it could have a shadow dom. Now, I answered this immediately with "no" because I understand in some very general terms at least, how it is (and isn't row-like). I'd suggest that this were very clear to everyone, the question wouldn't have been asked. Who would be more familliar with these terms than the group we had assembled? I would wager the answer is "practically no one" and that others would understand this less. But, idk... maybe. Just food for thought, I guess. Most of my own understanding of this comes from discussions with @fred-wang and reading the article that he wrote when there was some rework in WebKit...

@fred-wang
Copy link

That's basically what Neil saying, these are just definitions for a list of MathML elements so it can be easily referenced. Especially for mrow-like, this list was duplicated everywhere in MathML3 and the places not kept in sync ; so the definition in MathML Core was a way to solve this problem. It has also be used informally I guess in implementations.

If the name is an issue, we can just rename mrow-like to "grouping elements" (incidentally, I was told that "row" is not a good name if linebreaking is allowed...). Note that <none/> and <mprescripts/> are empty, but were put on this list since that's the default layout and we need to define one anyway, even if these elements are just empty boxes.

We can also do short sentences like in https://html.spec.whatwg.org/multipage/dom.html#phrasing-content ; but as Neil said this won't cover the whole concept and should just be understood as hints:

grouping elements => elements that layout as a generic mathematical container.

scripted elements => elements used to attach scripts to a mathematical expression.

radical elements => elements used to draw a radical symbol around a mathematical expression.

We don't define token elements in https://mathml-refresh.github.io/mathml-core/#mathml-elements-and-attributes because <mspace> would be included in that list per MathML3 while it actually does not contain text and uses a totally different layout algorithm. I see we use it in a few places (links, mathvariant, HTML embedding) but I suspect we really mean "token minus mspace). So maybe we should remove mspace from the "token elements" list or introduce a new definition:

text elements => elements used to draw text in mathematical formulas.

Finally, there is also space-like ; but this one is not a pure DOM concept, it requires to know in-flow children in addition to the tag name. So not sure we should move it to the top section. We can rename it "spacing elements" if -like is confusing.

@bkardell
Copy link
Collaborator Author

bkardell commented Jun 10, 2020

I think a thing like you said above is more or less exactly what I am looking for @fred-wang in that sec 2.1. Just something like this (which I realize is actually a number of proposals) would solve all those things nicely I think:


2.1.1 Kinds of content
Each element in MathML falls into zero or more categories that group elements with similar characteristics together. The following broad categories are used in this specification:

* grouping elements => elements that layout as a generic mathematical container.
* scripted elements => elements used to attach scripts to a mathematical expression.
* radical elements => elements used to draw a radical symbol around a mathematical expression.
* text elements => elements used to draw text in mathematical formulas.
* spacing elements =>  elements which do not affect the mathematical meaning of the expressions in which they appear.

<maybe insert a nice diagram like https://html.spec.whatwg.org/multipage/dom.html#kinds-of-content >

I'm happy to try to work out a pull if that is more helpful, but as it seems there's a number of changes to this it seems best to not waste time on that unless we're ok with it. This (including breaking from old terms) seems worth it because in my very limited experience, this has been the topic of really a lot of conversation which is trying to ultimately just understand how they are and aren't -like.

@NSoiffer
Copy link
Contributor

NSoiffer commented Jun 11, 2020 via email

@fred-wang fred-wang added the MathML Core Issues affecting the MathML Core specification label Jun 23, 2020
@fred-wang
Copy link

The idea was not to have a complete of categories (the list of complete elements is already provided) but just to introduce definitions of categories that are re-used elsewhere.

@fred-wang
Copy link

I renamed "mrow-like" to "grouping element" as agreed in July 13, 2020 meeting. I don't know if an extra description is necessary, I think the 3 names are self-explanatory and as Neil said it's just a list definition.

@NSoiffer
Copy link
Contributor

NSoiffer commented Oct 5, 2020

Doesn't seem to be anything left, so I'm closing this.

@NSoiffer NSoiffer closed this as completed Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MathML Core Issues affecting the MathML Core specification
Projects
None yet
Development

No branches or pull requests

3 participants