This is the design behaviour. As described in the manual, options set for a a unit apply to that unit only, which means that they do not apply to combinations. From the point of view of siunitx
\mega\Bps
and \Bps
are distinct for the application of options.
At one time there was a strong implementation reason for this: in v1 of siunitx
separate parsing approaches were used for different forms of output, and so changing half-way through was not possible. This limitation does not apply to the current code.
The other reason for this restriction is conceptual. The approach requested in the question is not unreasonable, but other combinations could well be. For example, if you start combining different units with different options then the 'correct' result is hard to be sure of. So the options are checked only for the 'top level' input to \SI
, and only if there is exactly one unit macro and no other input.
At the same time, the 'shortcut' approach to units was only ever intended to be used at 'one level', for example
\DeclareSIUnit[per-mode=symbol,per-symbol=p]{\Bps}{\byte\per\second}
\DeclareSIUnit[per-mode=symbol,per-symbol=p]{\MBps}{\mega\byte\per\second}
It does work in more complex ways, but the options are only ever read at the 'top level'.
You can define your own units by \DeclareSIUnit
. In your case I suggest:
\documentclass{article}
\usepackage{siunitx}
\DeclareSIUnit \voltampere { VA } %apparent power
\DeclareSIUnit \var { var } %volt-ampere reactive - idle power
\begin{document}
\SI{10}{\voltampere}
\end{document}
I changed the document class from minimal
to article
. The drawbacks of the document class are described here: Why should the minimal class be avoided?
Best Answer
siunitx
sets units in text mode, so you have to ensure to be in math mode (thanks egreg and Joseph) for the root and then switch back to text for the unit. Not that complicated if you define a new unit and use it afterwards.