[Tex/LaTex] Plural units with siunitx

siunitx

Does siunitx (or any other unit package) have a way of showing plural units?

For example, \SI{1}{\bit} should (and does) render "1 bit".

But \SI{20}{\bit} should render "20 bits"; instead, it renders "20 bit".

I understand that this isn't always the default (for example, if you want to talk about a "32-bit operating system"), but is there an option that would enable this?

To support validity of this question I can give and example where IEEE in their 'Editorial Style Manual' require that "Plurals of units of measure take the “s.” For example, the plural form of 3 mil is 3 mils; 3 bits/s instead of 3 bit/s".

Best Answer

siunitx lets you define new units using

\DeclareSIUnit{<macro>}{<symbol>}

so you could make your own plural units, i.e.

\DeclareSIUnit{\bits}{bits}

\documentclass{article}
\usepackage{siunitx}
\sisetup{binary-units=true}
\DeclareSIUnit{\bits}{bits}
\begin{document}
\SI{1}{\kilo\bit} or \SI{1000}{\bits}.
\end{document}