在上一个横向长表格中途结束的同一页面上开始下一个横向长表格

在上一个横向长表格中途结束的同一页面上开始下一个横向长表格

在我的论文附录中,我有多个连续的横向长表。其中很多都在页面中间结束。我想在同一页上开始下面的表格,而不是像现在这样在新页面上开始。下面是一个 MWE

\documentclass[b5paper]{book}

\usepackage{longtable}
\usepackage{pdflscape}
\usepackage{booktabs}

\title{A longtable example}

\begin{document}

\begin{landscape}
\begin{longtable}{lll}
    \caption{A sample long table.} \label{tab:long} \\

    \toprule \multicolumn{1}{c}{\textbf{First column}} & \multicolumn{1}{c}{\textbf{Second column}} & \multicolumn{1}{c}{\textbf{Third column}} \\ \midrule 
    \endfirsthead
    
    \multicolumn{3}{c}%
    {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
    \midrule \multicolumn{1}{c}{\textbf{First column}} & \multicolumn{1}{c}{\textbf{Second column}} & \multicolumn{1}{c}{\textbf{Third column}} \\ \midrule 
    \endhead
    
    \midrule \multicolumn{3}{r}{{Continued on next page}} \\ \midrule
    \endfoot
    
    \bottomrule
    \endlastfoot
    
    One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\
\end{longtable}
\end{landscape}


\begin{landscape}
\begin{longtable}{lll}
\caption{A sample long table.} \label{tab:long2} \\

\toprule \multicolumn{1}{c}{\textbf{First column}} & \multicolumn{1}{c}{\textbf{Second column}} & \multicolumn{1}{c}{\textbf{Third column}} \\ \midrule 
\endfirsthead

\multicolumn{3}{c}%
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\midrule \multicolumn{1}{c}{\textbf{First column}} & \multicolumn{1}{c}{\textbf{Second column}} & \multicolumn{1}{c}{\textbf{Third column}} \\ \midrule 
\endhead

\midrule \multicolumn{3}{r}{{Continued on next page}} \\ \midrule
\endfoot

\bottomrule
\endlastfoot

    One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\ One & abcdef ghjijklmn & 123.456778 \\
\end{longtable}
\end{landscape}

\end{document}

答案1

两者都\begin{landscape}调用,\end{landscape}这样\clearpage你总是会得到一个分页符,但是你可以把两者都放在longtable同一个landscape即删除中间

\end{landscape} 
\begin{landscape} 

相关内容