2

I have a table that is too broad for a two-column page. Therefore, I have broken it into two parts:

\documentclass{eusflat2021}

\begin{table}[ht]
\begin{center}
\vspace{1ex}
\begin{tabular}{|c|c|c|c|c|c|} \hline
    {\bf GTW} & {\bf 10} & {\bf 15} & {\bf 20} & {\bf 25} & {\bf 30}  \\\hline
    Entropy &  & &&& \\
    IDF & 0.4301& 0.4552&0.4627&\textbf{0.4648}&0.4610 \\
    Normal & \textbf{0.4856} & 0.4802 &0.4769&0.4266&0.4181\\
    ProbIDF &0.3333&0.3628&0.3717&\textbf{0.3831}&0.3697\\
    LDA &\textbf{0.4668}&0.4587&0.4582&0.4482&0.4378 \\
    Norm-alt & \textbf{0.5598}&0.5066&0.5077&0.4685&0.4876\\
    \hline
\end{tabular}

\begin{tabular}{|c|c|c|c|c|} \hline
    {\bf GTW} & {\bf 35} & {\bf 40} & {\bf 45} & {\bf 50}  \\\hline
    Entropy &  & && \\
    IDF & 0.4523&0.4270&0.4349&0.4337 \\
    Normal &0.4176&0.3877&0.3724&0.3555\\
    ProbIDF &0.3773&0.3712&0.3608&0.3705\\
    LDA &0.4634&0.4518&0.4489&0.4481 \\
    Normal-alt &0.4784&0.4493&0.4515&0.4420\\
    \hline
\end{tabular}

enter image description here

However, by doing so, the top part is still too broad and the tables don’t align. Is there a way to make the top narrower and align the lines?

2
  • You should provide a code that we should compile (where can we find the class eusflat2021?). Commented Mar 31, 2021 at 15:24
  • You can leave the twocolumn mode using \begin{table*} if this is an option.
    – NBur
    Commented Mar 31, 2021 at 15:29

3 Answers 3

1

A solution is to transpose the tabular and reduce the space between columns. I also use booktabs to have a prettier table.

\documentclass[twocolumn]{article}
\usepackage{booktabs}
\usepackage{array}
\usepackage{multirow}
\usepackage{lipsum}

\begin{document}
    \begin{table}[ht]
        \centering
        \vspace{1ex}
        \begin{tabular}{|c|c|c|c|c|c|} \hline
            {\bf GTW} & {\bf 10} & {\bf 15} & {\bf 20} & {\bf 25} & {\bf 30}  \\\hline
            Entropy &  & &&& \\
            IDF & 0.4301& 0.4552&0.4627&\textbf{0.4648}&0.4610 \\
            Normal & \textbf{0.4856} & 0.4802 &0.4769&0.4266&0.4181\\
            ProbIDF &0.3333&0.3628&0.3717&\textbf{0.3831}&0.3697\\
            LDA &\textbf{0.4668}&0.4587&0.4582&0.4482&0.4378 \\
            Norm-alt & \textbf{0.5598}&0.5066&0.5077&0.4685&0.4876\\
            \hline
        \end{tabular}
        
        \begin{tabular}{|c|c|c|c|c|} \hline
            {\bf GTW} & {\bf 35} & {\bf 40} & {\bf 45} & {\bf 50}  \\\hline
            Entropy &  & && \\
            IDF & 0.4523&0.4270&0.4349&0.4337 \\
            Normal &0.4176&0.3877&0.3724&0.3555\\
            ProbIDF &0.3773&0.3712&0.3608&0.3705\\
            LDA &0.4634&0.4518&0.4489&0.4481 \\
            Normal-alt &0.4784&0.4493&0.4515&0.4420\\
            \hline
        \end{tabular}
    \end{table}
    
    \begin{table}[ht]
        \centering
        \begin{tabular}{@{}>{\bfseries}c*{5}{@{\hspace{3pt}}c}@{}}
            \toprule
            \multirow{2}{*}{GTW} &                          \multicolumn{5}{c}{\bfseries Entropy}                           \\
                                 &       IDF       &     Normal      &     ProbIDF     &       LDA       &    Norm-alt      \\ \midrule
            10                   &     0.4301      & \textbf{0.4856} &     0.3333      & \textbf{0.4668} & \textbf{0.5598}  \\
            15                   &     0.4552      &     0.4802      &     0.3628      &     0.4587      &     0.5066       \\
            20                   &     0.4627      &     0.4769      &     0.3717      &     0.4582      &     0.5077       \\
            25                   & \textbf{0.4648} &     0.4266      & \textbf{0.3831} &     0.4482      &     0.4685       \\
            30                   &     0.4610      &     0.4181      &     0.3697      &     0.4378      &     0.4876       \\
            35                   &     0.4523      &     0.4176      &     0.3773      &     0.4634      &     0.4784       \\
            40                   &     0.4270      &     0.3877      &     0.3712      &     0.4518      &     0.4493       \\
            45                   &     0.4349      &     0.3724      &     0.3608      &     0.4489      &     0.4515       \\
            50                   &     0.4337      &     0.3555      &     0.3705      &     0.4481      &     0.4420       \\ \bottomrule
        \end{tabular}
    \end{table}
    
    \lipsum[1-10]
