Page MenuHomePhabricator

Math rending of comma should equal the rendering of point in comma-based decimal languages
Closed, DeclinedPublic

Description

Some languages use comma (,) instead of point (.) to denote decimals (and viceversa with the thousands punctuation). But the math renderer only renders correctly the point and creates a small space next to the comma, that shouldn't exist.

You can test it in Basque Wikipedia, for example, easily.

Event Timeline

This behavior matches TeX/LaTeX. Wrapping {} around the comma will remove the extra space, e.g., $12{,}34$.

Since the database of equation rendering is currently shared across WMF sites, there's currently no way to automate such localization features.

Then we should create a way for that!

@Theklan: We are currently discussing some changes to the math extension here: T195861, you are welcome to discuss this issue. Currently the plan is to

  1. get a correct rendering like in normal MathJax / LaTeX for all equations, especially mhchem
  2. render non-ASCII-characters like Cyrillic letters, äöü etc. properly in all browsers such that \text can be used with all languages that need special characters

As you can see this is a tremendous amount of work, progress is quite slow and everything relies on volunteers. I don't think changing the syntax for existing formulas with commas is feasible and maintaining the current system without additional localization features already overstretches our resources. I think it would be a better idea to just keep using the well-known {,} for decimal comma and make sure that help pages mention this LaTeX hack.

It might be worth documenting the workaround in Help:Formula for the affected languages.

Physikerwelt subscribed.

I think the way to go is to solve the problem on the input side. We are currently working on suggestions for the visual editor. I think suggesting to replace , with {,} in certain cases would be the way to go. Otherwise, people expecting the TeX , rendering might be upset.