Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 14 down vote accepted

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).

\sisetup{separate-uncertainty}%
\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}
share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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