【问题标题】:How to repeat top rows of a table in each page in LaTeX如何在 LaTeX 的每一页中重复表格的顶行
【发布时间】:2011-02-12 14:13:38
【问题描述】:

我在 LaTeX 中有一个跨越多个页面的表格。 我希望在每页中重复前两行。 我该怎么做?

【问题讨论】:

  • 具有编程性质的 LaTeX 问题是关于 Stack Overflow 的主题,但对于大多数 LaTeX 问题,您可能最好在 tex.stackexchange.com 上发帖(仅仅是因为用户群是专门的)。如果 aiobe 的答案是您想要的,那么在 tex.SE 上会更好。如果问题是如何在 LaTeX 中实现一个类似于 longtable 的宏,那么它就是一个折腾。

标签: latex


【解决方案1】:

来自here

表格长度超过一页

[...]

longtable 和 supertabular 都允许定义表格的头线和脚线; longtable 允许区分第一个和最后一个头和脚。

[...]

【讨论】:

    【解决方案2】:

    你必须使用 longtable 包。下面是头部示例(来源: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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-21
      • 2012-06-06
      • 2019-08-24
      相关资源
      最近更新 更多