Writer seems to ignore fo:keep-with-next="always"

I am generating a large table which I want to break across pages only in certain places. To achieve that, I define the style

<style:style style:family="table-row" style:name="unbreakable_row">
<style:table-row-properties fo:keep-with-next="always" />
</style:style>

And then assign it to all rows except those after which I want to allow a page break:

<table:table-row table:style-name="unbreakable_row">
...

However, that doesn’t seem to have much effect on Writer, which breaks the table in random places.

Am I doing something wrong, or is this a bug in Writer?

Example file: book.odt (16.3 KB)

fo:keep-with-next is only usable with <style:paragraph-properties> and <style:table-properties>.

1 Like

Thank you, that explains why it’s not working. So is there no way at all to control where page breaks within a table may occur (short of forcing them)?

I’m afraid there aren’t. From experience, many text paragraph text flow properties become ineffective inside tables. But since it is a long time I experimented, you should have a try. My strategy was to play with paragraphs inside cells to make cell content an indivisible block but this does not change the overall table behaviour. Sometimes, this “paragraph strategy” gives worst results (aesthetically speaking) than just doing nothing.

1 Like