简体   繁体   中英

How to set many tables in the same page with 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}

...

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, ie, 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 figure s from floating (since you want to have a specific placement) by adding the float package and using the [H] "float"/placement specifier.

....

\newpage

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


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


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

...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM