[Tex/LaTex] How to typeset space between number and degree celsius in siunitx

siunitx

I would like to change the way siuntix displays the \celsius so that there is a space between the numerical value and the degree celsius symbol. This is what is recommended by BIPM. I have tried the following approach based on other questions on here. However, this results the degree symbol to completely disappear and I am not sure why. I am using overleaf platform. How would I change that to show e.g. 55 °C?

\documentclass{article}
\usepackage{gensymb}
\usepackage{siunitx}

\sisetup{
 math-celsius = \textdegree \text{C}, % for temperatures
 text-celsius = \textdegree \text{C},

}

Best Answer

Just change it with \DeclareSIUnit:

\documentclass[]{article}

\usepackage{siunitx}
\DeclareSIUnit[number-unit-product = {~}]\celsius{\SIUnitSymbolCelsius}

\begin{document}
\SI{45}{\celsius}
\end{document}

The package's default however is a half/thin space. Compare:

\documentclass[]{article}

\usepackage{siunitx}
%\DeclareSIUnit[number-unit-product = {~}]\celsius{\SIUnitSymbolCelsius}

\begin{document}
\SI{45}{\celsius}\par
\SI{45}{\degree}\par
\end{document}

Without the redeclaration on the left and with it on the right:

without with

Related Question