我有一张包含测量结果的表格。目前,每个测量“类型”有一列。在每一列中,我都有如下值$+$0.74\,\,$\pm$\,\,0.14
。该表格相当长(约 30 行),而且看起来非常混乱。我认为可以将列对齐一字符,如(第一个?).
或$\pm$
。但是,我认为它仍然看起来杂乱无章。有没有办法在多个项目上对齐表格列,如两者.
和。$\pm$
也许这也会看起来很奇怪,我不知道。
以下是我目前拥有的:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{lccccl}
& A & B & C & D & E\\
continental US & $-$0.81\,$\pm$\,0.14 & $-$1.7\,$\pm$\,0.30 & $-$0.81\,$\pm$\,0.15 & $-$1.6\,$\pm$\,0.30 & $-$0.78 \\
Central-Eastern US & $-$2.9\,$\pm$\,0.38 & $-$3.0\,$\pm$\,0.38 & $-$2.9\,$\pm$\,0.39 & $-$2.9\,$\pm$\,0.39 & $-$2.7 \\
Western Europe & $-$2.9\,$\pm$\,0.63 & $-$2.6\,$\pm$\,0.56 & $-$3.0\,$\pm$\,0.65 & $-$2.6\,$\pm$\,0.56 & $-$2.6 \\
Japan & $-$0.49\,$\pm$\,0.13 & $-$1.2\,$\pm$\,0.33 & $-$0.49\,$\pm$\,0.14 & $-$1.2\,$\pm$\,0.33 & $-$0.49 \\
Middle East & $+$0.78\,$\pm$\,0.08 & $+$4.0\,$\pm$\,0.42 & $+$0.79\,$\pm$\,0.08 & $+$4.0\,$\pm$\,0.42 & $+$0.72 \\
East Central China & $+$10\,$\pm$\,1.1 & $+$21\,$\pm$\,2.2 & $+$10\,$\pm$\,1.1 & $+$20\,$\pm$\,2.2 & $+$8.7 \\
North Central India & $+$1.3\,$\pm$\,0.27 & $+$4.0\,$\pm$\,0.84 & ~~1.1\,$\pm$\,0.27 & $+$4.6\,$\pm$\,1.1 & $+$1.1 \\
\end{tabular}
\end{document}
欢迎提出任何使其更好的建议:)
答案1
siunitx
对于这种类型的表,我建议:
\documentclass{article}
\usepackage{booktabs,siunitx}
% uncertainty is separated with a "plus-minus" symbol
\sisetup{separate-uncertainty=true}
\begin{document}
\begin{tabular}{
l
S[table-format=-1.2,
table-figures-uncertainty=1]
S[table-format=-1.2,
table-figures-uncertainty=1]
}
\toprule
& {A} & {B} \\
\midrule
continental US & -0.81 \pm 0.14 & -1.7 \pm 0.30 \\
Central-Eastern US & -2.9 \pm 0.38 & -3.0 \pm 0.38 \\
Western Europe & -2.9 \pm 0.63 & -2.6 \pm 0.56 \\
Japan & -0.49 \pm 0.13 & -1.2 \pm 0.33 \\
\bottomrule
\end{tabular}
\end{document}
相同数量的有效数字似乎更好;查看包文档了解更多详细信息。