\end{document}

enter image description here

4

Use three table instead of only two.

I inserted them in the template they provide with Instructions for Authors.

http://www.ifsa-eusflat2021.eu/materials/ifsa-eusflat-2021-template-latexNEW.zip

x

\section{Tables}

All tables must be centered and clear (See Table \ref{table}).
\begin{table}[ht]
\begin{center}
\vspace{1ex}
\begin{tabular}{|c|c|c|c|} \hline
{\bf GTW}   & {\bf 10}          & {\bf 15}  & {\bf 20}  \\ \hline
Entropy     &                   &           &           \\
IDF         & 0.4301            & 0.4552    &0.4627     \\
Normal      & \textbf{0.4856}   & 0.4802    &0.4769     \\
ProbIDF     &0.3333             &0.3628     &0.3717     \\
LDA         &\textbf{0.4668}    &0.4587     &0.4582     \\
Normal-alt  & \textbf{0.5598}   &0.5066     &0.5077     \\
\hline
\end{tabular}

\vspace{1ex}
\begin{tabular}{|c|c|c|c|} \hline
{\bf GTW}    & {\bf 25}         & {\bf 30}  & {\bf 35} \\ \hline
Entropy     &                   &           &           \\
IDF         &\textbf{0.4648}    &0.4610     &0.4523     \\
Normal      &0.4266             &0.4181     &0.4176     \\
ProbIDF     &\textbf{0.3831}    &0.3697     &0.3773     \\
LDA         &0.4482             &0.4378     &0.4634     \\
Normal-alt  &0.4685             &0.4876     &0.4784     \\
\hline
\end{tabular}

\vspace{1ex}
\begin{tabular}{|c|c|c|c|} \hline
{\bf GTW}   & {\bf 40}  & {\bf 45}  & {\bf 50}  \\\hline
Entropy     &           &           &           \\
IDF         &0.4270     &0.4349     &0.4337     \\
Normal      &0.3877     &0.3724     &0.3555     \\
ProbIDF     &0.3712     &0.3608     &0.3705     \\
LDA         &0.4518     &0.4489     &0.4481     \\
Normal-alt  &0.4493     &0.4515     &0.4420     \\
\hline
\end{tabular}

\caption{\label{table}The number and caption of the table always appear below the table.}
\end{center}
\end{table}

\section{Figures}

All figures must be centered like Figure~\ref{figure1}.

You will be very lucky if all the tables end up in the same column or even on the same page!

For that possible contingency, this second code is better.

All tables must be centered and clear (See Table \ref{table}).
    
\begin{table}[ht]
\begin{center}
    \begin{tabular}{|c|c|c|c|} \hline
        {\bfseries GTW}     & {\bfseries 10}            & {\bfseries 15}    & {\bfseries 20}  \\ \hline
        Entropy     &                   &           &           \\
        IDF         & 0.4301            & 0.4552    &0.4627     \\
        Normal      & \textbf{0.4856}   & 0.4802    &0.4769     \\
        ProbIDF     &0.3333             &0.3628     &0.3717     \\
        LDA         &\textbf{0.4668}    &0.4587     &0.4582     \\
        Normal-alt  & \textbf{0.5598}   &0.5066     &0.5077     \\
        \hline
    \end{tabular}
\end{center}
\end{table}

\begin{table}[ht]
\begin{center}
    \begin{tabular}{|c|c|c|c|} \hline
        {\bfseries GTW}     & {\bfseries 25}        & {\bfseries 30}    & {\bfseries 35} \\ \hline
        Entropy     &                   &           &           \\
        IDF         &\textbf{0.4648}    &0.4610     &0.4523     \\
        Normal      &0.4266             &0.4181     &0.4176     \\
        ProbIDF     &\textbf{0.3831}    &0.3697     &0.3773     \\
        LDA         &0.4482             &0.4378     &0.4634     \\
        Normal-alt  &0.4685             &0.4876     &0.4784     \\
        \hline
    \end{tabular}
