14

That's my MWE:

\documentclass[a4paper,10pt]{book}

\usepackage[load=addn,separate-uncertainty=true]{siunitx}

\sisetup{%
      output-decimal-marker={,},
      load-configurations=abbreviations,
      group-separator={.},
      per-mode=fraction
    }

\begin{document}
    \SI{12345.66666666}{\kilo\meter\per\hour}
\end{document}

The result has been being 12.345,666.666.66, but I want 12.345,66666666.

19

The group-digits option is a choice key, which has the possible values true,false,integer or decimal. In this case, only the integer part of the number should have group digits, so use group-digits=integer.

\documentclass[a4paper,10pt]{book}

\usepackage[load=addn,separate-uncertainty=true]{siunitx}

\sisetup{%
      output-decimal-marker={,},
      load-configurations=abbreviations,
      group-separator={.},
      per-mode=fraction,
      group-digits=integer
    }

\begin{document}
    \SI{12345.66666666}{\kilo\meter\per\hour}
\end{document}

enter image description here

Updated due to the comment

\documentclass[a4paper,10pt]{book}

\usepackage[separate-uncertainty=true]{siunitx}

\sisetup{%
  output-decimal-marker={,},
  group-separator={.},
  group-minimum-digits=4,
  per-mode=fraction,
  group-digits=integer
}

\begin{document}
\num{62034.023458763e23} 


\num{6232.023458763e23} 

\SI{12345.66666666}{\kilo\meter\per\hour}
\end{document}
  • Hi. It works well with with 6 integers digits, example: \num{62034.023458763e23} but not with 5. Try \num{6203.023458763e23}. Is it a bug? – cbe-user-99263 Dec 6 '17 at 12:38
  • 1
    @cbe-user-99263: No, it is no bug, it is by - design. sunitx does not group digits fewer than 5 by default -- if this not wanted, use `group-minimum-digits=4, for example, as the updated example – user31729 Dec 6 '17 at 22:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.