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

Deprecate/Remove namedspaces length values #75

Open
fred-wang opened this issue Mar 19, 2019 · 12 comments

Comments

@fred-wang
Copy link
Member

commented Mar 19, 2019

In #5 we decided to remove the attributes veryverythinmathspace,
verythinmathspace, thinmathspace, mediummathspace, thickmathspace,
verythickmathspace, veryverythickmathspace ( https://mathml-refresh.github.io/mathml/chapter3.html#id.3.3.4.2.1 ) which allow users to override the values of the corresponding namedspaces lengths.

In previous meetings we raised the question of what to actually do with these named space ( https://mathml-refresh.github.io/mathml/chapter2.html#type.namedspace ), remove/deprecate them from mathml core/4?

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.

Probably #55 is relevant here.

@briansmith

This comment has been minimized.

Copy link

commented Apr 22, 2019

Here is an example where I've used this:

<math> <!-- Note: Not display="block" -->
 <mrow>
  <mn>0</mn> <mover accent=true><mo>↦</mo><mi>σ</mi></mover>
  <mn>1</mn> <mover accent=true><mo>↦</mo><mi>σ</mi></mover>
  <mn>2</mn> <mover accent=true><mo>↦</mo><mi>σ</mi></mover>
  <mn>3</mn> <mover accent=true><mo>↦</mo><mi>σ</mi></mover>
  <nm>4</nm> <mo lspace="thickmathspace" form="infix">⋯</mo>
  <mtext>,</mtext>
 </mrow>
</math>

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 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 (&thinsp;, etc.) should be. It seems to me like the font should have some input in how wide these spaces are.

@fred-wang

This comment has been minimized.

Copy link
Member Author

commented Apr 22, 2019

@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 &thinsp; 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?

cc @khaledhosny @jfkthame

@briansmith

This comment has been minimized.

Copy link

commented Apr 22, 2019

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.

@NSoiffer

This comment has been minimized.

Copy link
Contributor

commented 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 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 NSoiffer closed this Apr 29, 2019

@fred-wang fred-wang reopened this May 2, 2019

@fred-wang

This comment has been minimized.

Copy link
Member Author

commented May 2, 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 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?

@NSoiffer

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

rwlbuis added a commit to Igalia/chromium-dev that referenced this issue May 3, 2019
@fred-wang

This comment has been minimized.

Copy link
Member Author

commented May 16, 2019

Resolution:

Specification:

  • Update length definitions
  • Full should map to some numeric values.

Implementation:

  • Remove from WebKit/Gecko
  • Not implemented Chromium.

Polyfill:

  • Map to numeric values as suggested by Full.

Tests:

  • Verify that they are not supported
@fred-wang

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2019

namedspaces are no longer mentioned in the core spec.

rwlbuis added a commit to web-platform-tests/wpt that referenced this issue Jun 13, 2019
Remove relations/css-styling/lengths-2
This tests namedspaces, which were removed from the Core spec:
mathml-refresh/mathml#75
rwlbuis added a commit to web-platform-tests/wpt that referenced this issue Jun 13, 2019
Remove relations/css-styling/lengths-2 (#17309)
This tests namedspaces, which were removed from the Core spec:
mathml-refresh/mathml#75
@fred-wang

This comment has been minimized.

Copy link
Member Author

commented Jun 14, 2019

The core spec no longer refers to MathML 3 for the mpadded syntax and namedspace are not mentioned:
https://mathml-refresh.github.io/mathml-core/#adjust-space-around-content-mpadded

@fred-wang

This comment has been minimized.

Copy link
Member Author

commented Jun 18, 2019

The MathML core spec now mentions the following values for the operator dictionary lspace/rspace: 0, 0.05555555555555555em, 0.1111111111111111em, 0.16666666666666666em, 0.2222222222222222em, 0.2777777777777778em, 0.3333333333333333em, 0.3888888888888889em

fred-wang added a commit to Igalia/chromium-dev that referenced this issue Jul 18, 2019
Ignore namedspace inside mfrac@linethickness
See mathml-refresh/mathml#75
This patch can be dropped when the test is fixed upstream.
fred-wang added a commit to web-platform-tests/wpt that referenced this issue Jul 18, 2019
@fred-wang

This comment has been minimized.

Copy link
Member Author

commented Jul 18, 2019

Tests have been updated in web-platform-tests/wpt#17907 ; we check that namespaces are invalid and hence have no effect.

fred-wang added a commit to web-platform-tests/wpt that referenced this issue Jul 18, 2019
marcoscaceres added a commit to web-platform-tests/wpt that referenced this issue Jul 23, 2019
Remove relations/css-styling/lengths-2 (#17309)
This tests namedspaces, which were removed from the Core spec:
mathml-refresh/mathml#75
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jul 24, 2019
Bug 1559066 [wpt PR 17309] - Remove relations/css-styling/lengths-2, …
…a=testonly

Automatic update from web-platform-tests
Remove relations/css-styling/lengths-2 (#17309)

This tests namedspaces, which were removed from the Core spec:
mathml-refresh/mathml#75
--

wpt-commits: 8b26ee28f1e20c1cfbd9b95ddf040f725f747b52
wpt-pr: 17309
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jul 24, 2019
Bug 1567151 [wpt PR 17907] - Make MathML tests for namedspaces verify…
… that these values are ignored., a=testonly

Automatic update from web-platform-tests
Make MathML tests for namedspaces verify that these values are ignored. (#17907)

These values have been removed from MathML Core:
mathml-refresh/mathml#75
--

wpt-commits: b4b36aef39d46f9f33effcb6cd0253a81b337818
wpt-pr: 17907
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Jul 25, 2019
Bug 1559066 [wpt PR 17309] - Remove relations/css-styling/lengths-2, …
…a=testonly

Automatic update from web-platform-tests
Remove relations/css-styling/lengths-2 (#17309)

This tests namedspaces, which were removed from the Core spec:
mathml-refresh/mathml#75
--

wpt-commits: 8b26ee28f1e20c1cfbd9b95ddf040f725f747b52
wpt-pr: 17309
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Jul 25, 2019
Bug 1567151 [wpt PR 17907] - Make MathML tests for namedspaces verify…
… that these values are ignored., a=testonly

Automatic update from web-platform-tests
Make MathML tests for namedspaces verify that these values are ignored. (#17907)

These values have been removed from MathML Core:
mathml-refresh/mathml#75
--

wpt-commits: b4b36aef39d46f9f33effcb6cd0253a81b337818
wpt-pr: 17907
@fred-wang

This comment has been minimized.

Copy link
Member Author

commented Aug 20, 2019

Replacement:

veryverythinmathspace  => 0.05555555555555555em
verythinmathspace      => 0.1111111111111111em
thinmathspace          => 0.16666666666666666em
mediummathspace        => 0.2222222222222222em
thickmathspace         => 0.2777777777777778em
verythickmathspace     => 0.3333333333333333em
veryverythickmathspace => 0.3888888888888889em
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Aug 21, 2019
Bug 1574750 - Remove support for MathML length values thinmathspace, …
…mediummathspace, thickmathspace, etc. r=emilio

See mathml-refresh/mathml#75
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/yEMdIOo4i-0

This commit introduces a new preference option
mathml.mathspace_names.disabled to disable *mathspace names for MathML lengths.
For now, these are only disabled in Nightly builds.

* test_bug553917.html is updated to check that these values now cause an
  error message to be logged into the console when mathsize names are used
  and the feature disabled.
* mathml-negativespace-ref.html and positive-namedspace.html verify support for
  mathspace names, so force running them with the support enabled.
* The reference files for mo-lspace-rspace-2.html, mo-lspace-rspace-3.html,
  mo-lspace-rspace.html, op-dict-8.html and op-dict-9.html use explicit
  lspace/rspace attributes corresponding to the one read from the operator
  dictionary. Instead of running them with mathspace names enabled, use the
  equivalent em values from core
  https://mathml-refresh.github.io/mathml-core/#operator-dictionary
  See mathml-refresh/mathml#75 (comment)
* Force WPT tests
  mathml/presentation-markup/fractions/frac-linethickness-002.html and
  mathml/relations/css-styling/lengths-2.html to be run with the features
  disabled and remove corresponding failure expectation.

Differential Revision: https://phabricator.services.mozilla.com/D42643

--HG--
extra : moz-landing-system : lando
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Aug 21, 2019
Bug 1574750 - Remove support for MathML length values thinmathspace, …
…mediummathspace, thickmathspace, etc. r=emilio

See mathml-refresh/mathml#75
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/yEMdIOo4i-0

This commit introduces a new preference option
mathml.mathspace_names.disabled to disable *mathspace names for MathML lengths.
For now, these are only disabled in Nightly builds.

* test_bug553917.html is updated to check that these values now cause an
  error message to be logged into the console when mathsize names are used
  and the feature disabled.
* mathml-negativespace-ref.html and positive-namedspace.html verify support for
  mathspace names, so force running them with the support enabled.
* The reference files for mo-lspace-rspace-2.html, mo-lspace-rspace-3.html,
  mo-lspace-rspace.html, op-dict-8.html and op-dict-9.html use explicit
  lspace/rspace attributes corresponding to the one read from the operator
  dictionary. Instead of running them with mathspace names enabled, use the
  equivalent em values from core
  https://mathml-refresh.github.io/mathml-core/#operator-dictionary
  See mathml-refresh/mathml#75 (comment)
* Force WPT tests
  mathml/presentation-markup/fractions/frac-linethickness-002.html and
  mathml/relations/css-styling/lengths-2.html to be run with the features
  disabled and remove corresponding failure expectation.

Differential Revision: https://phabricator.services.mozilla.com/D42643
natechapin added a commit to natechapin/wpt that referenced this issue Aug 23, 2019
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Sep 11, 2019
Bug 1559066 [wpt PR 17309] - Remove relations/css-styling/lengths-2, …
…a=testonly

Automatic update from web-platform-tests
Remove relations/css-styling/lengths-2 (#17309)

This tests namedspaces, which were removed from the Core spec:
mathml-refresh/mathml#75
--

wpt-commits: 8b26ee28f1e20c1cfbd9b95ddf040f725f747b52
wpt-pr: 17309

UltraBlame original commit: d9091ffeeebd17ab5f5fd46aea906d3977d4428e
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Sep 11, 2019
Bug 1567151 [wpt PR 17907] - Make MathML tests for namedspaces verify…
… that these values are ignored., a=testonly

Automatic update from web-platform-tests
Make MathML tests for namedspaces verify that these values are ignored. (#17907)

These values have been removed from MathML Core:
mathml-refresh/mathml#75
--

wpt-commits: b4b36aef39d46f9f33effcb6cd0253a81b337818
wpt-pr: 17907

UltraBlame original commit: d55b759b5aaf4fa65e32bdaf982652efa2341787
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Sep 11, 2019
Bug 1574750 - Remove support for MathML length values thinmathspace, …
…mediummathspace, thickmathspace, etc. r=emilio

See mathml-refresh/mathml#75
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/yEMdIOo4i-0

This commit introduces a new preference option
mathml.mathspace_names.disabled to disable *mathspace names for MathML lengths.
For now, these are only disabled in Nightly builds.

* test_bug553917.html is updated to check that these values now cause an
  error message to be logged into the console when mathsize names are used
  and the feature disabled.
* mathml-negativespace-ref.html and positive-namedspace.html verify support for
  mathspace names, so force running them with the support enabled.
* The reference files for mo-lspace-rspace-2.html, mo-lspace-rspace-3.html,
  mo-lspace-rspace.html, op-dict-8.html and op-dict-9.html use explicit
  lspace/rspace attributes corresponding to the one read from the operator
  dictionary. Instead of running them with mathspace names enabled, use the
  equivalent em values from core
  https://mathml-refresh.github.io/mathml-core/#operator-dictionary
  See mathml-refresh/mathml#75 (comment)
* Force WPT tests
  mathml/presentation-markup/fractions/frac-linethickness-002.html and
  mathml/relations/css-styling/lengths-2.html to be run with the features
  disabled and remove corresponding failure expectation.

Differential Revision: https://phabricator.services.mozilla.com/D42643

UltraBlame original commit: fc9ada7ccc217903e5295e8ffc0e86a5345219c8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Sep 11, 2019
Bug 1559066 [wpt PR 17309] - Remove relations/css-styling/lengths-2, …
…a=testonly

Automatic update from web-platform-tests
Remove relations/css-styling/lengths-2 (#17309)

This tests namedspaces, which were removed from the Core spec:
mathml-refresh/mathml#75
--

wpt-commits: 8b26ee28f1e20c1cfbd9b95ddf040f725f747b52
wpt-pr: 17309

UltraBlame original commit: d9091ffeeebd17ab5f5fd46aea906d3977d4428e
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Sep 11, 2019
Bug 1567151 [wpt PR 17907] - Make MathML tests for namedspaces verify…
… that these values are ignored., a=testonly

Automatic update from web-platform-tests
Make MathML tests for namedspaces verify that these values are ignored. (#17907)

These values have been removed from MathML Core:
mathml-refresh/mathml#75
--

wpt-commits: b4b36aef39d46f9f33effcb6cd0253a81b337818
wpt-pr: 17907

UltraBlame original commit: d55b759b5aaf4fa65e32bdaf982652efa2341787
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Sep 11, 2019
Bug 1574750 - Remove support for MathML length values thinmathspace, …
…mediummathspace, thickmathspace, etc. r=emilio

See mathml-refresh/mathml#75
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/yEMdIOo4i-0

This commit introduces a new preference option
mathml.mathspace_names.disabled to disable *mathspace names for MathML lengths.
For now, these are only disabled in Nightly builds.

* test_bug553917.html is updated to check that these values now cause an
  error message to be logged into the console when mathsize names are used
  and the feature disabled.
* mathml-negativespace-ref.html and positive-namedspace.html verify support for
  mathspace names, so force running them with the support enabled.
* The reference files for mo-lspace-rspace-2.html, mo-lspace-rspace-3.html,
  mo-lspace-rspace.html, op-dict-8.html and op-dict-9.html use explicit
  lspace/rspace attributes corresponding to the one read from the operator
  dictionary. Instead of running them with mathspace names enabled, use the
  equivalent em values from core
  https://mathml-refresh.github.io/mathml-core/#operator-dictionary
  See mathml-refresh/mathml#75 (comment)
* Force WPT tests
  mathml/presentation-markup/fractions/frac-linethickness-002.html and
  mathml/relations/css-styling/lengths-2.html to be run with the features
  disabled and remove corresponding failure expectation.

Differential Revision: https://phabricator.services.mozilla.com/D42643

UltraBlame original commit: fc9ada7ccc217903e5295e8ffc0e86a5345219c8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Sep 11, 2019
Bug 1559066 [wpt PR 17309] - Remove relations/css-styling/lengths-2, …
…a=testonly

Automatic update from web-platform-tests
Remove relations/css-styling/lengths-2 (#17309)

This tests namedspaces, which were removed from the Core spec:
mathml-refresh/mathml#75
--

wpt-commits: 8b26ee28f1e20c1cfbd9b95ddf040f725f747b52
wpt-pr: 17309

UltraBlame original commit: d9091ffeeebd17ab5f5fd46aea906d3977d4428e
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Sep 11, 2019
Bug 1567151 [wpt PR 17907] - Make MathML tests for namedspaces verify…
… that these values are ignored., a=testonly

Automatic update from web-platform-tests
Make MathML tests for namedspaces verify that these values are ignored. (#17907)

These values have been removed from MathML Core:
mathml-refresh/mathml#75
--

wpt-commits: b4b36aef39d46f9f33effcb6cd0253a81b337818
wpt-pr: 17907

UltraBlame original commit: d55b759b5aaf4fa65e32bdaf982652efa2341787
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Sep 11, 2019
Bug 1574750 - Remove support for MathML length values thinmathspace, …
…mediummathspace, thickmathspace, etc. r=emilio

See mathml-refresh/mathml#75
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/yEMdIOo4i-0

This commit introduces a new preference option
mathml.mathspace_names.disabled to disable *mathspace names for MathML lengths.
For now, these are only disabled in Nightly builds.

* test_bug553917.html is updated to check that these values now cause an
  error message to be logged into the console when mathsize names are used
  and the feature disabled.
* mathml-negativespace-ref.html and positive-namedspace.html verify support for
  mathspace names, so force running them with the support enabled.
* The reference files for mo-lspace-rspace-2.html, mo-lspace-rspace-3.html,
  mo-lspace-rspace.html, op-dict-8.html and op-dict-9.html use explicit
  lspace/rspace attributes corresponding to the one read from the operator
  dictionary. Instead of running them with mathspace names enabled, use the
  equivalent em values from core
  https://mathml-refresh.github.io/mathml-core/#operator-dictionary
  See mathml-refresh/mathml#75 (comment)
* Force WPT tests
  mathml/presentation-markup/fractions/frac-linethickness-002.html and
  mathml/relations/css-styling/lengths-2.html to be run with the features
  disabled and remove corresponding failure expectation.

Differential Revision: https://phabricator.services.mozilla.com/D42643

UltraBlame original commit: fc9ada7ccc217903e5295e8ffc0e86a5345219c8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.