I have a problem with the siunitx package.

What I would like to do is the following. I have a number which for instance equals 145 and has the units mm. However, there is also an error expressed in percentages. So how I would like to represent this value is: 145 mm ± 5% using the siunitx package.

I haven't been able to figure out how to do this using the siunitx package. What I've managed to do up to this point is the following:

  • \SI{145}{\milli \meter} $\pm$ \SI{5}{\percent} which gives: 145 mm ± 5% This is the correct form. However, when I'm at a line ending it will separate the plus minus 5% from the 145 mm because they do not 'belong' together.

  • \SI{145}{\milli \meter \SI{\pm 5}{\percent}} which gives: 145 mm±5% while I would like to have the separation after the mm and plus minus in comparison to the 145 mm.

I also tried to work with \mbox{} to make sure that at a line ending my 145 mm would not be separated from its error, this however increases the length of a line with respect to the rest of the text which makes it very ugly.

I hope someone can help me

  • Welcome to TeX.SX! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. Sep 24, 2013 at 2:03
  • You should be using $\SI{145}{\milli\meter} \pm \SI{5}{\percent}$ or if you really want to forbid line-breaks ${<stuff>}$. Sep 24, 2013 at 2:09

1 Answer 1


One could regard the percentage error as part of the unit and write:

\SI{145}{\milli\meter{} \pm{} 5\percent}

Sample output

This will not break across lines, unless you use the option allow-number-unit-breaks.

You must log in to answer this question.