0

Assume a table where some table-rows consist entirely of cells which contain multiple lines.

In the table below row 2 is such a row.

+-----------------------+-----------------------+-----------------------+
|       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      |
+-----------------------+-----------------------+-----------------------+

Is it possible in LaTeX to have tables where page-breaking is allowed between the lines of such a row?

(longtable is not suitable - it allows pagebreaks between the rows of a table but not between the lines belonging to a row.)

1
  • 2
    You show the easy case where all the column entries are text paragraphs with matching baselines. This is much harder in the general case where some columns may be single line or have unbreakable images or math displays or have fonts of a different size and no matching baselines, so you need to find a common vertical position to break all columns. – David Carlisle Aug 31 '20 at 10:08
0
+-----------------------+-----------------------+-----------------------+
|       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      |
+-----------------------+-----------------------+-----------------------+

If you can turn the lines within the table-rows into table-rows whereafter no horizontal rule is drawn, then longtable can do the job.

This requires all linebreaks within the cells of row 2 to be done "by hand".

4
  • When a table is longer than one page and rows are of several lines consider seriously if a table is the best option. – Fran Aug 31 '20 at 8:06
  • @Fran Tell our fellow questioner. ;-) I seldom create tables and if I do so, then I usually do not consider (La)TeX the best option. In my opinion the best option still is writing by hand. If that is not an option, then GNU troff. ;-> – Ulrich Diez Aug 31 '20 at 17:13
  • Really it was a comment for the questioner in the wrong place, sorry. – Fran Aug 31 '20 at 18:03
  • @Fran Never mind. ;-) By the way: I think you are absolutely right with your remark about considering whether a table is the best option. – Ulrich Diez Aug 31 '20 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.