Hello,
I'm trying to keep a table on one page. This is what it looks like in H&M:
And this is the PDF output:
What am I doing wrong?
"Keep paragraph with next" doesn't work as expected
Moderators: Alexander Halser, Tim Green
-
- Posts: 30
- Joined: Wed Nov 30, 2016 9:07 am
- Tim Green
- Site Admin
- Posts: 23186
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: "Keep paragraph with next" doesn't work as expected
Hi Christian,
You're not doing anything wrong. The problem is that each table cell is effectively a separate document. Keeping paragraphs together is only possible within cells; you can't keep them together between cells in two different rows. However, there is a trick you can use to achieve this, but you should be careful how you use it: Merge all the cells in a row into a single cell across the entire table, then insert another table with the rows you don't want to break inside that cell. The nested table won't break. However, you have to be very careful that it will fit on a page, otherwise it will run off the edge of the page. Also, using more than just a couple of nested tables can get difficult to manage.
You're not doing anything wrong. The problem is that each table cell is effectively a separate document. Keeping paragraphs together is only possible within cells; you can't keep them together between cells in two different rows. However, there is a trick you can use to achieve this, but you should be careful how you use it: Merge all the cells in a row into a single cell across the entire table, then insert another table with the rows you don't want to break inside that cell. The nested table won't break. However, you have to be very careful that it will fit on a page, otherwise it will run off the edge of the page. Also, using more than just a couple of nested tables can get difficult to manage.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 30
- Joined: Wed Nov 30, 2016 9:07 am
Re: "Keep paragraph with next" doesn't work as expected
That sounds dangerous
I used a property of the table "Table can split to the next page", and disabled that for smaller tables. This works well enough for me.
I used a property of the table "Table can split to the next page", and disabled that for smaller tables. This works well enough for me.