Hi,

the document "The International System of Units (SI) (9th ed)" states in
chapter 5.4.3:

> The numerical value always precedes the unit and a space is always used to
> separate the unit from the number. Thus the value of the quantity is the
> product of the number and the unit. The space between the number and the unit
> is regarded as a multiplication sign (just as a space between units implies
> multiplication). The only exceptions to this rule are for the unit symbols
> for degree, minute and second for plane angle, °, ′ and ″, respectively, for
> which no space is left between the numerical value and the unit symbol.

https://web.archive.org/web/20230113090424/https://www.bipm.org/documents/20126/41483022/SI-Brochure-9.pdf/

it would be nice if numfmt would support outputting formatted numbers that
conform to this requirement. Currently, no space is placed between number and
unit suffix.

I tried to come up with a patch implementing this, which you can find attached.
To preserve backwards compatibility, I introduced a new option called
--space-separated. I made this option not specific to SI-conformance because it
also works with custom suffixes and it has no special handling if the suffix
happens to be a degree symbol.

Please keep me CC-ed in replies, as I'm not subscribed to the list.

Thank you for considering!

cheers, josch

Attachment: 0001-numfmt-Add-option-space-separated.patch
Description: application/mbox

Attachment: signature.asc
Description: signature

Reply via email to