is it possible to customize the space inserted before and after the plus-or-minus symbol using siunitx
?
My problem is the following: when used in math mode, a space is inserted before and after the plus-or-minus symbol, which is fine. But the same space is missing when using in text mode, which I don't find aesthetic. How can I change this behavior? I don't think I've seen a command to do this in the documentation.
Here is a MWE:
\documentclass{article}
\usepackage{siunitx}
\sisetup{mode = match, separate-uncertainty = true}
\begin{document}
\qty{18.0+-0.2}{\kilo\gram}
(18.0\:±\:0.2)%The spacing I would like to have around ±
$\qty{18.0+-0.2}{\kilo\gram}$%To compare with the math mode
\end{document}
Best Answer
The issue is that in v3 I work harder to use 'real' text mode symbols, but they of course don't space correctly in 'math like' situations. I've logged and issue and will creat a release shortly. For the present, you can use
The idea here is that if
\mathord
applies, we filter out\cdot
/\pm
/\times
and just replace with the text mode version. Without the\mathord
, the definitions are adjusted such that spaces are added explicitly to maintain the spacing.