-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Code ExampleContains an illustrative code example, solution, or work-aroundContains an illustrative code example, solution, or work-aroundFeature Request
Description
Problem description
In many countries, the comma is used as the decimal separator (e.g., 3,14).
In MathJax, when using , in math mode, a thin space is automatically inserted after the comma because it is treated as punctuation (\mathpunct) in TeX.
This makes it impossible to display numbers with commas as decimals correctly, without modifying thousands of formulas to use 3{,}14 or similar unadvisable workarounds.
Expected behavior
It should be possible to treat commas between digits as decimal separators, without adding extra space, ideally via a configuration option or macro, so that formulas like 3,14 render naturally.
Current behavior
- The thin space is always inserted after
,in math mode. - Workarounds require modifying the formulas themselves (
3{,}14) or using CSS hacks, which are not robust.
Environment
- MathJax 3 latest versions
- Browser rendering
Proposal
- Provide a configuration option to treat commas between digits as “mathord” automatically.
- Or provide a built-in macro to render decimal commas correctly without extra spacing.
Metadata
Metadata
Assignees
Labels
Code ExampleContains an illustrative code example, solution, or work-aroundContains an illustrative code example, solution, or work-aroundFeature Request