Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #2772
Closed
Open
Issue created Sep 15, 2021 by Administrator@rootContributor

TeX translation could be improved for numbers

Created by: 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:

  • MathJax Version: 3 (lastest) -- output is from https://mathjax.github.io/MathJax-demos-web/input-tex2chtml.html
Assignee
Assign to
Time tracking