In my project, at some point I need to use a \numlist from siunitx in an \uppercase environment. However, additional options to the numlist command are not detected properly, as can be seen in the following MWE.
\documentclass[draft]{article}
\usepackage{siunitx}
\begin{document}
This does work: \numlist[parse-numbers=false]{2;3;4;5X}.
\uppercase{This does not work: \numlist[parse-numbers=false]{2;3;4;5X}.}
\end{document}
This produces the following error
The option file 'PARSE-NUMBERS' is not known by siunitx:perhaps it is spelled incorrectly.
and the resulting output is not correct.
\numlistis not expandable, you will have to come up with a different approach, which will depend on the intended usage. For example,\sbox0{\numlist[parse-numbers=false]{2;3;4;5X}} \uppercase{This does not work: \box0.}compiles, but "and" is not capitalized and the box will not respond to fontsize changes, etc. Further,\box0is temporary and thus ephemeral. – Steven B. Segletes Aug 23 '21 at 10:01textcasepackage and\MakeTextUppercase{This does not work: \NoCaseChange{\numlist[parse-numbers=false]{2;3;4;5X}}.}– daleif Aug 23 '21 at 11:50