2

How do I correctly use the s-column of SIunitx-package, when I have results with confidence intervals, e. g. 22.34 +/- 0.37. I am using math mode $\pm$, utilizing the plus-minus symbol and I just wanna use one column for this purpose (I already had the idea of using two columns, one for the result and one for the confidence interval...). Currently, I am struggling with the table-format option.

MWE:

\documentclass{scrreprt}
\usepackage{siunitx}
\usepackage{booktabs}

\begin{document}
\begin{table}
\centering
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{lS[table-format=3.2~{$\pm$}~2.2]}
\toprule
Column 1 & Column 2 \\
\midrule
Raw 1   & 125.44~{$\pm$}~22.06 \\
Raw 2   & 300~{$\pm$}~50 \\
Raw 3   & 0.56~{$\pm$}~0.01 \\
Raw 4   & 31.59~{$\pm$}~0.29 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
6

Use the correct format for uncertainties: no 'manual' formatting:

\documentclass{scrreprt}
\usepackage{siunitx}
\usepackage{booktabs}

\begin{document}
\begin{table}
\centering
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{lS[table-format=3.2(4),separate-uncertainty]}
\toprule
Column 1 & {Column 2} \\
\midrule
Raw 1   & 125.44\pm22.06 \\
Raw 2   & 300\pm50 \\
Raw 3   & 0.56\pm0.01 \\
Raw 4   & 31.59\pm0.29 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
2

How about using another column for the range?

\documentclass{scrreprt}
\usepackage{siunitx}
\usepackage{booktabs}

\begin{document}
\begin{table}
\centering
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{lS[table-format=3.2]@{~$\pm$~}S[table-format=2.2]}
\toprule
Column 1 & \multicolumn{2}{c}{Column 2} \\
\midrule
Raw 1   & 125.44 & 22.06 \\
Raw 2   & 300    & 50    \\
Raw 3   & 0.56   & 0.01  \\
Raw 4   & 31.59  & 0.29  \\
\bottomrule
\end{tabular}
\end{table}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.