# How to remove the small space separator in small numbers with SIunitx?

Large numbers have a nice space separator which I want to keep. But these gaps are annoying in small numbers and I want to get rid of them. Here's a MWE showing my issue:

\documentclass[12pt,letterpaper,twoside]{book}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{siunitx}

\begin{document}

Blabla bla :
\begin{align}
x &= \SI{32100000}{\m}, \\[1ex]
y &= \SI{0.0123456}{\m}
\end{align}

\end{document}


Preview:

So is there a way to keep the spacings in large digit numbers, and remove the spacings in small digit numbers? I checked the SIunitx package documentation and didn't found a way yet.

• I don't think this is a good thing, typographically. These thin spaces are added to improve readability, so the criterion to add them or not is not the size of the number, but the number of digits. Look at how tables of logarithms were printed. Sep 4, 2020 at 13:41

You can tell siunitx to group only the integer part of numbers with group-digits=integer.

\documentclass[12pt]{article}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{siunitx}

\sisetup{group-digits=integer}

\begin{document}
Blabla bla:
\begin{align}
x &= \SI{32100000}{\metre}, \\[1ex]
y &= \SI{0.0123456}{\metre}
\end{align}
\end{document}


• Works great ! Thanks a lot.
– Cham
Sep 4, 2020 at 13:41

Try this

\documentclass[12pt,letterpaper,twoside]{book}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{siunitx}

\begin{document}

Blabla bla :
\begin{align}
x &= \SI{32100000}{\m}, \\[1ex]
y &= \SI[group-separator =]{0.0123456}{\m}
\end{align}

\end{document}


• If you want to locally disable grouping I think it would be cleaner to say group-digits=false instead of making the group separator empty. Sep 4, 2020 at 13:33
• For some reason \SI[group-separator = false]{0.0123456}{\m} does not work for me! Sep 4, 2020 at 13:42
• You want \SI[group-digits=false]{0.0123456}{\m} (i.e. group-digits and not group-separator). Sep 4, 2020 at 13:43
• Using ={} works for me.
– Cham
Sep 4, 2020 at 13:44