I would like the second and third examples to be printed like the first ($\times$
instead of x
, spacing, repeated unit). However, in order to make siunitx
accept \sqrt{2}
or 2^n
, I need to turn off number parsing, which turns off formatting of the number part completely.
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\SI{2 x 2}{\meter}
\SI[input-symbols=n,parse-numbers=false]{2^n x 2^n}{\meter}
\SI[parse-numbers=false]{\sqrt{2} x \sqrt{2}}{\meter}
\end{document}
Is there a way to partially parse the number part, so that spacing etc. is as intended and \sqrt{2}
or 2^n
still accepted?