1

In the following code, I have 2 small tables and one long table. The long table does not fit in the first page and it breaks into the second page which is not favorable. I want to place it in one page, e.g. second page. How can I do that?

\documentclass[12pt]{article}

\usepackage{amssymb}
\usepackage{mathptmx} 
\usepackage{amsmath}

\usepackage{longtable}
\usepackage{booktabs}
\usepackage{array}
\usepackage{arydshln}
\setlength\dashlinedash{0.2pt}
\setlength\dashlinegap{1.5pt}
\setlength\arrayrulewidth{0.3pt}

\begin{document}

\begin{table}[] \centering
\begin{small}
\begin{tabular}{@{}lc@{}}\toprule
\textbf{Parameter}      & \textbf{Value}\\ \midrule
$P_1$                   & \textbf{15.61}\\ \hdashline
$P_2$                   & \textbf{11.36}\\ \hdashline
$P_3$                   & \textbf{0.432}\\ \hdashline
$P_4$                   & \textbf{0.432}\\ \hdashline
$P_5$                   & \textbf{1e4} \\
\bottomrule
\end{tabular}
\end{small}
\caption{Numerical values 1}
\label{t1}
\end{table}

\begin{table}[] \centering
\begin{small}
\begin{tabular}{@{}lc@{}}\toprule
\textbf{Parameter}      & \textbf{Value}\\ \midrule
$P_1$                   & \textbf{15.61}\\ \hdashline
$P_2$                   & \textbf{11.36}\\ \hdashline
$P_3$                   & \textbf{0.432}\\ \hdashline
$P_4$                   & \textbf{0.432}\\ \hdashline
$P_5$                   & \textbf{1e4} \\
\bottomrule
\end{tabular}
\end{small}
\caption{Numerical values 1}
\label{t2}
\end{table}

\begin{longtable}{@{}l c c c c}
\toprule
\centering
\textbf{Initial gains}  
&\textbf{max($P_1$)}       
&\textbf{max($P_2$)}
&\textbf{max($P_3$)}
&\textbf{max($P_4$)}

\\ \midrule

\begin{tabular}{l}$L_{00}=100$\\$L_{10}=100$\end{tabular} &  \textbf{0.6221} 
&\textbf{121.2892} &\textbf{149.8136} &\textbf{27.9641}\\

\begin{tabular}{l}$L_{00}=100$\\$L_{10}=100$\end{tabular} &  \textbf{0.6221} 
&\textbf{120.5161} &\textbf{149.4271} &\textbf{34.7235} \\

\begin{tabular}{l}$L_{00}=100$\\$L_{10}=100$\end{tabular}  &  
\textbf{0.6213} &\textbf{112.7963} &\textbf{148.2077} &\textbf{28.1165} \\

\begin{tabular}{l}$L_{00}=100$\\$L_{10}=100$\end{tabular}  &  
\textbf{0.6213} &\textbf{112.7133} &\textbf{148.0053} &\textbf{34.9203} \\ 

\begin{tabular}{l}$L_{00}=100$\\$L_{10}=100$\end{tabular}  & \textbf{0.6207} 
&\textbf{107.3273}
&\textbf{281.3320} &\textbf{56.0344} \\

\begin{tabular}{l}$L_{00}=100$\\$L_{10}=100$\end{tabular}  & \textbf{0.6193} 
&\textbf{92.9236}  &\textbf{145.1045} &\textbf{35.5135} \\

\begin{tabular}{l}$L_{00}=100$\\$L_{10}=100$\end{tabular}  & \textbf{0.6192} 
&\textbf{91.6388} &\textbf{281.3320}  &\textbf{56.3469} \\ 

\begin{tabular}{l}$L_{00}=100$\\$L_{10}=100$\end{tabular}  & \textbf{0.6187} 
&\textbf{86.6108} &\textbf{418.2479}  &\textbf{76.9534} \\

\begin{tabular}{l}$L_{00}=100$\\$L_{10}=100$\end{tabular}  & \textbf{0.6180} 
&\textbf{80.0001} &\textbf{281.3320} &\textbf{56.6598} \\

\begin{tabular}{l}$L_{00}=100$\\$L_{10}=100$\end{tabular}  & \textbf{0.6189} 
&\textbf{89.1374}  &\textbf{142.7592} &\textbf{30.0929} \\

\bottomrule

\caption{Numerical values 2}
\label{t3}
\end{longtable}

\end{document}
4
  • 1
    Replace the 5 lines with \cmidrule[0.4pt] by ` \\ \midrule`
    – esdd
    Apr 11, 2018 at 8:46
  • Thank you for your answer. If table does not fit in one page, what shall I do to force it to place in one page? Apr 11, 2018 at 9:39
  • This sounds like another issue. In this special case you can edit your question and update the MWE fixing the errors mentioned in the comment.
    – esdd
    Apr 11, 2018 at 10:20
  • 1
    @AbbasKaramali: If you want don't want the third table to split on the first and seond page, why do you use a longtable environment that allows for page breaks in tables? To force the third table onto the second page, simply use a table tabular approach as in your other two tables.
    – leandriis
    Apr 11, 2018 at 19:51

0

You must log in to answer this question.

Browse other questions tagged .