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
One thing that continues to puzzle me is the lack of support for elementary math in many editors despite it being used by every student in every math class for at least five years of their life. Textbook publishers really need it and there are tons of (often poorly displayed) examples and tutorials on the web that use it. It was added to MathML 3 although support in many implementations of MathML has been poor to non-existent (including in MathJax).
I don't know if this is a sign that implementers don't care about elementary math (even Knuth left out support in TeX and someone had to write a complicated macro package to make it work). Or maybe this is a sign that it is hard. I implemented it in MathPlayer by using the table implementation and spreading the digits out into their own columns. Hence, it wasn't that complicated, but I did need to tweak MathPlayer's internal table code to add support for partial lines between rows (i.e., lines that start in column i and end in column j). Perhaps this can be done by using a colspan and the border property for where the mline should go.
The other alternative (and I suspect the likely one) is to exclude elementary math from core and write some JS that implements it via table. It loses some semantics that way, but maybe whatever solution is developed to help disambiguate presentation MathML (#64) can be used if such a translation is done.
First, this feature is different from e.g. matrix in the sense that it is not a mathematical object but a notation for a calculation: We can take the square root or power of a matrix but of a "elementary sum calculation". So that suggests it could be a separate spec / layout / document from what is currently in MathML Core.
One issue with elementary math is that you don't have data or layout rules from OpenType / TeX so we would have to invent/add these if we want to specify (and test, and implement) things properly. As you indicate it is also a bit more complex than HTML/CSS tables so we cannot exclusively rely on existing code. BTW, we have the same issue with tabular MathML in general, that's why core is restricted to basic support aligned with HTML / CSS tables for now.
The idea of automatically splitting and layouting text nodes is something that might make things complicate for browser implementation. I think we do this kind of thing for line breaking but I don't know if that would be easy.
Last but not least, for our current MathML project, we (Igalia) don't have any plan to implement elementary math support in browsers. I don't know whether any other browser implementer intends to work on it.
I think the rule of thumb in that situation (no clear spec rules, lack of compatibility with CSS/HTML,
no implementation plan) is to hold off putting anything in core and instead experiment with polyfills. So I agree with your "likely" solution.
I wrote a polyfill that transforms elementary math to an HTML table. I'd rather be able to use a MathML to make use of menclose for strikeouts, but those currently aren't in the igalia implementation.
Activity
fred-wang commentedon Mar 5, 2019
First, this feature is different from e.g. matrix in the sense that it is not a mathematical object but a notation for a calculation: We can take the square root or power of a matrix but of a "elementary sum calculation". So that suggests it could be a separate spec / layout / document from what is currently in MathML Core.
One issue with elementary math is that you don't have data or layout rules from OpenType / TeX so we would have to invent/add these if we want to specify (and test, and implement) things properly. As you indicate it is also a bit more complex than HTML/CSS tables so we cannot exclusively rely on existing code. BTW, we have the same issue with tabular MathML in general, that's why core is restricted to basic support aligned with HTML / CSS tables for now.
The idea of automatically splitting and layouting text nodes is something that might make things complicate for browser implementation. I think we do this kind of thing for line breaking but I don't know if that would be easy.
Last but not least, for our current MathML project, we (Igalia) don't have any plan to implement elementary math support in browsers. I don't know whether any other browser implementer intends to work on it.
I think the rule of thumb in that situation (no clear spec rules, lack of compatibility with CSS/HTML,
no implementation plan) is to hold off putting anything in core and instead experiment with polyfills. So I agree with your "likely" solution.
[-]Does elementary math belong in core?[/-][+]Elementary math[/+]NSoiffer commentedon May 18, 2020
I wrote a polyfill that transforms elementary math to an HTML table. I'd rather be able to use a MathML to make use of
menclosefor strikeouts, but those currently aren't in the igalia implementation.NSoiffer commentedon May 18, 2020
Closing this because no labels remain.