长表和标题:间距问题
我正在使用 \longtable 环境,这是代码:
begin{center}
\scriptsize
\begin{longtable}{|p{2cm}|p{4cm}|p{8cm}|}\hline\hline
\multicolumn{1}{|p{2cm}|}{\textbf{Text1}} &
\multicolumn{1}{p{4cm}|}{\textbf{Text2}} &
\multicolumn{1}{p{8cm}|}{\textbf{Text3}}\\ \hline
\endfirsthead
\multicolumn{3}{p{3cm}}
{{\bfseries \tablename\ \thetable{} -- continued from previous page}}\\
\hline\multicolumn{1}{|p{2cm}|}{\textbf{Text1}} &
\multicolumn{1}{p{4cm}|}{\textbf{Text2}} &
\multicolumn{1}{p{8cm}|}{\textbf{Text3}}\\\hline
\endhead
\hline \multicolumn{3}{|r|}{{Continued on next page}} \\ \hline
\caption[Caption]{Caption}\label{label-caption}
\endfoot
\caption[Caption]{Caption}\label{label-caption}
\endlastfoot
\end{longtable}
\end{center}
所有标题都出现在表格每个部分的底部,这就是我想要的结果。然而,有一个非常烦人的问题:只有表格最后部分底部的标题太靠近表格边框,并且我不知道如何控制 \longtable 内的间距。非常欢迎任何建议!谢谢。我。
I am using the \longtable environment, and this is the code:
begin{center}
\scriptsize
\begin{longtable}{|p{2cm}|p{4cm}|p{8cm}|}\hline\hline
\multicolumn{1}{|p{2cm}|}{\textbf{Text1}} &
\multicolumn{1}{p{4cm}|}{\textbf{Text2}} &
\multicolumn{1}{p{8cm}|}{\textbf{Text3}}\\ \hline
\endfirsthead
\multicolumn{3}{p{3cm}}
{{\bfseries \tablename\ \thetable{} -- continued from previous page}}\\
\hline\multicolumn{1}{|p{2cm}|}{\textbf{Text1}} &
\multicolumn{1}{p{4cm}|}{\textbf{Text2}} &
\multicolumn{1}{p{8cm}|}{\textbf{Text3}}\\\hline
\endhead
\hline \multicolumn{3}{|r|}{{Continued on next page}} \\ \hline
\caption[Caption]{Caption}\label{label-caption}
\endfoot
\caption[Caption]{Caption}\label{label-caption}
\endlastfoot
\end{longtable}
\end{center}
All captions appear at the bottom of each part of the table, which is the result I wanted. However, there is a quite annoying wrinkle: only the caption at the bottom of the last part of the table is too close to the table border, and I cannot figure out how to control the spacing within \longtable. Any advice is more than welcome! Thanks. I.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过启用“caption”包然后调整表格和标题之间的跳跃来控制标题位置。要对整个文档执行此操作,您可以在序言中使用以下代码:
You can control the caption placement by enabling the use of the "caption" package and then adjusting the skip between the table and the caption. To do this for the entire document you can use the following code in the preamble: