With the upgrade to version 3.0.0 of siunitx it is no longer possible to use fractions in units.
Consider this minimal example:
\documentclass{article}
\usepackage{siunitx}
\sisetup{
quotient-mode = fraction,
}
\begin{document}
\num{7 / 2}
\end{document}
This is the output:
[...]
Package siunitx Warning: Option "quotient-mode" has been removed in this
(siunitx) release.
[...]
! Package siunitx Error: Invalid number '7 / 2'.
For immediate help type H <return>.
...
l.7 \num{7 / 2}
In version 2 it would generate a document with a fraction 7 / 2.
The documentation only gives the following hint, but I am not sure how to interpret it.
- Quotients of numbers are only supported as literals;
What can I do to obtain the old behaviour?
Should I skip siunitx entirely and just write $\frac{7}{2}$?
This would ignore any siunitx setting, but for all I know they were also ignored in previous versions for fractions.
! Package siunitx Error: Invalid number '7 / 2'.– Claudio May 23 '21 at 09:22\num[parse-numbers=false]{7 / 2}works for me. – Ulrike Fischer May 23 '21 at 09:24parse-numbers=false(with plural), now it compiles, but it does not generate a fraction, just the three characters "7/2" (seven, slash, two). – Claudio May 23 '21 at 09:24