# How to use the 'qualifiers' in siunitx?

This question is extention of How to define unit in siunitx?

I need

10 kg of water/m^3 of air

How to get this...following code does not give this...

\documentclass{article}
\usepackage{siunitx}
\DeclareSIQualifier{\air}{of air}
\DeclareSIQualifier{\water}{of water}
\sisetup{per-mode = symbol,qualifier-mode = space}
\begin{document}
\SI{10}{\kg\water\per\kg\air}
%
10~kg of water/m$^3$ of air\\
\SI{10}{\kg\water\per\m\cubed\air}\\
\end{document}

-
Since you are working with the qualifier of air, it seems to me that the correct thing is the m of air that is cubed, hence the 10 kg of water/(m of air)^3 make sense, which is what siunitx is producing. – Peter Grill Jun 11 '12 at 4:45
I mean 10 kg of water for every one m^3 of air. so 10 kg of water/(m of air)^3 does not make sense here. – sandu Jun 11 '12 at 4:54
I am no expert on this, it seems that you should either not use the qualifier-mode = space setting, or simply use \SI{10}{\kg\water\per\m\cubed} of air. Perhaps someone more knowledgeable can help you further. – Peter Grill Jun 11 '12 at 5:16
I think Peter's right, the best thing to do here is probably to just put of air after the unit. This isn't SI notation, or commonly used notation. I've been trying to find a journal article where "<something> / m3 of <something>" is used, but found only one from 1983. The best thing might be to look at publications from your field and see how they do it. I would probably go with "The water content of the air is 10kg/m3", which is correct SI notation. – Jake Jun 11 '12 at 6:06
In text book it is given as 10 kg of water/m^3 of air – sandu Jun 11 '12 at 6:30

'Quantifiers' are essentially tied to a particular unit, for expressing the idea that a unit is related to one part of a system. This is not the way these things are 'officially' supposed to be dealt with, but are common enough to be useful. On the other hand, there is a limit to the amount that can be covered by an automated system. In particular, raising a 'qualified' unit to a power is normally taken as applying the power to the entire thing, for example

\documentclass{article}
\usepackage{siunitx}
\DeclareSIQualifier{\cat}{cat}
\begin{document}
\SI{10}{\mmol\per\kg\cat}
is the same as
$10$\,mmol\,kg\$_{\textrm{cat}^{-1}}
\end{document}


Dealing with a case where you want to 'qualify' a unit raised to a power is probably beyond the boundaries of what can be squeezed into the standard interface. I would therefore set up a special 'unit' for this

\documentclass{article}
\usepackage{siunitx}
\DeclareSIUnit{\mcubedair}{m^{3}\text{ of air}}
\sisetup{per-mode = symbol}
\begin{document}
\SI{10}{\kg\per\mcubedair}
\end{document}

-
Thank you...Joseph Wright – sandu Jun 12 '12 at 3:55