* Feature request: \digits command
@ 2008-06-19 20:10 Morgan Brassel
2008-06-20 10:32 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Morgan Brassel @ 2008-06-19 20:10 UTC (permalink / raw)
To: ntg-context
Hi everyone,
The \digits command is really great when it comes to typeset numbers in
different languages. However, I miss one functionality from the numprint
package in latex: when you type for example $e-5$, you get 10^{-5} (with
no dot in front of it).
Would it be possible to add an option to \digits to reproduce this?
Best wishes,
Morgan
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Feature request: \digits command
2008-06-19 20:10 Feature request: \digits command Morgan Brassel
@ 2008-06-20 10:32 ` Wolfgang Schuster
2008-06-20 14:10 ` Morgan Brassel
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2008-06-20 10:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Thu, Jun 19, 2008 at 10:10 PM, Morgan Brassel <morgan.brassel@free.fr> wrote:
> Hi everyone,
>
> The \digits command is really great when it comes to typeset numbers in
> different languages. However, I miss one functionality from the numprint
> package in latex: when you type for example $e-5$, you get 10^{-5} (with
> no dot in front of it).
>
> Would it be possible to add an option to \digits to reproduce this?
\starttext
\def\digitpowerseparator{10}
\digits{e-5}
\stoptext
http://pragma-ade.com/show-mag-4.htm
Regards
Wolfgang
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Feature request: \digits command
2008-06-20 10:32 ` Wolfgang Schuster
@ 2008-06-20 14:10 ` Morgan Brassel
2008-06-20 14:23 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Morgan Brassel @ 2008-06-20 14:10 UTC (permalink / raw)
To: mailing list for ConTeXt users
Thank you, Wolfgang.
I have already read the "This Way" on your link very carefully.
In fact, I was looking for a solution to have
\digits{e-5} printed as 10^5
\digits{2e-5} printed as 2 . 10^5
Is it possible to do that? to detect if there is a number before the 'e'
in \digits?
Regards,
Morgan
Wolfgang Schuster a écrit :
> On Thu, Jun 19, 2008 at 10:10 PM, Morgan Brassel <morgan.brassel@free.fr> wrote:
>
>> Hi everyone,
>>
>> The \digits command is really great when it comes to typeset numbers in
>> different languages. However, I miss one functionality from the numprint
>> package in latex: when you type for example $e-5$, you get 10^{-5} (with
>> no dot in front of it).
>>
>> Would it be possible to add an option to \digits to reproduce this?
>>
>
> \starttext
> \def\digitpowerseparator{10}
> \digits{e-5}
> \stoptext
>
> http://pragma-ade.com/show-mag-4.htm
>
> Regards
> Wolfgang
> ___________________________________________________________________________________
> 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 : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Feature request: \digits command
2008-06-20 14:10 ` Morgan Brassel
@ 2008-06-20 14:23 ` Wolfgang Schuster
2008-06-20 14:51 ` Morgan Brassel
2008-06-20 15:27 ` Hans Hagen
0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2008-06-20 14:23 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Fri, Jun 20, 2008 at 4:10 PM, Morgan Brassel <morgan.brassel@free.fr> wrote:
> Thank you, Wolfgang.
> I have already read the "This Way" on your link very carefully.
> In fact, I was looking for a solution to have
> \digits{e-5} printed as 10^5
> \digits{2e-5} printed as 2 . 10^5
> Is it possible to do that? to detect if there is a number before the 'e'
> in \digits?
\def\digitpowerseparator
{\ifx\collecteddigits\empty
10
\else
\cdot10
\fi}
\starttext
\digits{e-5}
\digits{2e-5}
\stoptext
Regards,
Wolfgang
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Feature request: \digits command
2008-06-20 14:23 ` Wolfgang Schuster
@ 2008-06-20 14:51 ` Morgan Brassel
2008-06-20 15:27 ` Hans Hagen
1 sibling, 0 replies; 8+ messages in thread
From: Morgan Brassel @ 2008-06-20 14:51 UTC (permalink / raw)
To: mailing list for ConTeXt users
Great, thank you!
Maybe this should become the default for the \digits command?
Or at least turned on via an option to \digits?
I guess this is the wanted behavior for many users, so this should be
made accessible easily... But maybe I'm wrong!
Best regards,
Morgan
Wolfgang Schuster a écrit :
> On Fri, Jun 20, 2008 at 4:10 PM, Morgan Brassel <morgan.brassel@free.fr> wrote:
>
>> Thank you, Wolfgang.
>> I have already read the "This Way" on your link very carefully.
>> In fact, I was looking for a solution to have
>> \digits{e-5} printed as 10^5
>> \digits{2e-5} printed as 2 . 10^5
>> Is it possible to do that? to detect if there is a number before the 'e'
>> in \digits?
>>
>
> \def\digitpowerseparator
> {\ifx\collecteddigits\empty
> 10
> \else
> \cdot10
> \fi}
>
> \starttext
>
> \digits{e-5}
>
> \digits{2e-5}
>
> \stoptext
>
> Regards,
> Wolfgang
> ___________________________________________________________________________________
> 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 : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Feature request: \digits command
2008-06-20 14:23 ` Wolfgang Schuster
2008-06-20 14:51 ` Morgan Brassel
@ 2008-06-20 15:27 ` Hans Hagen
2008-06-25 19:26 ` Flavien Lambert
1 sibling, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2008-06-20 15:27 UTC (permalink / raw)
To: mailing list for ConTeXt users
Wolfgang Schuster wrote:
> On Fri, Jun 20, 2008 at 4:10 PM, Morgan Brassel <morgan.brassel@free.fr> wrote:
>> Thank you, Wolfgang.
>> I have already read the "This Way" on your link very carefully.
>> In fact, I was looking for a solution to have
>> \digits{e-5} printed as 10^5
>> \digits{2e-5} printed as 2 . 10^5
>> Is it possible to do that? to detect if there is a number before the 'e'
>> in \digits?
>
> \def\digitpowerseparator
> {\ifx\collecteddigits\empty
> 10
> \else
> \cdot10
> \fi}
>
> \starttext
>
> \digits{e-5}
>
> \digits{2e-5}
>
> \stoptext
ok, patched:
\def\digitpowerseparator
{\ifx\collecteddigits\empty\else\cdot\fi10}
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-04-29 10:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-19 20:10 Feature request: \digits command Morgan Brassel
2008-06-20 10:32 ` Wolfgang Schuster
2008-06-20 14:10 ` Morgan Brassel
2008-06-20 14:23 ` Wolfgang Schuster
2008-06-20 14:51 ` Morgan Brassel
2008-06-20 15:27 ` Hans Hagen
2008-06-25 19:26 ` Flavien Lambert
2018-04-29 10:10 ` Peter Münster
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).