我希望列中的数据相对于加号/减号和 X 符号居中/对齐。这是我使用的代码。有人能帮我吗?
\begin{table}[b!]
\begin{center}
\footnotesize
\caption{\label{tab:table1}
Summary of fiber characteristics. }
\begin{tabular} {|c||c|c|c|c|c|c|c|}
\hline
Type & $\overline L [\mu$m] & $\overline D [\mu$m] & $\beta$ & $\overline L^+$ & $\tau$ [ms] & St & $ V_s$ [m/s]\\
\hline \hline
t1 & 921 $\pm$ 142 & 28 $\pm$ 2.1 & 32.9 $\pm$ 5.6 & 16 $\pm$ 2.5 & 0.21 $\pm$ 0.03 & 0.06 $\pm$ 0.01 & $-3 \times 10^{-4}$\\
\hline
t2 & 950 $\pm$ 96 & 15.3 $\pm$ 0.9 & 62.1 $\pm$ 7.3 & 16.5 $\pm$ 1.7 & 0.07 $\pm$ 0.009 & 0.02 $\pm$ 0.003 & $-1 \times 10^{-4}$\\
\hline
t3 & 1446 $\pm$ 212 & 21.2 $\pm$ 0.97 & 68.2 $\pm$ 10.5 & 25.2 $\pm$ 3.7 & 0.14 $\pm$ 0.014 & 0.04 $\pm$ 0.004 & $-2 \times 10^{-4}$\\
\hline
t4 & 1594 $\pm$ 174 & 52 $\pm$ 3.62 & 30.7 $\pm$ 3.9 & 27.7 $\pm$ 3& 0.7 $\pm$ 0.1 & 0.22 $\pm$ 0.03 & $-1.1 \times 10^{-3}$\\
\hline
t5 & 2917 $\pm$ 242 & 62 $\pm$ 5.5 & 47.0 $\pm$ 5.7 & 50.8 $\pm$ 4.2& 1.12 $\pm$ 0.2 & 0.34 $\pm$ 0.06 & $-1.7 \times 10^{-3}$\\
\hline
t6 & 3044 $\pm$ 317 & 35.5 $\pm$ 6.5 & 85.5 $\pm$ 8.9 & 52.9 $\pm$ 5.5 & 0.41 $\pm$ 0.15 & 0.13 $\pm$ 0.05 & $-6 \times 10^{-4}$\\
\hline
t7 & 3840 $\pm$ 414.6 & 38.5 $\pm$ 2.9 & 99.7 $\pm$ 10.7 & 66.8 $\pm$ 7.2 & 0.6 $\pm$ 0.09 & 0.18 $\pm$ 0.03 & $-1.8 \times 10^{-3}$\\
\hline
\end{tabular}
\end{center}
\end{table}
答案1
使用该siunitx
包:
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\begin{table}[b!]
\caption{Summary of fiber characteristics. }
\centering
\footnotesize
\sisetup{uncertainty-mode=separate}
\renewcommand\arraystretch{1.3}
\label{tab:table1}
\begin{tabular} {|c||S[table-format=4.0(2)]
*{3}{|S[table-format=2.1(3)]}
*{2}{|S[table-format=1.3(4)]}
|S[table-format=-1.1e3,
round-mode=places,
round-precision=1]|}
\hline
Type & {$\overline L [\mu$m]} & {$\overline{D} [\mu$m]} & {$\beta$}
& {$\overline L^+$ } & {$\tau$ [ms]} & {St}
& {$V_s$ [m/s] } \\
\hline \hline
t1 & 921(142) & 28.(21) & 32.9(56) & 16.(25) & 0.21(3) & 0.06(1) & -3e-4 \\
\hline
t2 & 950(96) & 15.3(9) & 62.1(73) & 16.5(17) & 0.07(0.9) & 0.02(0.3) & -1e-4 \\
\hline
t3 & 1446(212) & 21.2(97) & 68.2(105) & 25.2(37) & 0.14(1.4) & 0.04(0.4) & -2e-4 \\
\hline
t4 & 1594(174) & 52.(362) & 30.7(39) & 27.7(3) & 0.70(10) & 0.22(3) & -1.1e-3\\
\hline
\end{tabular}
\end{table}
\end{document}
附录:
似乎您更喜欢在\pm
符号处只拥有对齐的数据。并且使用siunitx
包时所需的数据一致性并不重要,请尝试以下解决方案:
\documentclass{article}
\begin{document}
\begin{table}[b!]
\centering
\footnotesize
\caption{\label{tab:table1}
Summary of fiber characteristics. }
\begin{tabular} {|l|*{6}{r@{\,}c@{\,}l|} c | }
\hline
Type & \multicolumn{3}{c|}{$\overline L [\mu$m]}
& \multicolumn{3}{c|}{$\overline D [\mu$m]}
& \multicolumn{3}{c|}{$\beta$}
& \multicolumn{3}{c|}{$\overline L^+$}
& \multicolumn{3}{c|}{$\tau$ [ms]}
& \multicolumn{3}{c|}{St}
& \multicolumn{3}{c|}{$V_s$ [m/s]}\\
\hline \hline
t1 & 921 & $\pm$ & 142 & 28 & $\pm$ & 2.1 & 32.9 & $\pm$ & 5.6 & 16 & $\pm$ & 2.5 & 0.21 & $\pm$ & 0.03 & 0.06 & $\pm$ & 0.01 & $-3$ &$\times$& $10^{-4}$\\
\hline
t2 & 950 & $\pm$ & 96 & 15.3 & $\pm$ & 0.9 & 62.1 & $\pm$ & 7.3 & 16.5 & $\pm$ & 1.7 & 0.07 & $\pm$ & 0.009 & 0.02 & $\pm$ & 0.003 & $-1$ &$\times$& $10^{-4}$\\
\hline
t3 & 1446 & $\pm$ & 212 & 21.2 & $\pm$ & 0.97 & 68.2 & $\pm$ & 10.5 & 25.2 & $\pm$ & 3.7 & 0.14 & $\pm$ & 0.014 & 0.04 & $\pm$ & 0.004 & $-2$ &$\times$& $10^{-4}$\\
\hline
t4 & 1594 & $\pm$ & 174 & 52 & $\pm$ & 3.62 & 30.7 & $\pm$ & 3.9 & 27.7 & $\pm$ & 3& 0.7 & $\pm$ & 0.1 & 0.22 & $\pm$ & 0.03 & $-1.1$ &$\times$& $10^{-3}$\\
\hline
t5 & 2917 & $\pm$ & 242 & 62 & $\pm$ & 5.5 & 47.0 & $\pm$ & 5.7 & 50.8 & $\pm$ & 4.2& 1.12 & $\pm$ & 0.2 & 0.34 & $\pm$ & 0.06 & $-1.7$ &$\times$& $10^{-3}$\\
\hline
t6 & 3044 & $\pm$ & 317 & 35.5 & $\pm$ & 6.5 & 85.5 & $\pm$ & 8.9 & 52.9 & $\pm$ & 5.5 & 0.41 & $\pm$ & 0.15 & 0.13 & $\pm$ & 0.05 & $-6$ &$\times$& $10^{-4}$\\
\hline
t7 & 3840 & $\pm$ & 414.6 & 38.5 & $\pm$ & 2.9 & 99.7 & $\pm$ & 10.7 & 66.8 & $\pm$ &7.2 & 0.6 & $\pm$ & 0.09 & 0.18 & $\pm$ & 0.03 & $-1.8$ &$\times$& $10^{-3}$\\
\hline
\end{tabular}
\end{table}
\end{document}