1

I need to place a full-width table in a two-column document.

To let this full-width table cross margins in a two-column document, I use the following means. The * (asterisk) in \begin{table*} could be used to achieve this.

\begin{table*}
    \centering
    \begin{tabular}{|c|c|c|c|c|}
        \hline
        Setup & \multicolumn{2}{|c|}{Experiment 1}  & \multicolumn{2}{|c|}{Experiment 2} \\
        \hline
        \hline
        Logistic Regression & 0.0678 & 0.0678 & 0.0678 & 0.0678 \\
        \hline
    \end{tabular}
    \caption{Caption}
    \label{tab:my_label}
\end{table*}

However, this causes the table to move down to the end of the document (last page). I tried several methods to fix the table position where it is mentioned.

Tried solution 1: The table disappeared after this solution was implemented.
Tried solution 2: Distorted the entire table without fixing its position.
Tried solution 3: This did work a bit and pushed the table to be the closest to where it was mentioned. However, the table did not stay on the same page as it was mentioned but rather went to the next page.

How could the table be placed on the same page as it is mentioned in?

I will be grateful for your help or any hints.

2
  • The main question is: Is there enough space at the bottom of the page?
    – Bernard
    Commented Aug 27, 2020 at 11:51
  • In fact, there is not. The place where the table begins does not have enough space.
    – PinkBanter
    Commented Aug 27, 2020 at 12:03

1 Answer 1

4

The package stfloats can help:

\documentclass{article}
\usepackage{stfloats} % for positioning of figure* or table* on the same page
\usepackage{lipsum}

\begin{document}
\lipsum[1]
\begin{table*}[b]
    \centering
    \begin{tabular}{|c|c|c|c|c|}
        \hline
        Setup & \multicolumn{2}{|c|}{Experiment 1}  & \multicolumn{2}{|c|}{Experiment 2} \\
        \hline
        \hline
        Logistic Regression & 0.0678 & 0.0678 & 0.0678 & 0.0678 \\
        \hline
    \end{tabular}
    \caption{Caption}
    \label{tab:my_label}
\end{table*}

\lipsum[2-5]
\end{document}

enter image description here

You must log in to answer this question.

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