ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Romain Diss <romain.diss@yahoo.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \digits get \times instead of \cdot before exponent
Date: Wed, 22 May 2013 14:31:38 +0200	[thread overview]
Message-ID: <201305221431.41095.romain.diss@yahoo.fr> (raw)
In-Reply-To: <519C81E6.5020107@wxs.nl>

Le mercredi 22 mai 2013, Hans Hagen a écrit :
> On 5/21/2013 11:35 PM, Romain Diss wrote:
> >> We've already got \setdigitmode, \setdigitorder, and \setdigitspace;
> >> it might make sense to create a \setupdigits to consolidate these
> >> setups into one interface. Something like this:
> >> 
> >> \setupdigits
> >> 
> >>     [mode=4,               % -->\setdigitmode{4}
> >>     
> >>                            % (decimal period, thinspace between groups)
> >>      
> >>      inputdecimalmark={,}, % -->\setdigitorder{0}
> >>      signspace=yes,        % -->\setdigitsign{1}; '+ 1.4', not '+1.4'
> >>      times=\times,         % or times=\cdot
> >>      ]
> > 
> > +1
> > 
> >> P.s: I've been thinking I'd like to write more contexty interface that
> >> doesn't use predefined modes, but lets you setup the decimal mark,
> >> separator mark, the input decimal mark, etc. Something like this:
> >> 
> >> \setupdigits
> >> 
> >>     [inputdecimal={.},  % input  3.1415926535
> >>     
> >>      decimal={,}
> >>      separator=\space,
> >>      groupsize=4,       % output 3,1415 9265 45
> >>      signspace=,]       % +3.14159...
> >> 
> >> That could even tie into \setuplanguage to allow setting
> >> language-specific defaults. Would anyone be interested in this?
> > 
> > +1 again!
> 
> needs a bit of thinking as when we start this route we get lots of new
> keywords (with the danger of introducing inconsistencies) so first we
> need to collect all potential candidates for such keys (e.g. using
> separator might be too generic )

I don't know if it is possible and can not estimate how much work it 
represents but maybe one can consider to merge the digit part of the \digits 
and \unit code.
The \unit command would then use the same code as the \digit one to format the 
digit part. Then, the \unit code would use a specific code to format the unit 
part.
This would make it possible to configure the digit formatting with one unique 
command for both \unit and \digit and another command would be used to 
configure the formating of the unit part.

-- 
Romain Diss
<romain.diss@yahoo.fr>
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      reply	other threads:[~2013-05-22 12:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20  7:32 Christian Prim
2013-05-21  9:44 ` Romain Diss
2013-05-21 14:37   ` Hans Hagen
2013-05-21 15:15     ` Christian Prim
2013-05-21 15:34       ` Hans Hagen
2013-05-21 15:40         ` Christian Prim
2013-05-21 19:17     ` Sietse Brouwer
2013-05-21 21:35       ` Romain Diss
2013-05-22  8:29         ` Hans Hagen
2013-05-22 12:31           ` Romain Diss [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201305221431.41095.romain.diss@yahoo.fr \
    --to=romain.diss@yahoo.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).