Widow control to "keep table (rows) with caption below"

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
Niels
Propeller Head
Posts: 89
Joined: Thu Dec 15, 2016 8:41 am
Location: Köln

Widow control to "keep table (rows) with caption below"

Post by Niels »

I am looking for a generic way to keep a table caption style together with (a minimum number of) rows of the preceding table, where the caption is located BELOW the table.

The following approaches do not seem sufficient and I still encounter the issue in my PDF target:
  • Using the option PrintSupport > page-break-before=avoid on the caption style.
  • Using page-break-after: avoid on the table style (also in combination with the above).
Further thoughts:
  • From what I understand so far, widow/orphan control is tailored either to paragraphs or to table rows but it cannot be applied to table rows in combination with a caption style or with an adjacent paragraph.
  • I cannot see any solution with a selector, but maybe I am not experienced enough with this approach.
  • With a generic way I mean to say that I do not want to manually have to adjust all tables e.g. by inserting a kind of <div> block etc.
    (If there is any solution with <div>, my alternative hope is that the insertion of such <div> blocks can be automated based on some pattern e.g. with a RegEx search & replace.)
  • The table where I still encounter the issue stretches across multiple pages.
Although there are many tangent posts on the topic of avoiding ugly page breaks, I still cannot derive a best practice for this issue which I'd expect to be very common.

Can anyone provide a tip or am I missing posts in this forum which cover this?

Current idea, which requires quite some effort to introduce globally in our case, however:
  • Put caption in last table row
  • Merge columns in last row
  • Use table widow control
  • Reassign table style (as we want no bottom border below the caption)
Since this seems quite challenging, also any suggestions for simpler (local) workarounds are appreciated.
Post Reply