[NTG-context] Automatic thousands separation in \unit

Clyde Johnston context at couthies.com
Thu Jan 31 15:00:53 CET 2019

Maybe this should be a language specific parameter.  How would you achieve a
similar result with the Indian numbering system
<https://en.wikipedia.org/wiki/Indian_numbering_system> , for instance?


Also, decimal and thousands separators vary from country to country.  In
France, for example, they use the comma for the decimal separator, and space
for the thousand separator.





From: ntg-context [mailto:ntg-context-bounces at ntg.nl] On Behalf Of Otared
Sent: Thursday, January 31, 2019 2:43 PM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] Automatic thousands separation in \unit


Hi Marco,


Can this give what you wish?







On 31 Jan 2019, at 13:28, Marco Patzer <lists at homerow.info> wrote:



I'm wondering if there's a way to have automatic thousands separation in the
\unit command? \spaceddigits does that, but it doesn't work inside \unit.
using both would be quite verbose to write. Example:

 %% no thousands separation
 \unit{123456789 volt}

 %% manual thousands separation works
 \unit{123,456,789 volt}

 %% automatic thousands separation, but not using \unit

 %% fails, no output
 \unit{\spaceddigits{123456789} volt}

If your question is of interest to others as well, please add an entry to
the Wiki!

maillist : ntg-context at ntg.nl /
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190131/2135d2e5/attachment.html>

More information about the ntg-context mailing list