On 11 December 2011, Xenia <yor...@googlemail.com> wrote:

> Am 11.12.2011 11:25, schrieb robin.kirk...@csiro.au:
>> All,
>> 
>> I have put together some suggestions to extend the number formatting
>> capability in \unit, particularly for scientific and engineering purposes,
>> including basic support for tolerances and uncertainties.
>> 
>> It is a bit long, so source is attached and a PDF is at
>> 
>> http://dl.dropbox.com/u/36891398/units6.pdf
>> 
>> Of course, this is just my opinion, so I welcome any feedback from the list.
> 
> I like your suggestions. Especially the current handling of `e-23` etc.
> is not intuitive but rather confusing and does not meet the standard.
> 
> I do not know if there is already a solution for automatically
> shortening the number of digits in the output, but that would be nice, too.
> 
> Xenia

Yes, I thought about that, of course, but did not put it forward because to do 
it properly the correct numeric rounding/significant figures rules should be 
applied, and that I guess means the Lua code needs to interpret the number, 
rather than just treat it as a sequence of digits.

However if the Lua code did interpret the number into an internal format it 
would enable other things like normalisation to scientific or engineering form, 
etc. However the internal format would have to support arbitrarily long numbers 
and exponents ... Lua's built-in internal number format (a double precision 
float, I think) would not do, so there would be a bit of coding involved.

Robin

___________________________________________________________________________________
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