# How to center numbers in a table column with the siunitx package?

I've been trying and searching for quite some time, but I don't see what I'm doing wrong:

I want to create several table columns with decimal numbers (some in the format "1,25" and some like "3,156" or "12,247").

I tried:
(The vertical lines are only for seeing clearly where the columns begin and end.)

\documentclass[11pt, a4paper]{scrreprt}

\usepackage{booktabs}

\usepackage[round-mode=places, round-integer-to-decimal, round-precision=2,
table-number-alignment=center,
round-integer-to-decimal
]{siunitx}

\begin{document}

\footnotesize

\begin{tabular}{|S| S[round-precision=4]| c }
\multicolumn{1}{c}{$A_{max}$} & \multicolumn{1}{c}{$A_{max}$} & test \\
1,2345 & 1,2345 & 1,2345\\
1,23 & 1,23 & 1,23\\
1 & 1 & 1\\
1,23456 & 1,243456 & 1,23456\\
%11,23456 & 11,23456\\

\end{tabular}

\end{document}


I'd like the whole "number block" to be centered in the width of the column, however, in the result the decimal point seems to be the centered in the S-columns:

From my understanding of the siunitx-manual, the option table-number-alignment=center should do exactly that, shouldn't it?

-

When you are using table-number-alignment = center, you also need to set up the space to reserve using the table-format option. In your case, table-format = 1.4 would be appropriate.
thanks, Joseph! My error was: I thought that table-format = 1.2 would round the numbers to 2 digits after the decimal point, but it seems to only to define the alignment of the number in the column and the number of decimal digits has to be defined with e. g. round-precision=2 – MostlyHarmless Jul 1 '11 at 21:30
@Martin: Someone recently asked more-or-less about this 'Why does table-format = ... not round?', to which the answer is that I'd prefer people to have to choose explicitly to turn on rounding. – Joseph Wright Jul 1 '11 at 21:32