我知道有人已经问过几乎相同的问题,但是在使用threepartatble
注释命令后我无法解决表格居中的问题。
这里是:
\begin{table}[h!tb]
\centering
\begin{threeparttable}[b]
\caption{Table1}
\label{one}
\begin{tabular}{l r r r}
\toprule
\hline
\multirow{2}{*}{country} & region & county & village \\
North Africa & 13.0 & 11.0 & 7.0 \\
Central and South Africa & 2.0 & 5.0 & 7.3 \\
Middle East & 5.3 & 3.0 & 3.0 \\
Asia & 19.0 & 24.0 & 16.7 \\
Southern Europe & 10.6 & 4.0 & 3.0 \\
ACP countries & 43.6 & 43.0 & 46.0 \\
Unallocated & 6.5 & 10.0 & 17.0 \\
\bottomrule
\end{tabular}
\begin{tablenotes}\footnotesize
\item Source: book
\end{tablenotes}
\end{threeparttable}
\end{table}
答案1
如果这两个表的对齐方式不同,请比较它们。如果是这种情况,请检查您的软件包是否都是最新的。如果是,我们必须比较版本。为此,请添加\listfiles
到序言中并从main.log
文件中获取软件包版本。
\documentclass{scrartcl}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{blindtext}
\listfiles % prints the versions of all used packages to the .log file
\begin{document}
\blindtext
\begin{table}[h!tb]
\centering
\begin{threeparttable}[b]
\caption{Table1}
\label{tab:one}
\begin{tabular}{l r r r}
\toprule
country & region & county & village \\
\midrule
North Africa\tnote{1} & 13.0 & 11.0 & 7.0 \\
Central and South Africa & 2.0 & 5.0 & 7.3 \\
Middle East & 5.3 & 3.0 & 3.0 \\
\bottomrule
\end{tabular}
\begin{tablenotes}\footnotesize
\item [1] Source: book
\end{tablenotes}
\end{threeparttable}
\end{table}
%
\begin{table}[h!tb]
\centering
\caption{Table2}
\label{tab:two}
\begin{tabular}{l r r r}
\toprule
country & region & county & village \\
\midrule
North Africa & 13.0 & 11.0 & 7.0 \\
Central and South Africa & 2.0 & 5.0 & 7.3 \\
Middle East & 5.3 & 3.0 & 3.0 \\
\bottomrule
\end{tabular}
\end{table}
\blindtext
\end{document}