0

I have three semi large tables, each one occupies a bit more than half a page. What I want is to display one after the other, with no text in between. What is currently happening is that text that appears after the tables in the latex document is being displayed in between the three tables to fill in the blanks, but I want to overcome this behaviour and display all three tables one after the other in consecutive pages with the blanks not filled in. How is this possible? at the moment I have my tables like this one:

\begin{table}[p]
\vspace{0.5cm}
\centering
\begin{tabular}{|p{0.95\linewidth}|}
\hline
\multicolumn{1}{|c|}{Approach 1} \\
\hline
{1: [’Some long text’]}\\
\\
{2: [’Some long text’]}\\
\\
{3: ['Some long text']} \\
\hline
\end{tabular}
\caption{Results.}
\label{tab:approach1}
\end{table}

\begin{table}[p] \vspace{0.5cm} \centering \begin{tabular}{|p{0.95\linewidth}|} \hline \multicolumn{1}{|c|}{Approach 2} \ \hline {1: [’Some long text’]}\ \ {2: [’Some long text’]}\ \ {3: ['Some long text']} \ \hline \end{tabular} \caption{Results.} \label{tab:approach2} \end{table}

\begin{table}[p] \vspace{0.5cm} \centering \begin{tabular}{|p{0.95\linewidth}|} \hline \multicolumn{1}{|c|}{Approach 3} \ \hline {1: [’Some long text’]}\ \ {2: [’Some long text’]}\ \ {3: ['Some long text']} \ \hline \end{tabular} \caption{Results.} \label{tab:approach3} \end{table}

\section{something} Some long text here...

David Carlisle
  • 757,742
diegobc11
  • 1
  • 2
  • 1
    Your tables are too big to get more than one on a page. The text is simplty filling in the otherwise unused space. If you want a table to split over 2 pages, see the longtable package and its many clones. – John Kormylo May 08 '23 at 15:06
  • you are stopping the tables being placed at top or bottom of page or on a page with just tables so latex has no chance. Remove [!h] – David Carlisle May 08 '23 at 18:00
  • without [h!] is just the same, i have a table in a different page, but the blanks of each page is being filled with text that should appear after the tables, not in between. @DavidCarlisle – diegobc11 May 09 '23 at 07:54
  • so is there no way of having my tables in different pages but without the unused space being filled? @JohnKormylo – diegobc11 May 09 '23 at 07:54
  • @diegobc11 without [h] at least latex has a chance. As you have provided no example we can't comment on any specific page break decision, butt if you use \begin{table}[h!] then you are preventing p so specifying the table may not go on a page just of tables and there must be some text, so exactly the opposite of "What I want is to display one after the other, with no text in between" perhaps you want [p] it is hard to tell. – David Carlisle May 09 '23 at 08:14
  • I have added context, so now the example resembles my actual latex code. I have three medium sized tables and I have a section of text after it. I want the tables to be put in the correct order, and not have the section of text appear before or in between the tables so that readers are not confused when presented with the tables later. I have tried using [p] as @DavidCarlisle and that makes it closer to what i want, because now the three tables appear one after the other, but a portion of text from the \section{something} appears before the tables, which i dont want it to happen. – diegobc11 May 09 '23 at 08:57
  • you still have not provided a usable example, but put \clearpage before \section – David Carlisle May 09 '23 at 08:59
  • okey, actually using \clearpage as you said yields the expected result, thanks! @DavidCarlisle – diegobc11 May 09 '23 at 09:09
  • Now if you want huge gaps instead of text, use [H] (float package). – John Kormylo May 09 '23 at 12:39

0 Answers0