Le lundi 19 novembre 2012, Romain Diss a écrit :
> I got some problems to express powers of ten in the \unit command. See the
> strange behaviour with these two minimal examples.
> 
> \starttext
> \unit{10^2 meter}\\
> \unit{10^{-12} second}
> \stoptext
> Is this a bug or are these expressions not supported?

I'm not an expert neither in TeX nor Lua, but I quickly glance at the source 
code (phys-dim.*) and here is what I understand:
— the brackets { } are not recognized (a comment in the lua code mentioned 
it), so \unit{10^{-12} second} should be \unit{10^-12 second};
— the hat sign '^' is recognized as 'e' so it means "… times ten to the 
power…" instead of "to the power…" as one should expect.

So I come back to my problem. I want to write 10⁻¹² s (ten to the negative 
twelfth power second). Actually, I'm typing \math{10^{-12} \unit{second}} but 
I'd prefer to type \unit{10^-12 second} (for coherence). Is it possible to 
modify phys-dim.lua in that way or is this to much work (I have no idea if 
this is a matter of changing one line or a hundred lines in phys-dim.lua. 
Maybe also this is a too specific request, I don't know…

Anyway, thank you in advance.

All the best.

-- 
Romain Diss
<romain.d...@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 via email to