I'm certain that I saw a command generating the following kind of output the last time I read through the siunitx manual:

\left( 12.3 \pm 0.4 \right) V

for a measured voltage of 12.3 V and a standard deviation of 0.4 V. I can't find it by searching the manual, though. Is this capability in siunitx?


The code you are looking for is on page 43 of the siunitx manual (as of 2011/10/14):

When a number has multiple parts (such as a separate uncertainty) then the unit must apply to all parts of the number. How this is shown is controlled using the multi-part-units options. The standard setting is brackets, which will place the entire numerical part in brackets and use a single unit symbol. Alternative options are repeat (print the unit for each part of the number) and single (print only one unit symbol: mathematically incorrect).

\SI{12.3(4)}{\kilo\gram} \\
\SI[multi-part-units = brackets]{12.3(4)}{\kilo\gram} \\
\SI[multi-part-units = repeat]{12.3(4)}{\kilo\gram} \\
\SI[multi-part-units = single]{12.3(4)}{\kilo\gram}
| improve this answer | |
  • Exactly what I was looking for, thank you! Seems like the siunitx in my texlive is too old, though. (2009/09/21 v1.3a) – Tim N Dec 10 '11 at 18:14
  • @TimN Version 1.3a manual page 25 discusses the support available in that version. Basic functionality is the same but the option names are different (they were not as clear in v1.x). – Joseph Wright Dec 10 '11 at 18:18
  • @JosephWright: Thank you very much, straight from the source :) For reference to future readers: the relevant keys in 1.3a are seperr and repeatunits=false. – Tim N Dec 10 '11 at 19:35
  • Can I set [multi-part-units = single] for the whole document? Or do I have to repeat it for every instance? – JHBonarius Feb 13 '18 at 11:48

I managed to simply use SI{12+-0.4}{V} to generate the desired output after importing the package with \usepackage[separate-uncertainty = true]{siunitx}.

The manual can be found at ctan, the parts about uncertainty formatting are on page 28 (as of September 2020).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.