Giter Club home page Giter Club logo

Comments (6)

NSoiffer avatar NSoiffer commented on June 13, 2024 1

from mathlive.

arnog avatar arnog commented on June 13, 2024

This is a deliberate choice. Consistently using "." to represent a decimal separator avoids ambiguities such as <mn>1,234</mn>. The agent rendering the MathML can then decide to represent it appropriately, possibly taken into account user preferences.

from mathlive.

Leon-Lj avatar Leon-Lj commented on June 13, 2024

The problem with that is that it still leaves room for ambiguities. There are regions that uses the "." as a thousand separator, creating the same possible confusion.

Wikipedia has this to say on thousand separators:

Three ways to group the number ten thousand with digit group separators.

  1. Space, the internationally recommended thousands separator.
  2. Period (or full stop), the thousands separator used in many non-English speaking countries.
  3. Comma, the thousands separator used in most English-speaking countries.

It doesn't look to me like MathML specifies how a decimal number should be represented, the specification does not say and MDN seems to say that any number representation should be fine.

So I don't think that the MathML renderer can adjust what's rendered, it simply renders what is there. I would imagine that screen readers would use the current locale to determine if it should read it as "one point two hundred thirty four" or "One thousand two hundred thirty four" (maybe @NSoiffer could chime in here). But visually it seems to be up to the user to determine.

from mathlive.

arnog avatar arnog commented on June 13, 2024

Depending on which flavor of MathML you follow, you can have different interpretations.

MathML Core does suggest that decimal numbers should be represented with a decimal point: "Generally speaking, a numeric literal is a sequence of digits, perhaps including a decimal point, representing an unsigned integer or real number." (emphasis added).

"Full" MathML is even more vague, except to say that negative numbers are not allowed inside a <mn> tag. So <mn>onze</mn> is a perfectly valid MathML number, but <mn>-11</mn> is not.

However, you can be confident that the MathML produced by MathLive will generate numbers in a consistent manner, including their decimal representation. If you want a different representation, you can of course manipulate the output from MathLive to suit your needs.

from mathlive.

Leon-Lj avatar Leon-Lj commented on June 13, 2024

MathML Core does suggest that decimal numbers should be represented with a decimal point: "Generally speaking, a numeric literal is a sequence of digits, perhaps including a decimal point, representing an unsigned integer or real number." (emphasis added).

In the full mathml spec there's a setting called decimalpoint which is used to determine which decimal separator to use. While decimalpoint is not part of the MathML Core I would argue that they have just used the same language from the full spec, and what they mean is "decimal separator".

But I agree that the intent is not clear, if they mean "decimal separator" it should say that. If they do mean point, and only point, then that should be made clear so there's no room for misinterpretation.

from mathlive.

Leon-Lj avatar Leon-Lj commented on June 13, 2024

We discussed how numbers should be represented and the unanimous opinion (including those from countries that use "," for decimal separator) was to stick with "." as a decimal separator as Arno did. The feeling was that it was hard to use systems that accepted either and mistakes were very common.

Alright, then this issue can be closed as nothing to fix, working as intended. Thanks for the clarification. :)

from mathlive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.