I have a table, where values in the second column (B) are expressed as the mean, with the standard deviation in parentheses next to it, in the same column:
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\begin{tabular}{S[table-format=1]S[table-format=4(3.1)]}
\hline
{A} & {B} \\
\hline
1 & 1176(156.7) \\
2 & 150(20.1) \\
3 & 456(11.1) \\
3 & 24(52.1) \\
\hline
\end{tabular}
\end{document}
When I run this I get: Package siunitx Error: Invalid number '4(3.1)'.
When I change it to table-format=4(3)
, I get: Package siunitx Error: Invalid number '1176(156.7)'.
When I change the first row to 1176(156)
, this value prints as expected, but I need the decimal.
When I change the first row to 1176.0(156.1)
, it is printed as "1176.0(1561)", which is not what I want.
How can I print the mean value as an integer, and the standard deviation in parentheses with the first decimal place?
I am using siunitx 2021-07-26 v3.0.23
Best Answer
This was a bug in
siunitx
, to be fixed in v3.0.24. For the present, try