I used to format number grouping with a protected space (~
). Now I'm switching to siunitx's \num
. According to the package documentation ...
The formatter removes ‘hard’ spaces (
\,
and~
)
but when I surround my numbers with \num
it produces the following error output
! siunitx error: "invalid-token-in-number"
! Invalid token '\protect ' in numerical input.
l.5 \num{60~000}
| Numbers can only contain tokens defined using the 'input-...' options:
| the token '\protect ' is not set up as a valid part of a number.
I tried to include \protect
to the input-ignore
option but it just changes the invalid token in the error message to \unhbox
and \voidb
.
Here is a MWE (Miktex v2.9 and siunitx v2.5s):
\documentclass{article}
\usepackage{siunitx}
%\sisetup{input-ignore={\protect }}
\begin{document}
\num{60~000}
\end{document}
Of course, one could just remove the tilde character in each number but how would I include it into the ignored input tokens? Do I misinterpret the package documentation?