我想控制表格的宽度。有什么办法可以解决这个问题吗?
\begin{table}[b]
\centering
\caption{The results of Human motion recognition [$\%$].}
\arrayrulecolor{black}
\begin{tabular}{lc!{\color{black}\vrule}lc}
\toprule
\multicolumn{2}{c!{\color{black}\vrule}}{Weizmann dataset} & \multicolumn{2}{c}{KTH dataset} \\
\multicolumn{1}{c}{Methods} & Accuracy [\%]~ & \multicolumn{1}{c}{Methods} & Accuracy [\%] \\
\arrayrulecolor{black}\hline
Fathi et al. \cite{Fathi2008ActionRB} & 90.00 & Schuldt et al. \cite{Schldt2004RecognizingHA} & 71.70 \\
Ali et al. \cite{Ali2010HumanAR} & 94.75 & Dollar et al. \cite{Dollr2005BehaviorRV} & 81.20 \\
Bregonzio et al.~ \cite{Bregonzio2012FusingAA} & 96.66 & Niebles et al. \cite{Niebles2007UnsupervisedLO} & 83.30 \\
Seo. et al. \cite{Seo2011ActionRF} & 97.50 & Jhuang et al. \cite{Jhuang2007ABI} & 91.70 \\
Wang et al. \cite{Wang2009EvaluationOL} & 96.70 & Ji et al. \cite{JiShuiwang20133DCN} & 90.20 \\
Arac et al. \cite{Acar2012HumanAR} & 97.77 & Schindler et al. \cite{Schindler2008ActionSH} & 92.70 \\
Fadwa et al. \cite{AlAzzo2017HumanAR} & 97.02 & Arac et al. \cite{Acar2012HumanAR} & 95.36 \\
Our best method & 99.47 & Our best method & 99.85 \\
\bottomrule
\end{tabular}
\end{table}
答案1
为了使表格适合列内,我建议您在第 2 列和第 4 列标题中的“准确度”和“[%]”之间提供一个换行符。顺便说一句,我认为没有必要在表格中间设置规则。
\documentclass[10pt,journal,compsoc]{IEEEtran}
\usepackage{booktabs,lipsum}
\begin{document}
\begin{table}[b]
\setlength\tabcolsep{0pt} % let LaTeX figure out intercol. space
\caption{Results of human motion recognition [\%].}
\begin{tabular*}{\columnwidth}{@{\extracolsep{\fill}} lc lc }
\toprule
\multicolumn{2}{c}{Weizmann dataset} &
\multicolumn{2}{c}{KTH dataset} \\
\cmidrule{1-2} \cmidrule{3-4}
Methods & Accuracy & Methods & Accuracy \\
& [\%] & & [\%] \\
\midrule
Fathi et al.\ \cite{Fathi2008ActionRB} & 90.00 & Schuldt et al.\ \cite{Schldt2004RecognizingHA} & 71.70 \\
Ali et al.\ \cite{Ali2010HumanAR} & 94.75 & Dollar et al.\ \cite{Dollr2005BehaviorRV} & 81.20 \\
Bregonzio et al.\ \cite{Bregonzio2012FusingAA} & 96.66 & Niebles et al.\ \cite{Niebles2007UnsupervisedLO} & 83.30 \\
Seo et al.\ \cite{Seo2011ActionRF} & 97.50 & Jhuang et al.\ \cite{Jhuang2007ABI} & 91.70 \\
Wang et al.\ \cite{Wang2009EvaluationOL} & 96.70 & Ji et al.\ \cite{JiShuiwang20133DCN} & 90.20 \\
Arac et al.\ \cite{Acar2012HumanAR} & 97.77 & Schindler et al.\ \cite{Schindler2008ActionSH} & 92.70 \\
Fadwa et al.\ \cite{AlAzzo2017HumanAR} & 97.02 & Arac et al.\ \cite{Acar2012HumanAR} & 95.36 \\
\addlinespace
Our best method & 99.47 & Our best method & 99.85 \\
\bottomrule
\end{tabular*}
\end{table}
\lipsum[1-10] % filler text
\end{document}