# Why is this \SI{number ^ power}{unit} not allowed?

Here is an example:

\documentclass{scrartcl}
\usepackage[quotient-mode = fraction]{siunitx}
\begin{document}
$\SI{1 / 2500 \pi ^ 2}{\micro \farad}$
\end{document}


It produces:

siunitx error: "invalid-token-in-number"

• siunitx expects a number, since it uses a parsing engine. Thus you can't give it stuff it would have to evaluate first. I don't know if there is a way to turn it off, but here you'd probably fare best to git for ${1 / 2500 \pi ^ 2}~\si{\micro \farad}$
– Timm
Mar 16, 2017 at 12:31
• @ Timm I assume that the OP does not want to have it evaluated, but just to get \pi squared ... Mar 16, 2017 at 12:37
• @Jürgen: Is assumed that, I intended to use "evaluated" as a more general term for read-and-figure-out-what-it-is. Maybe a question for English Language & Usage ;).
– Timm
Mar 16, 2017 at 13:17

The number parser can be disabled using

\SI[parse-numbers=false]{1 / 2500 \pi ^ 2}{\micro \farad}


for this single case or generally with

\sisetup{parse-numbers = false}


As to the 'why' part: the package is focussed on physical quantities, and real measurements cannot delivery \pi^2 or similar as an outcome, only (here)

\SI{3.95e-3}{\micro \farad}


or similar

• Though of course if you want to compare a measured value with a theoretical prediction, you might well want to typeset them the same - presumably hence why it's possible but not the default. Mar 16, 2017 at 13:42
• @ChrisH Perhaps though the value you are comparing will still be a real number Mar 16, 2017 at 17:35
• Personally I use \si instead of \SI in cases like this. Sometimes you do want the units attached to an exact real or irrational value. Mar 16, 2017 at 17:50
• It would be interesting if the error message mentioned this option. Mar 16, 2017 at 18:52
• Thank you @Joseph Wright and all other for the answer and comments! When I use parse-numbers = false then is the package option quotient-mode = fraction is disabled. Can I have both things? Thank you for your help in advance! Mar 17, 2017 at 6:22