You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to typeset $\sqrt{3}\times10^{10}~m^{-1}$ using \qty, similar to \qty{3e10}{m^{-1}}, in a document that uses \sisetup{number-mode=match}.
Using parse-numbers=false almost works:
\sisetup{number-mode=match}
The number is not \qty{3e10}{m^{-1}}, but rather \qty[parse-numbers=false]{\sqrt{3}\times10^{10}}{m^{-1}}.
produces:
which somehow typesets the $\sqrt{3}$ in the text font, but the $\times 10^{10}$ in the math font!
Presumably this is unintended behaviour, that someone with knowledge of the internals of siunitx may be able to fix.
After some experimentation I found that adding the number-mode=math option and wrapping the number in \text{} produes the desired output, although I’m not sure why! So, this is a workaround:
\sisetup{number-mode=match}
The number is not \qty{3e10}{m^{-1}}, but rather \qty[number-mode=math, parse-numbers=false]{\text{\sqrt{3}\times10^{10}}}{m^{-1}}.
which produces:
I'm using LuaLaTeX with TeX Live 2023 on Overleaf.
The text was updated successfully, but these errors were encountered:
I have been trying to typeset$\sqrt{3}\times10^{10}~m^{-1}$ using
\qty
, similar to\qty{3e10}{m^{-1}}
, in a document that uses\sisetup{number-mode=match}
.Using
parse-numbers=false
almost works:produces:
$\sqrt{3}$ in the text font, but the $\times 10^{10}$ in the math font!
which somehow typesets the
Presumably this is unintended behaviour, that someone with knowledge of the internals of siunitx may be able to fix.
After some experimentation I found that adding the
number-mode=math
option and wrapping the number in\text{}
produes the desired output, although I’m not sure why! So, this is a workaround:which produces:
I'm using LuaLaTeX with TeX Live 2023 on Overleaf.
The text was updated successfully, but these errors were encountered: