From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Marco <netuse@lavabit.com>
Subject: Re: Possible bug in \unit
Date: Fri, 09 Dec 2011 20:22:29 +0100 [thread overview]
Message-ID: <4EE25FF5.7020402@wxs.nl> (raw)
In-Reply-To: <20111207222740.5ec7dc28@homerow>
On 7-12-2011 22:27, Marco wrote:
> There seems to be a bug in the new unit system for \unit{kbit}:
>
> % bit
> \unit{kilo bit} % kbit
> \unit{kilobit} % kbit
> \unit{kbit} % kB, shouldn't this be kbit?
>
> Another thing:
>
> \unit{3.4e-5} yields to 3.4⁻⁵ that's expected according to
> the manual. But how to get 3.4·10⁻⁵ (either with \cot or
> \times)?
indeed .. here's the fix
\unexpanded\def\digitspower#1%
{\times10\digits_raised{#1}}
\unexpanded\def\digitspowerplus#1%
{\times10\digits_raised{\digitsplus#1}}
\unexpanded\def\digitspowerminus#1%
{\times10\digits_raised{\digitsminus#1}}
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2011-12-09 19:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 21:27 Marco
2011-12-07 22:59 ` Mojca Miklavec
2011-12-07 23:12 ` Marco
2011-12-07 23:20 ` Mojca Miklavec
2011-12-08 5:51 ` Mikael P. Sundqvist
2011-12-08 20:26 ` Ian Lawrence
2011-12-09 19:22 ` Hans Hagen [this message]
2011-12-09 19:41 ` Marco
2011-12-09 19:54 ` Hans Hagen
2011-12-09 21:01 ` Marco
2011-12-09 21:15 ` Hans Hagen
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=4EE25FF5.7020402@wxs.nl \
--to=pragma@wxs.nl \
--cc=netuse@lavabit.com \
--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).