When I use \num{2.17989e-2}, I get the following output:
As you can see, there is a weird space between 9 and 8 in the decimals. Why is this happening and how can I eliminate it?
Best Answer
This is for siunitx manual:
Grouping digits into blocks of three is a common method to increase the ease of reading of numbers.
So the default behavior of the package is precisely that, to group the digits. But there is an option to activate/deactivate that (as David said in his comment).
\documentclass{article}
\usepackage {siunitx} % I have version 2020/02/25
\sisetup{group-digits=false} % changes the defalut (true)
\begin{document}
Ungrouped digits (default now): \num{2.17989e-2}.
\bigskip
Grouped digits: \num[group-digits=true]{2.17989e-2}.
\end{document}
For historical reasons due to the fact that usually the \mathrm font is OT1 encoded, the command \mathsterling does \mathit{\mathchar"7024}} (that is it uses the dollar sign, which in the italic OT1 font is a pound sign).
Fix the wrong definition.
\documentclass[a4paper,12pt]{article}
\usepackage{fontspec}
\usepackage{libertine}
\usepackage{siunitx}
\renewcommand{\mathsterling}{\mathrm{\mathchar"70A3}}
\begin{document}
The \pounds\ pounds macro behaves as expected
And this is \pounds40434.5345
The dollar prefix works fine:
\SI[round-precision=2,round-mode=places,round-integer-to-decimal]{34324}[\$]{}
But the pounds prefix is imperialistic:
\SI[round-precision=2,round-mode=places,round-integer-to-decimal]{34324}[\pounds]{}
But straight pound sign is ok:
\SI[round-precision=2,round-mode=places,round-integer-to-decimal]{34324}[£]{}
\end{document}
Best Answer
This is for
siunitx
manual:So the default behavior of the package is precisely that, to group the digits. But there is an option to activate/deactivate that (as David said in his comment).