7
$\begingroup$

When formatting numerical data, should it be:

$15~\mathrm{kg}$

$15~\mathrm{kg}$

or

15 $\mathrm{kg}$

15 $\mathrm{kg}$

For the sake of consistency, I strongly feel that it should be one or the other, but not both (but in the end I guess it's not my choice to make).

| |
$\endgroup$
  • 4
    $\begingroup$ The first one is the better one in my opinion, in the other one the unit might break the line. $\endgroup$ – Martin - マーチン May 4 '15 at 4:48
  • $\begingroup$ I'm unclear on why 15 kg, without unnecessary formatting, is not the preferred choice. I personally find the oversized, arbitrarily bolded text difficult to read. $\endgroup$ – Jason Patterson May 11 '15 at 23:58
  • $\begingroup$ For current answers addressing this question please view the community wiki on formatting. $\endgroup$ – A.K. Apr 6 '19 at 1:31
4
$\begingroup$

I agree with the comments of Martin and Molx on that the fonts of the value and the unit should match.

If one takes a closer look at the output of expressions using the siunitx package, which isn't available here, one realizes that the gap between the number and the unit is smaller than a standard (protected) space.

The optical equivalent to

\SI[group-digits=false]{8.3146621}{\joule\per\mol\per\kelvin} in MathJax is $8.3146621\,\mathrm{J\,mol^{-1}\,K{^{-1}}}$, and yields

$8.3146621\,\mathrm{J\,mol^{-1}\,K{^{-1}}}$

| |
$\endgroup$
  • 1
    $\begingroup$ May I still use the protected space please? Since the siunitx package is far from being implemented, I find it much easier to just type the tilde. I also like it, when it harmonises with this discussion. $\endgroup$ – Martin - マーチン May 5 '15 at 8:59
  • $\begingroup$ What's the difference between $8.1\ \mathrm{g}$, $8.1~\mathrm{g}$ and $8.1\, \mathrm{g}$? The first two seem to yield identical results, while the third gives a smaller space. Does it have to do with being protected? What is that, by the way? $\endgroup$ – Molx May 8 '15 at 17:20
  • 1
    $\begingroup$ @Molx You're right! \, does yield a smaller space, \~ gives a space at which no line break can happen. That's called a protected space. $\endgroup$ – Klaus-Dieter Warzecha May 8 '15 at 17:27
  • 1
    $\begingroup$ @Martin Yes, please :-) I'm not planning to to go on an edit spree to convert spaces in MathJax expressions with a script ;-) Having siunitx would nice, but since it isn't available, we live with what we have. And actually, that is already quite a lot, as compared to other sites. $\endgroup$ – Klaus-Dieter Warzecha May 8 '15 at 17:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .