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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the MacTeX 2011 Distribution on OSX Lion (both with all updates installed) and I get a strange error from the siunitx package, that did not occur with MacTex 2010 on Snow Leopard.

As a minimal example

\SI{2 \pi \cdot 10}{\kilo\hertz}

will fail to be typeset with the error Missing $ inserted., whereas changing the \SI command to

\SI{2 \pi \cdot 1}{\kilo\hertz}

will be typeset with no errors.

Can someone explain, why siunitx fails to parse the first command correctly?

share|improve this question
up vote 8 down vote accepted

If you force text mode for output, it is down to you to ensure that math mode is selected for symbols which require it. As egreg has pointed out, one option is simply to turn off the parser and allow any math mode material in the number. The alternative approach requires that you create a suitable wrapper for each math mode symbol:

\SI{2 \mypi \mycdot 10}{\kilo\hertz}
share|improve this answer
Thanks! That solves this issue. Any idea why this was no problem with MacTex 2010 ? – TFG Dec 12 '11 at 11:33
@TFG I'd need to know which siunitx version we are talking about. 'MacTeX 2010' covers a lot, depending on when you updated it. – Joseph Wright Dec 12 '11 at 11:51
According to texdoc I am using the version released on 2011/12/09 right now. The version I used before and that had no problems with this notation was released on 2010/7/15. – TFG Dec 12 '11 at 12:01
@TFG I'd need to see your full log. This does not work for me with any release of siunitx that I know of! (E-mail directly to me might be best: joseph.wright@morningstar2.co.uk) – Joseph Wright Dec 12 '11 at 12:14

You have to turn off the number parsing in the first argument:


Page 22 of the documentation.

share|improve this answer

Your Answer


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.