I would like to give numbers with three decimals places of precision, unless they are so small that this would round them down to zero. In that case, I would like three significant figures instead.
Here is a minimal non-working example:
\documentclass{article}
\usepackage[round-mode=places,round-precision=3]{siunitx}
\begin{document}
\num{0.0437} % gives 0.044
\num{0.00437} % gives 0.004
\num{0.000437}% I want this to give 0.000437
\end{document}
Right now I do it by overriding the settings from the preamble for any number that is small enough. So I'd replace \num
with \num[round-mode=figures]
. But I'd like to do it automatically if I can.
I read the source of siunitx.sty
but I still don't grok LaTeX3-style programming. I'd appreciate any advice.
siunitx
, so you'd need to code up your own approach.