Skip to content

TeX translation could be improved for numbers #2772

@NSoiffer

Description

@NSoiffer

Issue Summary

The translation for numbers containing spaces or commas could be improved

Issue details:

  1. With this input 16\,807 MathJax will produce the following MathML when using "copy to clipboard:mathml"
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block" data-semantic-type="infixop" data-semantic-role="implicit" data-semantic-annotation="clearspeak:unit" data-semantic-id="4" data-semantic-children="0,2" data-semantic-content="3" data-semantic-speech="16 807">
  <mn data-semantic-type="number" data-semantic-role="integer" data-semantic-font="normal" data-semantic-annotation="clearspeak:simple" data-semantic-id="0" data-semantic-parent="4">16</mn>
  <mstyle scriptlevel="0">
    <mspace width="0.167em" data-semantic-type="operator" data-semantic-role="space" data-semantic-id="3" data-semantic-parent="4" data-semantic-operator="infixop,&#x2062;"></mspace>
  </mstyle>
  <mn data-semantic-type="number" data-semantic-role="integer" data-semantic-font="normal" data-semantic-annotation="clearspeak:simple" data-semantic-id="2" data-semantic-parent="4">807</mn>
</math>

Notice that the number is broken up into two mn's. Also notice that SRE is interpreting the space as multiplication. Although it is possible this is what is meant, I think it is far more likely that this is meant to be a single number. Context and digit block counting could be used to choose one interpretation in favor of another.

A similar issue arises when using,. E.g., 7^5=16,807. In this case, context clearly points to 16,807 being a single number.

This poor translation will effect speech. Potentially it affects braille generation also.

Technical details:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions