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)? Marco Patzer
On Wed, Dec 7, 2011 at 22:27, Marco
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?
kB is kilobyte, not kilobit, but "kb" is probably also valid?
Another thing:
\unit{3.4e-5} yields to 3.4⁻⁵ that's expected according to the manual.
But the behaviour is wrong. (I just want to say that \cdot 10^{-5} should not be just an option, but the default behaviour.) Mojca
On 2011-12-07 Mojca Miklavec
On Wed, Dec 7, 2011 at 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?
kB is kilobyte, not kilobit,
Exactly, \unit{kbit} should output kbit, instead of kB.
but "kb" is probably also valid?
I don't know, if kb is a valid shortcut for kilo bit. kB outputs kB (kilo byte). I would vote for that kb outputs kbit (kilo bit). But that \unit{kbit} yields kB is definitely wrong.
\unit{3.4e-5} yields to 3.4⁻⁵ that's expected according to the manual.
But the behaviour is wrong.
I don't know if it's wrong. It's very non-intuitive, but I think Hans had a reason not to include the \cdot 10.
(I just want to say that \cdot 10^{-5} should not be just an option, but the default behaviour.)
+1 Regards Marco Patzer
On Thu, Dec 8, 2011 at 00:12, Marco wrote:
On 2011-12-07 Mojca Miklavec wrote:
\unit{3.4e-5} yields to 3.4⁻⁵ that's expected according to the manual.
But the behaviour is wrong.
I don't know if it's wrong.
But 5e3 would render 5^3 which is hopefully still 125.
It's very non-intuitive, but I think Hans had a reason not to include the \cdot 10.
\cdot 10^{x} is pretty long and might be ugly. But writing out exponent without the base is everything but the right approach. Even writing out 5e3 is better than that. Mojca
On Thu, Dec 8, 2011 at 12:20 AM, Mojca Miklavec
On Thu, Dec 8, 2011 at 00:12, Marco wrote:
On 2011-12-07 Mojca Miklavec wrote:
\unit{3.4e-5} yields to 3.4⁻⁵ that's expected according to the manual.
But the behaviour is wrong.
I don't know if it's wrong.
But 5e3 would render 5^3 which is hopefully still 125.
It's very non-intuitive, but I think Hans had a reason not to include the \cdot 10.
\cdot 10^{x} is pretty long and might be ugly. But writing out exponent without the base is everything but the right approach. Even writing out 5e3 is better than that.
Mojca ___________________________________________________________________________________ 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 ___________________________________________________________________________________
I've seen many people writing 5e3 to mean 5·10³, but I've never seen 5e3 to mean 5³. The writing 5e3 = 5·10³ is sometimes called the E-notation [1]. Even though I would never write it like that myself, I vote that 5e3 will render as 5·10³ (or with \times instead of \cdot). Best regards, Mikael [1] http://en.wikipedia.org/wiki/Scientific_notation#E_notation PS One could ask, however, if this really belongs to a unit package. In my world it does not, but I can understand if it is convenient to have there.
I solved this = getting what I wanted by writing my own macro: \define[3]\physicalquantitye{\hbox{#1 \times \unit{10^#2 #3}}} % \physicalquantitye{number}{exponent}{unit} -- gives short form of unit That makes sense to me and is working fine. There are a few more like this on the wiki (units page), in case anyone finds them useful. On 7 Dec 2011, at 21:27, Marco wrote:
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)?
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 -----------------------------------------------------------------
On 2011-12-09 Hans Hagen
\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}}
Thanks for the quick fix. I assume it will be included in the next beta. One feature request: Could it be make configurable to either insert a \times or a \cdot? Marco Patzer
On 9-12-2011 20:41, Marco wrote:
One feature request: Could it be make configurable to either insert a \times or a \cdot?
is already possible ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On 9-12-2011 22:01, Marco wrote:
On 2011-12-09 Hans Hagen
wrote: On 9-12-2011 20:41, Marco wrote:
One feature request: Could it be make configurable to either insert a \times or a \cdot?
is already possible
How?
http://www.pragma-ade.com/general/manuals/units-mkiv.pdf ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (5)
-
Hans Hagen
-
Ian Lawrence
-
Marco
-
Mikael P. Sundqvist
-
Mojca Miklavec