Open fred-wang opened 4 years ago
Currently, none of the mtable
/mtr
/mtd
attrs are mentioned in core (see w3c/mathml#114). We should spend some time to understand what can be supported in core and what needs to be changed. I agree with @fred-wang that this will take significant effort and so needs to be put off until the next version. That definitely limits the usefulness of mtable
, but at least symbolic and integer matrices can be supported; not ones with decimal numbers though (#180, w3c/mathml#114) 👎
Decimal alignment is particularly important for math. There is the issue of what is a decimal ("." or ","), so maybe align on a character?
Decimal alignment is particularly important for math. There is the issue of what is a decimal ("." or ","), so maybe align on a character?
One dirty workaround is by splitting numbers into two columns, one that is right-aligned and one that is left-aligned. Here is an ugly paint mockup
The current table description in MathML Core is very limited, basically just mtable/mtr/mtd similar to HTML with centered cells.
It also has columnspan / rowspan attributes on mtd, just saying that the "syntax and semantic". I'm proposing to drop this for version 1. I think there are several issues that should be discussed and addressed:
MathML3 actually has much more complex spanning attributes and even tabular features, which have not been designed for compatibility with the rest of the platform. I think we will need a broader discussion of what are the relevant attributes, how/whether to make them CSS-compatible, whether to propose new properties or rely on existing features like Grid. Similarly, there are interactions with MathML (stretchy operators or baseline alignment) that would need to be clarified. So it sounds better to postpone this for a potential future version and stick to polyfills for now.
Related to that, CSS does not have rowspan / colspan properties. I'd like to understand why.
We didn't implement these attributes in Chromium yet and currently the decision on table-related thing is blocked on the progress of TableNG.
The name of columnspan is from MathML3 but it is not consistent with HTML's colspan. Maybe we want to "fix" that.
HTML has a lot of rules and if we really want to claim strong test coverage when presenting mathml core to people, we would need a lot of testing (cell size/position, invalid values, negative values, clamp values more than 1000 cols or 65534 rows, dynamic changes, ...). I'm not comfortable having an underspecified/undertested feature in core version 1.
HTML has an IDL API for setting the rowspan / colspan, do we need something similar for MathML?
probably more...