[Tex/LaTex] Recommend way to get angular velocity in degree with siunitx


The siunitx package has a special macro for setting angles in degrees called like \ang{42}, which renders as 42°, i.e. sets no space between the number and the unit as recommended and in contrast to the normal \unit, which inserts a thin space. Unfortunately the \ang macro has no optional argument adding additional units (as in \ang{42}[\per\second]), which leads to the following question:

Having an angular velocity in degree (unit: degree per seconds; I do not want to use rad/s here), what is the recommended way to have a nice (correct) output and what is the recommended way with siunitx?

I have two suggestions:



resulting in and second


which looks like enter image description here. Both look unfamiliar, but the output of the latter might look a bit more familiar than the first one, altough the code of the former is nicer than that of the second one.

Does anyone know what is officially correct?

Best Answer

One possibility to keep being flexible would be to redefine \ang with an xparse argument signature like the following {omo} to add the optional unit in the third argument. This macro then could easily be redefined.

Unfortunately this would either include a call to \SI and thus loosing the possibilities of anglular minutes and angular seconds of the original \ang macro or include a call to the old \ang macro. The latter is to my knowledge not possible without code duplication, as neither the \let nor the \LetLtxMacro commands can cope with macros defined by xparse (which is the case for \ang defined in siunitx).

As a workaround it is possible to use the following definition until there is a better solution:


Then it is possible to write




and add spacing as \, to the macro definition later, if that should be needed.


I contacted Joseph Wright (siunitx package author) and he proposes


according to the NIST standard:

There is a space between the numerical value and unit symbol, even
when the value is used in an adjectival sense, except in the case
of superscript units for plane angle.

So that's the way to go, which can be achieved by

Related Question