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
If we decide to keep the spec should not suggest "Recommended default" for namedspaces but explicitly say that they are equivalent to these em values. Then one could write polyfills for these.
If thickmathspace are deprecated and removed then what would the references in the operator dictionary look like? How would one specify that their operator should have the same spacing as another operator, like in my example.
If we decide to keep the spec should not suggest "Recommended default" for namedspaces but explicitly say that they are equivalent to these em values. Then one could write polyfills for these.
I'n not sure this is true. Consider MathML typeset inline in fully-justified text. I'm not conviced that the Math's whitespace should be fixed while the rest of the whitespace on the line is allowed to grow/shrink. And, I'm not sure it is possible to use CSS to emulate growable/shrinkable whitespace.
Usually the font decides how wide each kind of space ( , etc.) should be. It seems to me like the font should have some input in how wide these spaces are.
@briansmith In MathML 3, each *mathspace defaults to some value expressed as a multiple of 1/18em. In #5 we decided that they would actually be equivalent to these values (this is how it is implemented in browsers). The operator dictionary values would them be expressed using these em values. Probably, we need to be more explicit so that user can actually specify the same values as the one computed internally without worrying about rounding errors. So e.g. replace thickmathspace with 0.2777777777777778em instead of 5/18em.
TeX has a different spacing algorithm but if I'm not wrong it defines the spacing as multiple of em values too. The   etc maps to unicode characters, we could probably define the *mathspace values using the corresponding glyphs's width. That would be an incompatible change with MathML 3 but at least justify keeping the values since they no longer duplicate existing functionality. If we choose that option, I would prefer that we make a proposal to the CSS WG, so that MathML length values could still just be mapped to CSS (#63). In any case, I don't see how that actually solves the fully-justified text case, it seems to me that it would still be a multiple of em?
Is there any concrete use case for fully-justified text in math?
TeX has a different spacing algorithm but if I'm not wrong it defines the spacing as multiple of em values too.
I think it is fine for MathML to have different defaults from TeX but I think it is also reasonable for an author to expect to, relatively easily, override the defaults to match TeX. In particular, I think it is important to be able to conform to the AMS style guide (https://www.ams.org/publications/authors/AMS-StyleGuide-online.pdf) which prescribes specific spacing for various constructs but then implies that "whatever TeX does" is right and/or at least acceptable.
Is there any concrete use case for fully-justified text in math?
Many of the math books on my shelf, algebra books in particular, place a lot of math inline in fully-justified paragraphs. (They also do linebreaking in inline math in a way that's similar to what the AMS style guide recommends.) I don't think a lot of effort needs to be spent right away on getting full justification to work well with MathML (it doesn't work well even without MathML in browsers today). However, AFAICT, implementing spacing using CSS padding-left: Xem and padding-right: Xem probably wouldn't work well in any future world where we have good full justification because the justification logic would need to be able to grow-shrink such spacing, but the HTML/CSS justification engine doesn't grow/shrink padding, IIUC.
29/4/19 meeting:
Resolved that we will drop named lengths from core. These will get mapped to fixed number of ems with a few (probably three) digits precision. E.g, thinspace, has a fixed definition of 3/18 of an em, so the value mapped to core will be 0.167em. [Note that one needs to get to a 1000 point font before the rounding even gets close to being one pixel off]
They remain in full because they are being used some.
Note: this simplifies parsing attribute length values (#63).
29/4/19 meeting:
Resolved that we will drop named lengths from core. These will get mapped to fixed number of ems with a few (probably three) digits precision. E.g, thinspace, has a fixed definition of 3/18 of an em, so the value mapped to core will be 0.167em. [Note that one needs to get to a 1000 point font before the rounding even gets close to being one pixel off]
They remain in full because they are being used some.
Note: this simplifies parsing attribute length values (#63).
@NSoiffer Just to be clear, they are removed from MathML core and the mapping to em has to be defined in MathML full, right?
Yes. The full spec should make explicit what the values are for the
namedspaces and the polyfill should use them. The change to full is that
they can't be redefined.
I've pushed a rough implementation to the mathml-polyfills repo (I intended to make a PR actually but it went to main, but at this stage all the polyfill code will need further review anyway so hopefully that's OK I can move the commits to a branch if people think it's needed)
Activity
briansmith commentedon Apr 22, 2019
Here is an example where I've used this:
My goal was to give the "⋯" the same amount of lspace as "↦" gets by default. I looked up "↦" in the operator dictionary at https://www.w3.org/TR/MathML3/appendixc.html and it told me to use
thickmathspace.If
thickmathspaceare deprecated and removed then what would the references in the operator dictionary look like? How would one specify that their operator should have the same spacing as another operator, like in my example.I'n not sure this is true. Consider MathML typeset inline in fully-justified text. I'm not conviced that the Math's whitespace should be fixed while the rest of the whitespace on the line is allowed to grow/shrink. And, I'm not sure it is possible to use CSS to emulate growable/shrinkable whitespace.
Usually the font decides how wide each kind of space (
 , etc.) should be. It seems to me like the font should have some input in how wide these spaces are.fred-wang commentedon Apr 22, 2019
@briansmith In MathML 3, each
*mathspacedefaults to some value expressed as a multiple of 1/18em. In #5 we decided that they would actually be equivalent to these values (this is how it is implemented in browsers). The operator dictionary values would them be expressed using these em values. Probably, we need to be more explicit so that user can actually specify the same values as the one computed internally without worrying about rounding errors. So e.g. replacethickmathspacewith0.2777777777777778eminstead of 5/18em.TeX has a different spacing algorithm but if I'm not wrong it defines the spacing as multiple of em values too. The
 etc maps to unicode characters, we could probably define the*mathspacevalues using the corresponding glyphs's width. That would be an incompatible change with MathML 3 but at least justify keeping the values since they no longer duplicate existing functionality. If we choose that option, I would prefer that we make a proposal to the CSS WG, so that MathML length values could still just be mapped to CSS (#63). In any case, I don't see how that actually solves the fully-justified text case, it seems to me that it would still be a multiple of em?Is there any concrete use case for fully-justified text in math?
cc @khaledhosny @jfkthame
briansmith commentedon Apr 22, 2019
I think it is fine for MathML to have different defaults from TeX but I think it is also reasonable for an author to expect to, relatively easily, override the defaults to match TeX. In particular, I think it is important to be able to conform to the AMS style guide (https://www.ams.org/publications/authors/AMS-StyleGuide-online.pdf) which prescribes specific spacing for various constructs but then implies that "whatever TeX does" is right and/or at least acceptable.
Many of the math books on my shelf, algebra books in particular, place a lot of math inline in fully-justified paragraphs. (They also do linebreaking in inline math in a way that's similar to what the AMS style guide recommends.) I don't think a lot of effort needs to be spent right away on getting full justification to work well with MathML (it doesn't work well even without MathML in browsers today). However, AFAICT, implementing spacing using CSS
padding-left: Xemandpadding-right: Xemprobably wouldn't work well in any future world where we have good full justification because the justification logic would need to be able to grow-shrink such spacing, but the HTML/CSS justification engine doesn't grow/shrink padding, IIUC.NSoiffer commentedon Apr 29, 2019
29/4/19 meeting:
Resolved that we will drop named lengths from core. These will get mapped to fixed number of
ems with a few (probably three) digits precision. E.g,thinspace, has a fixed definition of 3/18 of anem, so the value mapped to core will be 0.167em. [Note that one needs to get to a 1000 point font before the rounding even gets close to being one pixel off]They remain in full because they are being used some.
Note: this simplifies parsing attribute length values (#63).
fred-wang commentedon May 2, 2019
@NSoiffer Just to be clear, they are removed from MathML core and the mapping to em has to be defined in MathML full, right?
NSoiffer commentedon May 3, 2019
fred-wang commentedon May 16, 2019
Resolution:
Specification:
Implementation:
Polyfill:
Tests:
41 remaining items
fred-wang commentedon Oct 10, 2022
Quick check of the status for some LaTeX converters:
TeXZilla switched to em values in fred-wang/TeXZilla@fcce5a0
itex2MML switched to em values in https://golem.ph.utexas.edu/~distler/code/itexToMML/revision/84
MathJax: I tried
$$a \quad \, \: \; \! \qquad b$$on https://www.mathjax.org/#demo and they now use em instead of named constants. It seems they switched to em values in mathjax/MathJax-src@7f8ccfe although there may be remaining places (e.g. mathjax/MathJax#2902 )LaTeXML: Not sure how to produce named constants. I see brucemiller/LaTeXML#1801 is still open.
fred-wang commentedon Oct 10, 2022
@physikerwelt I tried
<math>a \quad \, \; \! \qquad b</math>on https://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox and I still see some named space values for some of them. Do you know what's the status in MediaWiki?physikerwelt commentedon Oct 17, 2022
@fred-wang thank you for bringing this up. There has not been any work toward fixing that so far, but I created a ticket as a first step.
a test file for polyfill w3c/mathml#75
davidcarlisle commentedon Apr 21, 2025
I've pushed a rough implementation to the mathml-polyfills repo (I intended to make a PR actually but it went to main, but at this stage all the polyfill code will need further review anyway so hopefully that's OK I can move the commits to a branch if people think it's needed)
Bug 1567151 [wpt PR 17907] - Make MathML tests for namedspaces verify…
Bug 1574750 - Remove support for MathML length values thinmathspace, …
davidcarlisle commentedon Sep 4, 2025
agreed to close at meeting 2025-09-04
Round all lengths with MMLutil::round2em
Update git submodules