Writer: Prevent table from breaking between two rows

I want to prevent a table from splitting to the next page between two specific rows. It may split anywhere else. The table format settings are correct already - table is allowed split, but rows not. In Word I can accomplish this using paragraph formatting in the upper row to “keep with next.” In Writer this does not work, however.
Any advice?

Text flow properties for tables are “global”: they apply to the whole table. You can’t allow page break for the table but for a pair of rows.

However, you can cheat, provided you don’t try to use your table like you would do in Calc, i.e. you don’t compute values, you use a table only for tabular presentation of some text, images or other data.

In Writer, a table has no semantic meaning per se. It is a collection of joined rectangular areas with or without borders. Consequently, it does not matter if the tabular presentation is made of one or several technical tables.

Therefore, you split your table into three: a first one with split across pages enabled, a second one encompassing your “critical” rows with the attribute disabled and the third one with the attribute enabled. All have row split disabled.

EDIT 1: changed a “disabled” word for “enabled”. The error made the trick faulty.

You must take care of Spacing above and below in the Table tab of Table>Properties so as not to leave any gap between the sub-tables. Also check the borders to avoid double-thickness (one of the upper/lower borders may need to be suppressed.

Of course, don’t insert paragraphs between the sub-tables otherwise they won’t touch each other.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

Thank you for the comprehensive response!
It appears there is no short methods or tricks to control table breaks then.

1 Like

check the borders to avoid double-thickness (one of the upper/lower borders may need to be suppressed.

This can not work if you want outer borders because (as far as I’ve found) there is no way to avoid doubled borders OR missing borders at the bottom or top of a page. If you set the top border of a table to “none” to avoid doubling with the table immediately preceding it, then if a page break happens to land there the table will be pushed to the next page and will appear without a top border.

I wish the "Merge adjacent line styles" option would merge adjacent borders even when the borders belonged to different tables. But as of LibreOffice 7.x "Merge adjacent line styles" only merges borders between rows inside the table :(

Edit: Enhancement request filed at 157127 – Make "Merge adjacent line styles" merge between tables

You could post an enhancement request, How to Report Bugs in LibreOffice - The Document Foundation Wiki

As a workaround you could use horizontal lines or a Drawing line to separate text in a single row (rows set to not split) to make it look like two rows.
FakingTwoCellsWithHorizontalLine.odt (40.9 KB)

There is an enh-request now at 157127 – Make "Merge adjacent line styles" merge between tables

LibreOffice 24.2 might be interesting for you. The release notes under Multi page floating tables refer to this page, What is Miklos hacking – Multi-page floating tables in Writer: overlap control, border and footnotes

It seems that outer borders will be applied at page breaks