I am using this to collect some of my thoughts on the use of exponent-to-prefix
because I know the developer is around here. My question could be titled "Will those three things be fixed in a future version of siunitx
?" I could submit this as a bug report, but I imagine not all of this may be fixed, so the answer might include why. I am also looking for a short-term workaround to the final example.
\documentclass{article}
\usepackage{siunitx}
\begin{document}
% infinite loop:
%\SIlist[exponent-to-prefix=true]{1e3}{m}
% should maybe print a warning, not an error:
% \SIlist[scientific-notation=true,exponent-to-prefix=true]{10000; 20000}{\m}
% this works as expected:
\SIlist[scientific-notation=engineering,exponent-to-prefix=true]{10000; 20000}{\m}
% does not work as expected. **Edit** I would love to see "10.000 and 20.000 km" here:
\SIlist[scientific-notation=engineering,exponent-to-prefix=true,list-units=single]{10000; 20000}{\m}
% this is closer, but still does not work:
\SIlist[scientific-notation=fixed,fixed-exponent=3,exponent-to-prefix=true,list-units=single]{10000; 20000}{\m}
\end{document}
The first line causes an infinite loop that should not happen so easily, I would think.
The second line throws an error, but it should really be a warning in my opinion because the manual clearly states
When the exponent-to-prefix option is set true, the package will attempt to convert any exponents in quantities into unit prefixes, and will attach these to the first unit given. This process is only possible if the exponent is one for which a prefix is available, and retains the number of significant figures in the input.
So in my eyes, a warning would be enough.
Finally, I wonder how (with a patch or a future version), exponent-to-prefix
can be combined with list-units=single
successfully.
exponent-to-prefix
use a “macro form” for the unit.