如何使列宽相同,同时保持下表文本居中?
\begin{table}[H]
\centering
\caption{BET specific surface areas of each of the silicas used in this work, as calculated by \cite{}.}
\label{specificarea}
\begin{tabular}{@{}cc@{}}
\toprule
Silicas & Specific surface area, S [\si{\m \tothe{2} \per \gram}] \\ \midrule
CARiACT Q3 & 438.0 \\
CARiACT Q6 & 359.0 \\
CARiACT Q10 & 303.0 \\
CARiACT Q15 & 196.0 \\
CARiACT Q30 & 112.0 \\
CARiACT Q50 & 71.0 \\ \bottomrule
\end{tabular}%
\end{table}
我曾尝试使用
\begin{tabular}{@{}p{5cm}p{5cm}@{}}
但文本不再居中。
答案1
假设你有一个相当新的array
包,那么你可以使用来设置宽度w
,替换 c
为wc{2cm}
答案2
保持小数对齐的另一种方法:
\documentclass{article}
\usepackage{booktabs,siunitx}
\begin{document}
\begin{tabular}{S[table-format=8.8]S[table-format=9.7]}
\toprule
{Silicas} & {\parbox{9em}{\centering Specific surface area\\ S [\si{\m \tothe{2} \per \gram}]}} \\ \midrule
{CARiACT Q3} & 438.0 \\
{CARiACT Q6} & 359.0 \\
{CARiACT Q10} & 303.0 \\
{CARiACT Q15} & 196.0 \\
{CARiACT Q30} & 112.0 \\
{CARiACT Q50} & 71.0 \\ \bottomrule
\end{tabular}%
\end{document}