假设有一张表,其中一些表行完全由包含多行的单元格组成。
下表第 2 行就是这样的一行。
+-----------------------+-----------------------+-----------------------+
| row1/col1 | row1/col2 | row1/col3 |
+-----------------------+-----------------------+-----------------------+ _____pagebreak here can be done with longtable
| line 1 of row2/col1 | line 1 of row2/col2 | line 1 of row2/col3 | __ Allow pagebreak here
| line 2 of row2/col1 | line 2 of row2/col2 | line 2 of row2/col3 | __ Allow pagebreak here
| line 3 of row2/col1 | line 3 of row2/col2 | line 3 of row2/col3 | __ Allow pagebreak here
| line 4 of row2/col1 | line 4 of row2/col2 | line 4 of row2/col3 |
+-----------------------+-----------------------+-----------------------+ _____pagebreak here can be done with longtable
| row3/col1 | row3/col2 | row3/col3 |
+-----------------------+-----------------------+-----------------------+
在 LaTeX 中,是否可以制作允许在行与行之间进行分页的表格?
(longtable 不适合 - 它允许在表格的行之间进行分页,但不允许在属于一行的行之间进行分页。)
答案1
+-----------------------+-----------------------+-----------------------+
| row1/col1 | row1/col2 | row1/col3 |
+-----------------------+-----------------------+-----------------------+ _____pagebreak here can be done with longtable
| line 1 of row2/col1 | line 1 of row2/col2 | line 1 of row2/col3 |
. . . . . . . . . . . . . . . . . . . . . . . . . __ row where no horizontal rule is drawn
| line 2 of row2/col1 | line 2 of row2/col2 | line 2 of row2/col3 |
. . . . . . . . . . . . . . . . . . . . . . . . . __ row where no horizontal rule is drawn
| line 3 of row2/col1 | line 3 of row2/col2 | line 3 of row2/col3 |
. . . . . . . . . . . . . . . . . . . . . . . . . __ row where no horizontal rule is drawn
| line 4 of row2/col1 | line 4 of row2/col2 | line 4 of row2/col3 |
+-----------------------+-----------------------+-----------------------+ _____pagebreak here can be done with longtable
| row3/col1 | row3/col2 | row3/col3 |
+-----------------------+-----------------------+-----------------------+
如果您可以将表格行内的线条变成表格行,之后不再绘制水平线,那么 longtable 就可以完成这项工作。
这要求第 2 行单元格内的所有换行都必须“手动”完成。