MathJax-mhchem icon indicating copy to clipboard operation
MathJax-mhchem copied to clipboard

\pu: Wider spacing between digit groups

Open quasicomputational opened this issue 4 years ago • 1 comments

Currently, the thousands separator added by \pu is 2 mu = 1/9 em wide, and looks like this:

2mu-current

I think that's too narrow: I can't pick the thousands apart at a glance. It's even worse in smaller sizes - even looking quite closely, I was barely able to tell where the spaces between groups were and what was just a wide-looking kerning pair.

The Unicode character usually used for this is either U+2009 THIN SPACE or U+202F NARROW NO-BREAK SPACE, but that's not applicable to mhchem (it doesn't insert a character, but instead formats with spaces). Those glyphs are typically 1/5 to 1/6 em wide, which is significantly wider. Here's a mock-up of what 3 mu = 1/6 em looks like:

3mu-proposed

For me, that's much better!

quasicomputational avatar Oct 15 '20 15:10 quasicomputational

Looking at your images, your judgement makes sense. In particular the 2/4 combination is tricky. I most likely will increase the spacing in one of the next updates. (Currently, I am waiting for feedback on my TypeScript implementation. Hoping this will be the only codeline to maintain in the future.)

mhchem avatar Nov 22 '20 15:11 mhchem