ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] digits / units setup
@ 2024-08-24 18:38 Henning Hraban Ramm
  2024-08-24 18:59 ` [NTG-context] " Henning Hraban Ramm
  0 siblings, 1 reply; 4+ messages in thread
From: Henning Hraban Ramm @ 2024-08-24 18:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

According to docs,

\setupunit[method=3]

should change the rendering of numbers in

\unit{10,123.99 mm} or \digits{10,123.99} to “10\,123,99”,

but it doesn’t.

\setdigitmode{3} works, though.


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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: digits / units setup
  2024-08-24 18:38 [NTG-context] digits / units setup Henning Hraban Ramm
@ 2024-08-24 18:59 ` Henning Hraban Ramm
  2024-08-24 20:55   ` Henning Hraban Ramm
  2024-08-25 17:14   ` Wolfgang Schuster
  0 siblings, 2 replies; 4+ messages in thread
From: Henning Hraban Ramm @ 2024-08-24 18:59 UTC (permalink / raw)
  To: ntg-context

Am 24.08.24 um 20:38 schrieb Henning Hraban Ramm:
> According to docs,
> 
> \setupunit[method=3]
> 
> should change the rendering of numbers in
> 
> \unit{10,123.99 mm} or \digits{10,123.99} to “10\,123,99”,
> 
> but it doesn’t.
> 
> \setdigitmode{3} works, though.

Seems to be a problem of my environment.

In a minimal example, \setupunit changes \unit, \setdigitmode changes 
\digits.

Sorry for the noise.

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: digits / units setup
  2024-08-24 18:59 ` [NTG-context] " Henning Hraban Ramm
@ 2024-08-24 20:55   ` Henning Hraban Ramm
  2024-08-25 17:14   ` Wolfgang Schuster
  1 sibling, 0 replies; 4+ messages in thread
From: Henning Hraban Ramm @ 2024-08-24 20:55 UTC (permalink / raw)
  To: ntg-context

Next try:

Apparently, \setupunit affects only \unit,
for \digits you still need \setdigitmode (and \setdigitorder).
Is this intentional?

Also, \spaceddigits works only with decimal point input and doesn’t 
react to any of the above settings, while \unit and \digits expect me to 
insert a thousands comma manually.
Does this make sense?

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: digits / units setup
  2024-08-24 18:59 ` [NTG-context] " Henning Hraban Ramm
  2024-08-24 20:55   ` Henning Hraban Ramm
@ 2024-08-25 17:14   ` Wolfgang Schuster
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2024-08-25 17:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

Henning Hraban Ramm schrieb am 24.08.2024 um 20:59:
> Am 24.08.24 um 20:38 schrieb Henning Hraban Ramm:
>> According to docs,
>>
>> \setupunit[method=3]
>>
>> should change the rendering of numbers in
>>
>> \unit{10,123.99 mm} or \digits{10,123.99} to “10\,123,99”,
>>
>> but it doesn’t.
>>
>> \setdigitmode{3} works, though.
>
> Seems to be a problem of my environment.
>
> In a minimal example, \setupunit changes \unit, \setdigitmode changes 
> \digits.

The \digits mechanism was never extended to provide a basic setup mechanism
which means you have to use the \set... commands to change the output.

Wolfgang

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2024-08-25 17:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-24 18:38 [NTG-context] digits / units setup Henning Hraban Ramm
2024-08-24 18:59 ` [NTG-context] " Henning Hraban Ramm
2024-08-24 20:55   ` Henning Hraban Ramm
2024-08-25 17:14   ` Wolfgang Schuster

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).