Table breaks and repeating headers

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

Table breaks and repeating headers

Postby erinhill on Thu Sep 24, 2020 6:32 pm

Hi! Am I able to do something that doesn't break a table's rows across two pages? Am I also able to repeat table headers if the table goes to another page?

Propeller Head
Posts: 12
Joined: Wed Aug 05, 2020 1:35 pm

Re: Table breaks and repeating headers

Postby robdocsmith on Sun Sep 27, 2020 3:54 pm

As far as keeping a table all on the same page, the only way I know of doing this is to use a DIV around the table. I have a default style defined that I can use wherever I don't want stuff to break across columns or pages:

.keeptogether {
page-break-inside: avoid;
column-break-inside: avoid;

Then, just wrapping your content (or table) in a <div class="keeptogether"></div> will hold it to the same text frame - provided that it physically can fit in that text frame. If it's bigger than the frame you can't avoid the break.

To get headers and footers to repeat across tables, they need to be defined as headers and footers in the table. Right click the table and choose Table Properties. Make sure you've added a Header row in the Table Size section. You'll need to style the header row separately to the normal rows. In the xml your table will then look like:

Code: Select all
        <tr><th>Head 1</th><th>Head 2</th></tr>
        <tr><td>Cell 1</td><td>Cell 2</td></tr>


Propeller Head
Posts: 88
Joined: Thu May 24, 2018 3:11 pm

Return to Printed Documentation Targets

Who is online

Users browsing this forum: No registered users and 4 guests