11

I want to create a table, in a two column style page (IEEEtran) but I want the table to fit only one of the columns. The table which I make is exceeding the single column width of the page. Please help. Here is the table

\documentclass[11pt,twocolumn,conference]{IEEEtran}
.
.
.
\begin{table}[h]
\caption{hello2 testing}
\label{1234}
\begin{tabular}{cccccc}
    & LfdR        & KLSRf       & MLDFSP       & PNDND       & LDFSSVM     \\
Aa  & 97.8+-2.3 & 97.4+-3.0 & 97.4+-3.0 & 97.0+-3.6 & 99.1+-1.8 \\
Al  & 69.8+-9.5 & 93.6+-3.6 & 86.9+-8.4 & 91.5+-4.5 & 94.9+-5.4 \\
Av  & 97.0+-2.9 & 99.2+-1.8 & 99.6+-1.4 & 98.3+-2.9 & 99.6+-1.4 \\
Aw  & 97.8+-3.1 & 95.3+-3.1 & 96.2+-2.5 & 92.4+-3.3 & 97.5+-3.0 \\
Ay  & 77.5+-7.2 & 90.2+-4.1 & 90.2+-5.7 & 88.1+-4.8 & 91.6+-4.9 \\
avg & 88.0      & 95.1      & 94.1      & 93.5      & 96.5     
\end{tabular}
\end{table}
5
  • This answer might help you.
    – Markus
    May 27, 2014 at 6:34
  • So if the table exceeds the width of a column, you need to adjust the contents. You don't specify any limitations/restrictions in terms of the layout or possibilities. What are they?
    – Werner
    May 27, 2014 at 6:35
  • @Markus I have already tried those techniques, but the problem with them is that the table size gets reduced but the contents remain the same , that is , contents begin to move out of the shrunken table May 27, 2014 at 9:20
  • @Markus How do I adjust the size of the contents? The paper has to follow IEEEtran format and I have to adjust this table to fit a single column. May 27, 2014 at 9:23
  • You need to place it in the starred environment. See the IEEETran manual.
    – percusse
    May 27, 2014 at 10:11

1 Answer 1

13

May be this is what you are after:

\documentclass[11pt,twocolumn,conference]{IEEEtran}
\usepackage{amsmath,array,graphicx}
\usepackage{kantlipsum}
\begin{document}
\kant[1-2]
\begin{table}[htb]
\caption{hello2 testing}
\label{1234}
\resizebox{\columnwidth}{!}{%
\begin{tabular}{c*{5}{>{$}c<{$}}}
    & \text{LfdR}        & \text{KLSRf}       & \text{MLDFSP}       & \text{PNDND}       & \text{LDFSSVM}     \\
Aa  & 97.8\pm 2.3 & 97.4\pm 3.0 & 97.4\pm 3.0 & 97.0\pm 3.6 & 99.1\pm 1.8 \\
Al  & 69.8\pm 9.5 & 93.6\pm 3.6 & 86.9\pm 8.4 & 91.5\pm 4.5 & 94.9\pm 5.4 \\
Av  & 97.0\pm 2.9 & 99.2\pm 1.8 & 99.6\pm 1.4 & 98.3\pm 2.9 & 99.6\pm 1.4 \\
Aw  & 97.8\pm 3.1 & 95.3\pm 3.1 & 96.2\pm 2.5 & 92.4\pm 3.3 & 97.5\pm 3.0 \\
Ay  & 77.5\pm 7.2 & 90.2\pm 4.1 & 90.2\pm 5.7 & 88.1\pm 4.8 & 91.6\pm 4.9 \\
avg & 88.0      & 95.1      & 94.1      & 93.5      & 96.5
\end{tabular}
}
\end{table}
\kant[3-5]
\end{document}

enter image description here

I have used \resizebox from graphicx package ti re-size the table to fit inside the column. Also, I have replaced all +- in to \pm.

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.