# How much space between number and unit?

Javier Bezos (famous of titlsec, tensind, spanish ... packages; and now maintainer of babel) wrote a nice book on typography and scientific notation in spanish.

He says (pag. 82) that the space between the number and the unit should be a thin space on displayed equations; but a word space on the text. I couldn't find this distinction in the SI documentation; and I have no access to the ISO 80000.

I think that siunitx puts a thin space always. (I made a small text and \showoutput shows the smae glue and boxed between the number and unit. I look to the siunitx code but I can not say say if \SI checks if tis in a display equation or in a in-line one.

My questions:

1. Is the advice given by Javier an international convention? or it is only applicable to the Spanish language?

2. Would it be possible to by siunitx to automatically detect the kind of equation and apply different spacing?

EDIT 1

From Javier's answer I understand that the typography convention that he explained in the book will work as following

In the text I will write sentences like the following.
The value of the parameter $a$ is $5\text{~}\mathrm{m}$,
but on the other hand, $3\,\mathrm{km} + 500\,\mathrm{m}$ and
probably $c = 3005\,\mathrm{m}$.

Finding a displayed equation with units should be possible:
$$c = 3000\,\mathrm{m} + 5\,\mathrm{m}$$
And isolated magnitude as display equation can be the answer to an exercise.
The result is
$$\boxed{3005\text{ }\mathrm{m}}$$

-
Is an answer purely on the technical part ('would it be possible ...') OK? I can certainly answer that bit! – Joseph Wright Aug 12 '13 at 10:00
I think the advice with the thin space between the number and unit is only a personal preference by Javier. The SI brochure specifies using a thin space for separating groups of three digits in the number, and a space between different units and between the number and the units. The thin space in this case has no mathematical meaning, while the normal space indicates multiplication. – Jake Aug 12 '13 at 10:20
@jake So it does: I've never noticed that before, but I guess I need to change the standard siunitx settings! – Joseph Wright Aug 12 '13 at 10:27
@Jake I've opened github.com/josephwright/siunitx/issues/230 to cover the fact I've got the setting wrong. – Joseph Wright Aug 12 '13 at 10:55
@Jake: The French version (the official one) says nothing about the width of the space. See my answer to zunbelt below. – Javier Bezos Aug 14 '13 at 14:32

At a technical level, detecting whether \SI is used inside display math is already implemented for the detect-display-math option. Thus adding functionality to make a choice of spacing based on whether \SI is used inside display math or elsewhere is quite feasible. Presumably this would require splitting the number-unit-product into two parts, with an alias meaning that the existing option continues to work: as usual, suggestions for names would be welcome. My main concern with adding such an option would be that I've never seen this type of variability in printed material: I'd like to see an 'official' source for such an approach before adding it.

-
If there is a desire for this, let me know and I'll add it for v2.6: I can see how to make this change, and it's just a question of opening the ticket and doing the work :-) – Joseph Wright Aug 12 '13 at 10:55
I know it from German typography: if possible use a spatium between number and unit. Otherwise use a blank (double spatium). I have to look for an official source for this, I guess "Lesetypografie" or "Detailtypografie" shows this. – Kurt Aug 12 '13 at 23:21
@Kurt Apparently, DIN 5008 calls for a full space between numbers and units (see books.google.de/books?id=QbCHsLRuXZMC&pg=PT374) – Jake Aug 13 '13 at 7:28
this has no official weight whatever, just personal sensibility. what i think is most important is that the number and the unit not be able to be split at the end of a line. (nobody has mentioned this explicitly; perhaps it's just assumed.) secondarily, i think that a thin space in this position makes it easier to parse as a meaningful "unit" (the combination, not a unit as defined in the international system). finally, as joseph says, consistency is desirable, regardless of context. – barbara beeton Aug 15 '13 at 12:53
@barbarabeeton Don't worry, siunitx doesn't allow a break by default. That said, it's common to have such a break in the chemistry papers I red (two-column layout plus lots of quantities leaving little option). – Joseph Wright Aug 15 '13 at 13:23

I was just explaining a typographical convention, not a notational one. ISO 80000 says nothing about the size of the space, and rightly so, because I think it should say nothing. Consider, for example,

$3\,\mathrm{km} + 500\,\mathrm{m}$


Units are more clearly attached to the corresponding number. This kind of adjustments is not much different than that of, say, 5!\,6!.

EDIT. The French version of the SI, which is the official one, does not specify the width of the space with thousands or before units. See my comment below.

-
I see your point. But the SI brochure makes some distinction between thin space and space (see @Jake first comment). Does the ISO 80000 still make this distinction? I agree that even magnitudes are the multiplication of value and unit; in the example you show it makes more sense to attach closer the value and unit. – TeXtnik Aug 14 '13 at 8:00
@JosephWright So, as I understand, the distinction is not if the unit is in the text or in a displayed equation; but if the magnitude is isolated or used in a mathematical formula (which I guess is the usual when used in a displayed environment). I will post some examples with what I understand for this convention. – TeXtnik Aug 14 '13 at 8:07
@zunbelt Nope, at least in the official French version: “les nombres comportant un grand nombre de chiffres peuvent être partagés en tranches de trois chiffres, séparées par un espace, afin de faciliter la lecture.” The English translation (which is not official) says “thin space” (why?). ISO 80000 says “small space”, avoiding the typographical term of “thin”, but then says “space” for all sorts of spaces around binary operators and relations, which are not typographically of the same width. So, again, care must be taken to distinguish typographical rules from notational ones. – Javier Bezos Aug 14 '13 at 14:26