# [NTG-context] Use \unit for value and uncertainty

Henri Menke henrimenke at gmail.com
Wed Nov 2 11:27:07 CET 2016

On 10/31/2016 05:30 PM, Florian Leupold wrote:
> Hello!
>
> There does not seem to be a simple solution to using \unit with uncertainties, see below.
>
> Could someone maybe point me to the relevant source code for the parser for \unit in MKIV? Then I would try to modify/improve the code myself.

phys-dim.mkiv
https://github.com/contextgarden/context-mirror/blob/beta/tex/context/base/mkiv/phys-dim.mkiv

phys-dim.lua
https://github.com/contextgarden/context-mirror/blob/beta/tex/context/base/mkiv/phys-dim.lua

>
> Thanks a lot and best regards,
> Florian
>
>
>> On 25.09.16, at 20:11, Florian Leupold <fleupold at posteo.net> wrote:
>>
>> Dear list
>>
>> Is it possible to use the units module (in MKIV) for value plusminus uncertainty in a way similar to the \SI command in LaTeX, like
>>  \unit{(1.59\pm2)e-19 coulomb} or
>>  \unit{1.59(2)e-19 coulomb}?
>>
>> Thanks and best regards,
>> Florian
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>>
>> maillist : ntg-context at 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
>> ___________________________________________________________________________________
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>