This question includes a solution but I really want to know why it works and why what "should" work doesn't I think my MWE says is all:
\documentclass[12pt]{article}
\usepackage{siunitx}
% TeX Live 2015 (Ubuntu 18.04)
% siunitx Ver 2.6m
\sisetup{
group-digits=integer,
group-minimum-digits={3},
group-separator={,} % NOT "\,"
}
\begin{document}
After looking at a number of examples (and the
documentation) I could not got what I wanted
(3,000). If group-separator is set to \verb:{\,}:
the thousands separator is a space. But if set to
"," it works.
\begin{tabular}{ccc}
Code in document & & Typeset as\\
\hline
\verb:\num{3000}: & \num{3000} & 3,000\\
\verb:$\num{3000}$: & $\num{3000}$ & 3,000\\
\verb:\num{$3000$}: & does not work\\
\end{tabular}
\end{document}
\,
is a thin space in LaTeX, if you use it, you get a space, not a comma. What's the problem with using the comma directly?group-separator={,}
you get a comma; withgroup-separator={\,}
you get\,
, which is a thin space.group-seperator=,
andgroup-separator={,}
and it only worked with the latter? Sincegroup-separator=\,
also worked, but didn't show a,
(because\,
is a thin space)...?