6

I have two consecutive tables and since they are wide I want to have them in a landscape page. But it doesn't show both of them in one page. here is the code I'm using:

\begin{landscape}
\begin{table}[htb]
\caption{}\label{sup1}
\begin{tabular}
...
\end{tabular}
\end{table}
\begin{table}[htb]
\caption{}\label{sup2}
\begin{center}
\begin{tabular}
...
\end{tabular}
\end{center}
\end{table}
\end{landscape}
Werner
  • 603,163
anna
  • 271

3 Answers3

5

if both tables really do fit on one page, then just include them in a single float.

if you put a blank line and some vertical space, say \medskip, between the first \end{tabular} and the second \begin{tabular} they should be set one above the other, not side by side.

you'll need to force them to start on a new page. this can be done by

\usepackage{afterpage,lscape}
...
\afterpage{\clearpage % begin landscape tables
   \begin{landscape}
   ... [tables]
   \end{landscape}
} % end landscape tables

within this scope, if you have more than one page of tables, you can use \newpage. in fact, you can even use longtable (provided you \usepackage{longtable}).

3

If your concern is to keep the two tables on your landscape page at all costs, then using a float might be the wrong option. The reason for this is because LaTeX only allows a certain number of floats on a page and floats may only take up a certain portion of the page. The quantities and parameters governing the placement of floats on a page is explained in detail in How to influence the position of float environments like figure and table in LaTeX?

If this is indeed the problem (tables floating to other pages because they don't fit the parameter requirements), I would suggest not making the tables float by using functionality provided by the caption package (or the lite capt-of package) via \captionof. This allows you to have the captioning capability of floats, without having to use a float:

\begin{landscape}
\centering
\captionof{table}{This is a table.}\label{sup1}\par
\begin{tabular}
...
\end{tabular}

\bigskip

\captionof{table}{This is another table.}\label{sup2}\par
\begin{tabular}
...
\end{tabular}
\end{landscape}

If, on the other hand, you just need a little more vertical space on the page to fit the second table, you could use \enlargethispage{\baselineskip} to have one extra line (or use any length to enlarge the page as much as you want).

Werner
  • 603,163
2

One option for doing that consist on writing two "tabular" inside a "table". This is what I mean:

\usepackage{lscape}
...

\begin{landscape}
\begin{table}[htbp]
  \centering
  \caption{Add caption}
    \begin{tabular}{|l|c|}
    ...
    \end{tabular}
    \label{tab:addlabel1}%

  \vspace{1cm} %space between tables

  \caption{Add caption}
    \begin{tabular}{|l|c|}
    ...
    \end{tabular}%
  \label{tab:addlabel2}%
\end{table}%
\end{landscape}
edi
  • 21