0

I have a table with too many columns so that it overlaps with the right column of the page. Now, I would like to break the table into to pieces, so that columns 35-50 are placed below columns 10-30, while remaining to be the same table.

enter image description here

Currently, this is my code:

\documentclass{eusflat2021}

\begin{table}[ht]
\begin{center}
\vspace{1ex}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \hline
    {\bf GTW} & {\bf 10} & {\bf 15} & {\bf 20} & {\bf 25} & {\bf 30} & {\bf 35} & {\bf 40} & {\bf 45} & {\bf 50}  \\\hline
    Entropy &  & &&&&&&& \\
    IDF & 0.4301& 0.4552&0.4627&0.4648&4610&0.4523&0.4270&0.4349&0.4337 \\
    Normal & 0.4856 & 0.4802 &0.4769&0.4266&0.4181&0.4176&0.3877&0.3724&0.3555\\
    ProbIDF &0.3333&0.3628&0.3717&0.3831&0.3697&0.3773&0.3712&0.3608&0.3705\\
    Normal-alt & 0.5598&0.5066&0.5077&0.4685&0.4876&0.4784&0.44934515&0.4420\\
    \hline
\end{tabular}
\caption{\label{table}The number and caption of the table always appear below the table.}
\end{center}
\end{table}

I have found this page, but it is unclear to me how I could implement that in my code.

Who could give me an example of how to do this?

7
  • 1
    Did you think of leaving the two-column mode just for the table with the cuted package?
    – Bernard
    Mar 31, 2021 at 14:22
  • What is a cuted package?
    – Emil
    Mar 31, 2021 at 14:26
  • It's the name of the package, from the sttools bundle. It defines a strip environment, which leaves the two-column mode.
    – Bernard
    Mar 31, 2021 at 14:29
  • 3
    This can be simply done manually: (i) make a copy of table (ii) from the first table delete last four columns, (iii) from the second table delete except the four columns after the first one.
    – Zarko
    Mar 31, 2021 at 14:29
  • 1
    unrelated but note that \bf has not been defined by default in LaTeX since 1993. You may be better to use \bfseries as \bf is defined for compatibility in some but not all classes. Mar 31, 2021 at 15:15

1 Answer 1

1

You could either allow the table to occupy both columns in order to avoid the need to split the table. Alternative, I also included a version in which I split the table into three parts in order to allow it to fit into one of the columns.

enter image description here

Side note: The code contains some lines I personally would avoid, such as the center environment and the \vspace. I decided to keep them since this particular template also contained them. I however could not resist to change \bf to \bfseries.

\documentclass{eusflat2021}
\usepackage{lipsum} % For dummy text. Do not use in real document.
\usepackage{array}
\begin{document}
\begin{table*}
\begin{center}
\vspace{1ex}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \hline
    {\bfseries GTW} & {\bfseries 10} & {\bfseries 15} & {\bfseries 20} & {\bfseries 25} & {\bfseries 30} & {\bfseries 35} & {\bfseries 40} & {\bfseries 45} & {\bfseries 50}  \\\hline
    Entropy &  & &&&&&&& \\
    IDF & 0.4301& 0.4552&0.4627&0.4648&4610&0.4523&0.4270&0.4349&0.4337 \\
    Normal & 0.4856 & 0.4802 &0.4769&0.4266&0.4181&0.4176&0.3877&0.3724&0.3555\\
    ProbIDF &0.3333&0.3628&0.3717&0.3831&0.3697&0.3773&0.3712&0.3608&0.3705\\
    Normal-alt & 0.5598&0.5066&0.5077&0.4685&0.4876&0.4784&0.44934515&0.4420 &\\
    \hline
\end{tabular}
\caption{\label{table}The number and caption of the table always appear below the table.}
\end{center}
\end{table*}
\lipsum

\begin{table}[ht]
\begin{center}
\vspace{1ex}
\setlength{\tabcolsep}{5pt}
\begin{tabular}{|l|*{3}{wc{4.5em}|}} \hline
    {\bfseries GTW} & {\bfseries 10} & {\bfseries 15} & {\bfseries 20} \\\hline
    Entropy    &        &        &         \\
    IDF        & 0.4301 & 0.4552 & 0.4627  \\
    Normal     & 0.4856 & 0.4802 & 0.4769  \\
    ProbIDF    & 0.3333 & 0.3628 & 0.3717  \\
    Normal-alt & 0.5598 & 0.5066 & 0.5077  \\
    \hline
    {\bfseries GTW}  & {\bfseries 25} & {\bfseries 30} & {\bfseries 35}  \\\hline
    Entropy    &        &        &         \\
    IDF        & 0.4648 & 4610   & 0.4523  \\
    Normal     & 0.4266 & 0.4181 & 0.4176  \\
    ProbIDF    & 0.3831 & 0.3697 & 0.3773  \\
    Normal-alt & 0.4685 & 0.4876 & 0.4784  \\
    \hline
    {\bfseries GTW}  & {\bfseries 40} & {\bfseries 45} & {\bfseries 50}  \\\hline
    Entropy    &            &        &        \\
    IDF        & 0.4270     & 0.4349 & 0.4337 \\
    Normal     & 0.3877     & 0.3724 & 0.3555 \\
    ProbIDF    & 0.3712     & 0.3608 & 0.3705 \\
    Normal-alt & 0.44934515 & 0.4420 &        \\
    \hline    
\end{tabular}
\caption{\label{table}The number and caption of the table always appear below the table.}
\end{center}
\end{table}
\lipsum
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .