You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can remove it but implement the CSS style text-align. We will have the same effect.
Quick comment on this:
(1) As others stated elsewhere, people who implement MathML in a non-browser context might want to keep it.
(2) As I commented in a previous meeting, if we decide to support text-align (which makes sense and avoids to introduce new properties) we will need to extend its definition for math layout. Currently, the CSS spec says "how the inline-level content of a block is aligned along the inline axis if the content does not completely fill the line box" ( https://drafts.csswg.org/css-text-3/#text-align-property ). Note that we still haven't defined precisely the CSS display values of MathML elements ( #56 ).
(II) Keep numalign/denomalign attributes for MathML but not expose them at all to CSS (Firefox and WebKit's implementation). I guess this would be fine for the short term but I suspect people would like to rely on CSS in the future.
(III) Implement numalign/denomalign using CSS properties. Two options:
which implies introducing universal selectors for UA agent stylesheet, something we want to avoid as Chromium implementers (otherwise they need to be "expanded" with all the possible MathML element names). I don't know if we can implement such a mapping in the MathML C++ code.
ALIGNMENT-PROPERTY can just be text-align, but that will require introducing a new CSS display for and that we override the definition of text-align, two things that need the approval of the CSS WG.
which actually can also be directly implemented in the C++ code. The disadvantage is that we would need to introduce two independent CSS properties and get approval from the CSS WG. In general, we want to avoid introducing too many CSS properties if they are not justified.
(IV) Same as (III)(A) but remove the MathML attributes (i.e. what Dani said) and move them to CSS polyfills. However, maybe some people will complain that we still need to support non-CSS environment.
(V) Currently, only a use case for numalign was provided by @davidcarlisle. So another alternative is to do something like (III)(B) but remove denomalign. The cons is that users will likely complain of not keeping the symmetry.
There is a use case for this but I agree we want to "ration" the number of css-extension requests we make.
Definitely they should be in full mathml. If it was easy (or possible) for a document author to get the effect with css than I'd even say drop from core (at least initially, revisit if there is end user demand) but if I understand you correctly that there isn't currently anything that even an in-document stylesheet can do unless css is extended.
so perhaps I'd go for this if CSS WG are happy with that
(IV) Same as (III)(A) but remove the MathML attributes (i.e. what Dani said) and move them to CSS
polyfills. However, maybe some people will complain that we still need to support non-CSS environment.
I think non CSS environments will most likely need to define their own subsets of full that are compatible with, but not necessarily the same as, mathml core, and so they could allow "native" handling of these attributes if needed.
Chiming in a little late on uses cases, but this Wikipedia page on inference rules uses left alignment for the premise and conclusion. I've seen several others that center them. Logic is not something I took, so I don't know what is really the correct notation (maybe both?).
I'm a bit surprised, but neither the arXiv stats nor the NAG stats have any usage of numalign or denomalign. So despite potential usage for continued fractions and logical inference rules, they don't seem to be getting much use.
I don't see how this very rarely usage feature of MathML is worth spending any "capital" with the CSS WG (i.e., let's keep our requests for those things that are critical). I very much agree they should remain in full and a polyfill created that uses text-align as per @dani31415's suggestion. So, I agree with @davidcarlisle that we go with @fred-wang's IV:
(IV) Same as (III)(A) but remove the MathML attributes (i.e. what Dani said) and move them to CSS
polyfills.
...if we decide to support text-align (which makes sense and avoids to introduce new properties) we will need to extend its definition for math layout. Currently, the CSS spec says "how the inline-level content of a block is aligned along the inline axis if the content does not completely fill the line box" (https://drafts.csswg.org/css-text-3/#text-align-property). Note that we still haven't defined precisely the CSS display values of MathML elements ( #56 ).
Sorry for being dense, but why is an extension needed for math layout? Don't we want exactly the same thing to happen for numerators/denominators of fractions as happens when textalign is left/right/center?
Chiming in a little late on uses cases, but this Wikipedia page on inference rules uses left alignment for the premise and conclusion. I've seen several others that center them. Logic is not something I took, so I don't know what is really the correct notation (maybe both?).
mfrac is for fractions or fractions-like argument per https://mathml-refresh.github.io/mathml/chapter3.html#presm.mfrac but here it describes inference rules so it does not seem appropriate to use a fraction. Actually, the HTML/MathML on this page is not very good: it's two separate formulas one of the top of the other and the top one has an munder with a stretchy underline. Also, I don't think the alignment is important for the semantic, it's probably a author hack to ensure that the top and bottom SVG image have the same width and hence align correctly.
I believe this use case is similar to commutative diagrams, where the expected rendering could be emulated with mtable but what we really want is MathML formulas inside an SVG image. I would be good to check how this is implemented in LaTeXML, maybe there are some arXiV articles.
...if we decide to support text-align (which makes sense and avoids to introduce new properties) we will need to extend its definition for math layout. Currently, the CSS spec says "how the inline-level content of a block is aligned along the inline axis if the content does not completely fill the line box" (https://drafts.csswg.org/css-text-3/#text-align-property). Note that we still haven't defined precisely the CSS display values of MathML elements ( #56 ).
Sorry for being dense, but why is an extension needed for math layout? Don't we want exactly the same thing to happen for numerators/denominators of fractions as happens when textalign is left/right/center?
We want the same rendering but it's difficult to see if the CSS concepts involved in the definition of text-align would just work here until we clarify all the CSS display, size etc for MathML elements. So I would not bother the CSS WG until we are sure of what we want and have a solid proposal.
For example I don't think we can use text-align to emulate numalign/denomalign in this case (which is close to current Chromium and WebKit implementations CSS-wise).
Inference notation uses a fraction-like notation and hence is an appropriate use of mfrac. mfrac hints at a semantics, but doesn't specify it. The math on the web CG came up with a page that deals with ambiguous notations, with a long section devoted to fraction-like notations, only one of which is semantically a fraction. The logic notation is part of that (although in they point off to one that centers it). Dealing with these other uses is something I hope the non-core group figures out with respect to accessibility.
For me all but 2-Dimensional vector notation and logical deduction are fraction-like in the sense of binary functions with some kind of multiplicative property. I'm not sure what's the 2-Dimensional vector notation, but for me it's a matrix so it should rely on mtable. And the logical deduction is more a diagram to me (you basically put several deduction on the same schema to produce sequence of deduction). Anyway, all of this is subjective and MathML 3 is not clear at all, so people could use whatever they want to emulate a visual rendering of the formula. But again, it's not clear whether the alignment is important at all for logical deduction.
What is the plan for interpreting the CSS align properties? I'm guessing the answer is either "ignore them" or "they do whatever they do", but if they were implemented to support left and right alignment, then a polyfill could take advantage of them.
Activity
davidcarlisle commentedon Feb 22, 2019
for fractions at least the main use of alignment is continued fractions see section 4.12
http://anorien.csc.warwick.ac.uk/mirrors/CTAN/macros/latex/required/amsmath/amsldoc.pdf
where amsmath supports \cfrac (left alignment) and \cfrac[r] (right)
As far as possible we should be able to support amsmath which is the base level support for math typesetting in LaTeX.
dani31415 commentedon Feb 25, 2019
We can remove it but implement the CSS style
text-align. We will have the same effect.fred-wang commentedon Mar 14, 2019
Quick comment on this:
(1) As others stated elsewhere, people who implement MathML in a non-browser context might want to keep it.
(2) As I commented in a previous meeting, if we decide to support
text-align(which makes sense and avoids to introduce new properties) we will need to extend its definition for math layout. Currently, the CSS spec says "how the inline-level content of a block is aligned along the inline axis if the content does not completely fill the line box" ( https://drafts.csswg.org/css-text-3/#text-align-property ). Note that we still haven't defined precisely the CSS display values of MathML elements ( #56 ).fred-wang commentedon Mar 14, 2019
Thanks. it seems this is only for
numalignthough. Do we have use cases fordenomalignandalign? (maybe non-LaTeX use case)In general per #55 we should figure out how MathML converters handle things like
( TeXZilla/itex2MML don't support that command https://golem.ph.utexas.edu/~distler/blog/itex2MMLcommands.html https://github.com/fred-wang/TeXZilla/blob/master/base-commands.txt )
fred-wang commentedon Apr 24, 2019
Here is the summary of the options:
(I) Remove numalign/denomalign attributes.
(II) Keep numalign/denomalign attributes for MathML but not expose them at all to CSS (Firefox and WebKit's implementation). I guess this would be fine for the short term but I suspect people would like to rely on CSS in the future.
(III) Implement numalign/denomalign using CSS properties. Two options:
(A) It could be something like
mfrac[numalign="left"] > *:first-child {
ALIGNMENT-PROPERTY: left;
}
mfrac[denomalign="left"] > *:last-child {
ALIGNMENT-PROPERTY: left;
}
...
which implies introducing universal selectors for UA agent stylesheet, something we want to avoid as Chromium implementers (otherwise they need to be "expanded" with all the possible MathML element names). I don't know if we can implement such a mapping in the MathML C++ code.
ALIGNMENT-PROPERTY can just be text-align, but that will require introducing a new CSS display for and that we override the definition of text-align, two things that need the approval of the CSS WG.
(B) Or introducing independent properties like
mfrac[numalign="left"] {
NUMALIGN-PROPERTY: left;
}
mfrac[denomalign="left"] {
DENOMALIGN-PROPERTY: left;
}
which actually can also be directly implemented in the C++ code. The disadvantage is that we would need to introduce two independent CSS properties and get approval from the CSS WG. In general, we want to avoid introducing too many CSS properties if they are not justified.
(IV) Same as (III)(A) but remove the MathML attributes (i.e. what Dani said) and move them to CSS polyfills. However, maybe some people will complain that we still need to support non-CSS environment.
(V) Currently, only a use case for numalign was provided by @davidcarlisle. So another alternative is to do something like (III)(B) but remove denomalign. The cons is that users will likely complain of not keeping the symmetry.
davidcarlisle commentedon Apr 24, 2019
There is a use case for this but I agree we want to "ration" the number of css-extension requests we make.
Definitely they should be in full mathml. If it was easy (or possible) for a document author to get the effect with css than I'd even say drop from core (at least initially, revisit if there is end user demand) but if I understand you correctly that there isn't currently anything that even an in-document stylesheet can do unless css is extended.
so perhaps I'd go for this if CSS WG are happy with that
I think non CSS environments will most likely need to define their own subsets of full that are compatible with, but not necessarily the same as, mathml core, and so they could allow "native" handling of these attributes if needed.
NSoiffer commentedon Apr 25, 2019
Chiming in a little late on uses cases, but this Wikipedia page on inference rules uses left alignment for the premise and conclusion. I've seen several others that center them. Logic is not something I took, so I don't know what is really the correct notation (maybe both?).
NSoiffer commentedon Apr 25, 2019
Just an FYI...
I'm a bit surprised, but neither the arXiv stats nor the NAG stats have any usage of numalign or denomalign. So despite potential usage for continued fractions and logical inference rules, they don't seem to be getting much use.
NSoiffer commentedon Apr 25, 2019
I don't see how this very rarely usage feature of MathML is worth spending any "capital" with the CSS WG (i.e., let's keep our requests for those things that are critical). I very much agree they should remain in full and a polyfill created that uses text-align as per @dani31415's suggestion. So, I agree with @davidcarlisle that we go with @fred-wang's IV:
@fred-wang wrote earlier:
Sorry for being dense, but why is an extension needed for math layout? Don't we want exactly the same thing to happen for numerators/denominators of fractions as happens when textalign is left/right/center?
fred-wang commentedon Apr 25, 2019
mfrac is for fractions or fractions-like argument per https://mathml-refresh.github.io/mathml/chapter3.html#presm.mfrac but here it describes inference rules so it does not seem appropriate to use a fraction. Actually, the HTML/MathML on this page is not very good: it's two separate formulas one of the top of the other and the top one has an munder with a stretchy underline. Also, I don't think the alignment is important for the semantic, it's probably a author hack to ensure that the top and bottom SVG image have the same width and hence align correctly.
I believe this use case is similar to commutative diagrams, where the expected rendering could be emulated with mtable but what we really want is MathML formulas inside an SVG image. I would be good to check how this is implemented in LaTeXML, maybe there are some arXiV articles.
fred-wang commentedon Apr 25, 2019
We want the same rendering but it's difficult to see if the CSS concepts involved in the definition of text-align would just work here until we clarify all the CSS display, size etc for MathML elements. So I would not bother the CSS WG until we are sure of what we want and have a solid proposal.
For example I don't think we can use text-align to emulate numalign/denomalign in this case (which is close to current Chromium and WebKit implementations CSS-wise).
NSoiffer commentedon Apr 25, 2019
Inference notation uses a fraction-like notation and hence is an appropriate use of
mfrac.mfrachints at a semantics, but doesn't specify it. The math on the web CG came up with a page that deals with ambiguous notations, with a long section devoted to fraction-like notations, only one of which is semantically a fraction. The logic notation is part of that (although in they point off to one that centers it). Dealing with these other uses is something I hope the non-core group figures out with respect to accessibility.fred-wang commentedon Apr 25, 2019
For me all but 2-Dimensional vector notation and logical deduction are fraction-like in the sense of binary functions with some kind of multiplicative property. I'm not sure what's the 2-Dimensional vector notation, but for me it's a matrix so it should rely on mtable. And the logical deduction is more a diagram to me (you basically put several deduction on the same schema to produce sequence of deduction). Anyway, all of this is subjective and MathML 3 is not clear at all, so people could use whatever they want to emulate a visual rendering of the formula. But again, it's not clear whether the alignment is important at all for logical deduction.
31 remaining items
Bug 1570249 [wpt PR 18194] - Make test for mfrac alignment attributes…
Make test for mfrac alignment attributes check that they are ignored. (…
Bug 1570249 [wpt PR 18194] - Make test for mfrac alignment attributes…
Bug 1570249 [wpt PR 18194] - Make test for mfrac alignment attributes…
Bug 1570249 [wpt PR 18194] - Make test for mfrac alignment attributes…
NSoiffer commentedon May 20, 2020
Just to be clear upfront: I am not proposing adding numalign/denomalign back into core.
In a comment, @fred-wang wrote:
What is the plan for interpreting the CSS align properties? I'm guessing the answer is either "ignore them" or "they do whatever they do", but if they were implemented to support left and right alignment, then a polyfill could take advantage of them.
fred-wang commentedon May 20, 2020
There is no short-term plan to define/test/implement CSS properties for https://www.w3.org/TR/css-align-3/ (see https://mathml-refresh.github.io/mathml-core/#css-styling for ignored properties). FWIW, the old tests from Firefox use mspace to force alignment ; until the CSS layout API is available you could add mspaces of width mfrac.width - num/denum.width on the proper side of the num/denum
NSoiffer commentedon May 20, 2020
Yes, measuring seems to be the only solution. The downside of that is that one can't transform the MathML into core on the server (or earlier).
Reopening because we still need a polyfill.
NSoiffer commentedon Jun 3, 2020
I've written a polyfill for this: https://github.com/mathml-refresh/mathml-polyfills/tree/master/horiz-align
davidcarlisle commentedon Aug 8, 2024
will be kept in full and not in core, so closing here.
Bug 1570249 [wpt PR 18194] - Make test for mfrac alignment attributes…