Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set many tables in the same page with LaTeX

Tags:

latex

i'm new to latex and i just want to put 3 tables in the same page, one above the other. The size i think it's fine, the only problem is that tables are divided by some text from the next chapter.. Any tips?

my code is something like this:

....

\newpage

\begin{table}
\centering
\caption{Table 1}
\begin{tabular}{|l|l|l|l|l|l|}
\hline
% table 1
\end{tabular}
\end{table}

\begin{table}
\centering
\caption{Table 2}
\begin{tabular}{|l|l|l|l|l|l|}
\hline
% table 2
\end{tabular}
\end{table}

\begin{table}
\centering
\caption{Table 3}
\begin{tabular}{|l|l|l|l|l|l|}
\hline
% table 3
\end{tabular}
\end{table}

...
like image 553
roy Avatar asked Oct 20 '25 01:10

roy


1 Answers

The number of floats that can be on a page is governed by a number of parameters (see How to influence the position of float environments like figure and table in LaTeX?):

There are four counters that control how many floats can go into areas:

  • totalnumber (default 3) is the maximum number of floats on a text (!) page
  • topnumber (default 2) is the maximum number of floats in the top area
  • bottomnumber (default 1) is the maximum number of floats in the bottom area
  • dbltopnumber (default 2) is the maximum number of full sized floats in two-column mode going above the text columns.

The size of the areas are controlled through parameters (changed with \renewcommand) that define the maximum (or minimum) size of the area, expressed as a fraction of the page height:

  • \topfraction (default 0.7) maximum size of the top area
  • \bottomfraction (default 0.3) maximum size of the bottom area
  • \dbltopfraction (default 0.7) maximum size of the top area for double-column floats
  • \textfraction (default 0.2) minimum size of the text area, i.e., the area that must not be occupied by floats

Depending on the actual document, you may need to adjust the counters (or fractions) to allow more content to fit on the page. Alternatively, avoid the figures from floating (since you want to have a specific placement) by adding the float package and using the [H] "float"/placement specifier.

like image 84
Werner Avatar answered Oct 23 '25 09:10

Werner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!