How can I right align the following two columns, just specifying that there will be at most 5 integer digits and never any decimals? I can't seem to get the right combination of options. I can align it properly, but I lose all the commas for some reason.
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\begin{tabular}{r
S[table-format = 5.0,group-digits=true,group-separator={,},table-number-alignment = right,input-ignore={,},input-decimal-markers={.},group-digits=true,group-separator={\,}]
S[table-format = 5.0,group-separator={,},table-number-alignment = right,input-ignore={,},input-decimal-markers={.},group-digits=true,group-separator={\,}]
}
siunitx: &\num{19000} &\num{19,000} \\
siunitx: &\num{7,000} &\num{7,000} \\
siunitx: &\num{900} &\num{900} \\
siunitx: &\num{90} &\num{90} \\
\end{tabular}
\end{document}
Best Answer
You are using
\num
inside anS
column: that's not how it works. The column contents are parsed 'directly':