1

I want to control the width of my table. Could I get some ideas to solve this problem?

enter image description here

\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}
5
  • 1
    please upload the preamble of your code
    – js bibra
    Aug 19, 2020 at 13:37
  • 1
    Have you seen this ? tex.stackexchange.com/questions/332902/…
    – koleygr
    Aug 19, 2020 at 13:38
  • Do please tell which document class you employ and whether the document is typeset in two-column format. Which fonts are in use, and what's the font size employed in the table?
    – Mico
    Aug 19, 2020 at 13:42
  • Yes. It's the two-column format. I want to fix the width for a one-column format. font size is footnotesize. Aug 19, 2020 at 13:45
  • \documentclass[10pt,journal,compsoc]{IEEEtran} Aug 19, 2020 at 14:07

1 Answer 1

1

To make the table fit inside the column, I suggest you provide a line break between "Accuracy" and "[%]" in the headers of columns 2 and 4. Incidentally, I think it's not necessary to have a rule go down the middle of the table.

enter image description here

\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}
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.