# "Package siunitx Error: Duplicate \per" with \DeclareSIUnit

The following gets me this error

Package siunitx Error: Duplicate \per

The desired output is N.m/(rad.s-1)

\documentclass{article}
\usepackage{siunitx}
\sisetup{
inter-unit-product = \ensuremath{{\hspace{-0.5ex}}\cdot{\hspace{-0.5ex}}},
sticky-per,
per-mode = symbol,
bracket-unit-denominator,
}
\begin{document}
\end{document}

• Try changing \si{\N\m\per\radpers} to \si{\N\m\per(\radpers)}.
– Mico
Dec 10, 2020 at 20:22
• @Mico The output would be forced into the literal mode as shown here ibb.co/TgBDLCr whithout even the desired result.
– Diaa
Dec 10, 2020 at 20:36
• You've set sticky-per, which means you can only have one \per in the entire unit Dec 11, 2020 at 8:59

You have set sticky-per, which means that \per is automatically applied to every unit after the first one. You have two \per in \N\m\per\radpers, as this becomes (effectively) \N\m\per\radian\per\s. You would see exactly the same error if you used that input directly. You need to turn off sticky-per.

(I personally do not like sticky-per: it is included in the package only as some users feel this is more 'logical'.)

• I thought that the definition of the declared unit \radpers and its options won't be expanded.
– Diaa
Dec 11, 2020 at 9:27
• @Diaa No, the way things work is units are parsed to give an internal representation, then re-constructed based on the output settings. That's why I said \N\m\per\radpers is 'effectively' \N\m\per\radian\per\s: in reality it's not the same. Dec 11, 2020 at 9:37
• But if I removed sticky-per, I would get N.m/(rad.s), which means that the option per-mode = reciprocal-positive-first of \DeclareSIUnit has no effect at all. Is it intended to work like this to ignore all the options of \DeclareSIUnit? In other words, when do the options of \DeclareSIUnit affect the declared unit?
– Diaa
Dec 11, 2020 at 10:40
• @Diaa No, the options always apply to the unit as a whole: as I said, what happens is everything is pared then re-combined. I get the odd question about this, but I've never seen a typeset publication where people use this 'mixed' style of unit presentation. Dec 11, 2020 at 10:54

A relevant answer suggested using \raiseto{-1} or \tothe{-1} instead of \per\ with \DeclareSIUnit.

However, I don't know if the error is a result of a wrong syntax or a bug.

\documentclass{article}
\usepackage{siunitx}
\sisetup{