# Using space instead of comma for large numbers?

Is there a package I could use to insert a space instead of a comma for large numbers?

For example,

12 345.67

12,345.67

If needed, I am using the extbook environment. All of my numbers are in math mode.

Edit: Is there a way I can do this formatting without having to type in num (from siunitx) for every single number?

-

Numbers can be formatted with package siunitx:

\documentclass{article}
\usepackage{siunitx}

\begin{document}
\num{12345.67}
\end{document}


The space can be configured via option group-separator. Its default is a small space (\,).

-
Is there a way I can do this without manually typing \num prior to each number? –  Clarinetist Jun 27 at 4:53
@Clarinetist: Package siunitx provides column type S for numbers inside tables. Otherwise digits would have to be made active. This cannot be done without breaking many other things, because numbers are used in many circumstances (\hspace{2em}, \multicolumn{4}{...}{...}, ...) –  Heiko Oberdiek Jun 27 at 5:18
@Clarinetist: In some contexts (like a tabular, in a number-only column, say), yes. In general, not really. –  Werner Jun 27 at 5:18