Skip to content

Align definition of numbers with CSS #23

Closed

Description

@fred-wang

"The definition of numbers is also not very accurate in the MathML
recommendation compared to HTML5. One has to check the RelaxNG schemas
and the predefined RelaxNG types to know the exact syntax. Again, it
think it would be best to rely on the HTML5 definitions. For example,
<math><mspace width="1E1em" height="10em" mathbackground="red"/></math>
draws a red square in WebKit but Gecko says "1E1em" is invalid.

https://www.w3.org/TR/html5/infrastructure.html#numbers"

original report: https://lists.w3.org/Archives/Public/www-math/2016Aug/0000.html

Activity

  1. added
    MathML Core
    MathML 4
    css / html5
    on Feb 22, 2019
  2. NSoiffer commented on Mar 4, 2019

    @NSoiffer
    Contributor

    I agree that MathML should align it's number parsing with HTML5. Looking at the referenced HTML spec, it appears that attributes can only be pos/neg decimal integers/floating point numbers. They can't be hex or octal except in colors. In looking at the MathML spec itself, it doesn't seem to allow hex digits anywhere except in colors (search for "hexadecimal"), so it seems like they are in alignment in at least intent. The RelaxNG schema might be off.

    I'm pretty sure that MathML 3 made an attempt to align its basic syntax parsing with HTML5. Of course, it might not have been perfect in doing so.

  3. added
    compatibility
    on Mar 20, 2019
  4. fred-wang commented on May 2, 2019

    @fred-wang
    Author

    The definitions are given here ; I think it corresponds to the RelaxNG schema.
    https://mathml-refresh.github.io/mathml/chapter2.html#id.2.1.5.1

    In particular for "number":

    an optional prefix of "-" (U+002D), followed by an unsigned number, representing a terminating decimal number (a type of rational number)

    Not that this does not allow values like 1.3139E2.

    I reopened this since we need to update the specs/relaxng schema and write WPT tests for this.

    cc @bkardell

  5. added
    need resolution
    need specification update
    and removed
    need resolution
    on May 16, 2019
  6. fred-wang commented on May 16, 2019

    @fred-wang
    Author

    See https://lists.w3.org/Archives/Public/public-mathml4/2019May/0006.html
    I don't have the minutes from this week.

    Keeping "need resolution" for now. I think we agreed someone should go over the list of number attributes and check carefully.

  7. added
    need resolution
    on May 16, 2019
  8. fred-wang commented on May 20, 2019

    @fred-wang
    Author

    "fw: Numbers like "5." is allowed in MathML currently, but not in CSS. Can
    we align? Resolved to align. Since the values are parsed by CSS, we should
    follow the CSS spec (as opposed to HTML)"

  9. added
    need tests
    and removed
    need resolution
    on Jun 3, 2019
  10. 6 remaining items

  11. changed the title [-]Align definition of numbers with HTML5[/-] [+]Align definition of numbers with CSS[/+] on Aug 21, 2019
  12. fred-wang commented on Sep 16, 2019

    @fred-wang
    Author

    We have tests for that, so closing.

  13. removed
    need tests
    on Sep 16, 2019
  14. added 2 commits that reference this issue on May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    MathML 4MathML Corecompatibilitycss / html5need specification update

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions