简体   繁体   English

如何在LaTeX中的每个页面中重复表的顶行

[英]How to repeat top rows of a table in each page in LaTeX

I have a table in LaTeX which spans multiple pages. 我在LaTeX中有一个跨越多个页面的表。 I want the top two rows repeated in each page. 我希望每页重复前两行。 How can I do that? 我怎样才能做到这一点?

From here : 这里

Tables longer than a single page 表格长于一页

[...] [...]

Both longtable and supertabular allow definition of head- and footlines for the table; longtable和supertabular都允许定义桌子的头部和边线; longtable allows distinction of the first and last head and foot. longtable允许区分头和脚的第一个和最后一个。

[...] [...]

you've got to use the longtable package. 你必须使用longtable包。 Here is an example of the head (source: http://users.sdsc.edu/~ssmallen/latex/longtable.html ) 这是头部的示例(来源: http : //users.sdsc.edu/~ssmallen/latex/longtable.html

\begin{center}
\begin{longtable}{|l|l|l|}
\caption[Feasible triples for a highly variable Grid]{Feasible triples for highly variable Grid, MLMMH.} \label{grid_mlmmh} \\

\hline \multicolumn{1}{|c|}{\textbf{Time (s)}} & \multicolumn{1}{c|}{\textbf{Triple chosen}} & \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\ \hline 
\endfirsthead

\multicolumn{3}{c}%
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\hline \multicolumn{1}{|c|}{\textbf{Time (s)}} &
\multicolumn{1}{c|}{\textbf{Triple chosen}} &
\multicolumn{1}{c|}{\textbf{Other feasible triples}} \\ \hline 
\endhead

\hline \multicolumn{3}{|r|}{{Continued on next page}} \\ \hline
\endfoot

\hline \hline

%here your table content goes

\end{longtable}
\end{center}

\\endlastfoot \\ endlastfoot

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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