I'm using the package siunitx
for unit-typesetting.
In particular I wanted this expression:
\SI[per=frac,fraction=nice]{2}{\celsius\per\kilo\metre}
unfortunately I get many errors like:
siunitx error: version-1-option
version 1 option 'per' detected
Similarly for fraction
Without the option part it works:
\SI{2}{\celsius\per\kilo\metre}
I'm thinking that is because I'm not using latin but utf8 (inputenc) encoding, but not sure?!
Any advice?
Best Answer
The names of options in
siunitx
changed a lot between versions 1 and 2, and you are using the names from version 1, while you have version 2 installed. In version 2.x ofsiunitx
you should useper-mode=fraction
, notper=frac
. Similarly you should usefraction-function=\sfrac
instead offraction=nice
.\usepackage{xfrac}
is also required.(Addendum: clemens points out in a comment below that the
nice
option may have been referring to thenicefrac
package and its\nicefrac
macro. The output is similar, if you prefernicefrac
, use\usepackage{nicefrac}
instead of loadingxfrac
, and usefraction-function=\nicefrac
.)The manual can be found at for example: http://texdoc.net/texmf-dist/doc/latex/siunitx/siunitx.pdf