![当我使用 longtable 时,表格无法容纳整个文本,有什么解决办法吗?或者有合适的方法来更改页面?](https://linux22.com/image/428880/%E5%BD%93%E6%88%91%E4%BD%BF%E7%94%A8%20longtable%20%E6%97%B6%EF%BC%8C%E8%A1%A8%E6%A0%BC%E6%97%A0%E6%B3%95%E5%AE%B9%E7%BA%B3%E6%95%B4%E4%B8%AA%E6%96%87%E6%9C%AC%EF%BC%8C%E6%9C%89%E4%BB%80%E4%B9%88%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95%E5%90%97%EF%BC%9F%E6%88%96%E8%80%85%E6%9C%89%E5%90%88%E9%80%82%E7%9A%84%E6%96%B9%E6%B3%95%E6%9D%A5%E6%9B%B4%E6%94%B9%E9%A1%B5%E9%9D%A2%EF%BC%9F.png)
答案1
您必须\pagebreak
时不时地添加一个。
\documentclass{article}
\usepackage{longtable,lipsum}
\begin{document}
\begin{longtable}{|l|c|c|c|c|c|}
\hline
\multicolumn{6}{|p{10cm}|}{1. \lipsum[1-4] } \\ \hline
\pagebreak
\hline
\multicolumn{6}{|p{10cm}|}{5. \lipsum[5-8] } \\ \hline
\end{longtable}
\end{document}
您longtable
可以运行逐页链接部分表格的页眉和页脚。
\documentclass{article}
\usepackage{longtable,lipsum}
\begin{document}
\begin{longtable}{|l|c|c|c|c|c|}
\hline
\multicolumn{6}{|p{10cm}|}{\Large Main heading } \\
\hline
\endfirsthead
\multicolumn{3}{l} {\footnotesize \emph{ \ldots{} from previous page.}} \\
\hline
\multicolumn{6}{|p{10cm}|}{ \Large Main heading } \\
\hline
\endhead
\multicolumn{6}{r}{\footnotesize \emph{to be continued in the next page \ldots{} }} \\
\endfoot
\endlastfoot
\multicolumn{6}{|p{10cm}|}{1. \lipsum[1-4] } \\ \hline
\pagebreak
\multicolumn{6}{|p{10cm}|}{5. \lipsum[5-8] } \\ \hline
\end{longtable}
\end{document}