I am using siunitx to align numbers in a column. Problem is I got by intention one row at the beginning which is a large number, indicated by ',' per 1,000. See the following example.
What I would like to achieve:
1) Align the decimals to the decimal point '.' This is row 2, 3 and 4.
2) center the big numbers, i.e. row 1 and 5 in this example. When I tested different options, the large numbers where always either too much to the left or too much to the right. If possible, they should simply be centered. I believe that makes the most sense in terms of formatting.
Is it possible?
\documentclass{article}
\usepackage{siunitx}
\sisetup{%
input-ignore={,},
input-decimal-markers = {.},
table-format = 2.2,
table-number-alignment = center,
}%
\begin{document}
\begin{tabular}{SS}
row & alignToDec \\
row1: & 19,000,000.0 \\
row2: & 12.38 \\
row3: & 1.97 \\
row4: & 91.01 \\
row5: & 87,000,000.0 \\
\end{tabular}
\end{document}
S
type columns for columns that only contain text (first column in your example code) and as already suggested by Bernard, enclose text inS
type columns (first row in your code) as well as entries that should be centered in a pair of{}
.S
column is considered by siunitx as non-numeric content and centred.