ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Automatic thousands separation in \unit
@ 2019-01-31 12:28 Marco Patzer
  2019-01-31 12:43 ` Otared Kavian
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Patzer @ 2019-01-31 12:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi!

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. And
using both would be quite verbose to write. Example:

\starttext
  %% no thousands separation
  \unit{123456789 volt}

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

  %% automatic thousands separation, but not using \unit
  \let\spaceddigitsseparator,
  \spaceddigits{123456789}\,V

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

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

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-02-09 20:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 12:28 Automatic thousands separation in \unit Marco Patzer
2019-01-31 12:43 ` Otared Kavian
2019-01-31 14:00   ` Clyde Johnston
2019-01-31 14:54     ` Hans Åberg
2019-02-02 10:59     ` Axel Kielhorn
2019-02-05 11:22   ` Marco Patzer
2019-02-09 20:22     ` Marco Patzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).