\end{center}
\end{table}

\begin{table}[ht]
\begin{center}
    \begin{tabular}{|c|c|c|c|} \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     \\
        LDA         &0.4518     &0.4489     &0.4481     \\
        Normal-alt  &0.4493     &0.4515     &0.4420     \\
        \hline
    \end{tabular}
\caption{\label{table}The number and caption of the table always appear below the table.}
\end{center}
\end{table}

www

2

There's no way to get those tables to fit at the normal size.

You can either reduce the size, I found that 7.5pt fits, or use three tables.

\documentclass{eusflat2021}

\usepackage{lipsum} % for mock text

\title{\bfseries Ifsa-Eusflat 2021 Bratislava: Instructions for Authors}
\author{Author$^a$ \and $^*$Corresponding Author$^b$ \and Author$^{b,c}$\\
$^a$Department, Faculty, University, Address, \email{[email protected]} \\
$^b$Department, Faculty, University, Address, \email{[email protected]} \\
$^c$Department, Faculty, University, Address, \email{[email protected]}}

\begin{document}

\maketitle

\begin{abstract}
The abstract must be indented 0.7 cm both on left as well as right-hand margins.

Please, do not place or cite tables and figures in the abstract.

{\bfseries Keywords:} Start with capital, Use comma, At least three keywords.
\end{abstract}

\lipsum[1][1-4]

\begin{table}[ht]
\centering

\fontsize{7.5}{8.6}\selectfont

\sbox{0}{%
  \begin{tabular}{|c|c|c|c|c|c|} \hline
    {\bfseries GTW} & {\bfseries 10} & {\bfseries 15} & {\bfseries 20} & {\bfseries 25} & {\bfseries 30}  \\\hline
    Entropy IDF & 0.4301& 0.4552&0.4627&\textbf{0.4648}&0.4610 \\
    Normal & \textbf{0.4856} & 0.4802 &0.4769&0.4266&0.4181\\
    ProbIDF &0.3333&0.3628&0.3717&\textbf{0.3831}&0.3697\\
    LDA &\textbf{0.4668}&0.4587&0.4582&0.4482&0.4378 \\
    Norm-alt & \textbf{0.5598}&0.5066&0.5077&0.4685&0.4876\\
    \hline
  \end{tabular}%
}

\usebox{0}

\makebox[\wd0][l]{%
  \begin{tabular}{|c|c|c|c|c|c} \hline
    {\bfseries GTW} & {\bfseries 35} & {\bfseries 40} & {\bfseries 45} & {\bfseries 50} \\ \hline
    Entropy IDF & 0.4523&0.4270&0.4349&0.4337 \\
    Normal &0.4176&0.3877&0.3724&0.3555\\
    ProbIDF &0.3773&0.3712&0.3608&0.3705\\
    LDA &0.4634&0.4518&0.4489&0.4481 \\
    Normal-alt &0.4784&0.4493&0.4515&0.4420\\
    \hline
  \end{tabular}%
}

\end{table}

\lipsum[1]

\begin{table}[ht]
\centering
\newcommand{\?}{\textbf}

\begin{tabular}{|c|c|c|c|}
  \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 \\
  LDA         & \?{0.4668} & 0.4587 & 0.4582 \\
  Norm-alt    & \?{0.5598} & 0.5066 & 0.5077 \\
  \hline
\end{tabular}

\begin{tabular}{|c|c|c|c|}
  \hline
  {\bfseries GTW} & {\bfseries 25} & {\bfseries 30} & {\bfseries 35} \\
  \hline
  Entropy IDF & \?{0.4648} & 0.4610 & 0.4523 \\
  Normal      &    0.4266  & 0.4181 & 0.4176 \\
  ProbIDF     & \?{0.3831} & 0.3697 & 0.3773 \\
  LDA         &    0.4482  & 0.4378 & 0.4634 \\
  Norm-alt    &    0.4685  & 0.4876 & 0.4784 \\
  \hline
\end{tabular}

\begin{tabular}{|c|c|c|c|c|c}
  \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 \\
  LDA         & 0.4518 & 0.4489 & 0.4481 \\
  Normal-alt  & 0.4493 & 0.4515 & 0.4420 \\
  \hline
\end{tabular}

\end{table}

\lipsum

\end{document}

enter image description here

Please note that, notwithstanding what the people at EUSFLAT think, the command \bf has been deprecated for 25 years.

I used \? (a command local to the table environment to ease input but, above all, its readability.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.