break page and table

Post here questions and problems related to editing and publishing DITA content.
Le Basque
Posts: 147
Joined: Sat Oct 19, 2013 8:21 am

break page and table

Post by Le Basque »

Hi,

Breaks tables are bad, how to have consistent break, Example: Do not split a table but go to the next page

Thank you
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: break page and table

Post by sorin_ristache »

Hi,

You should add an attribute keep-with-next.within-page="always" to each table row. You do that by adding this attribute in the attribute set applied to each table row, which means inside the attribute with the name tbody.row in the file that sets table attributes.

If you do not use any DITA PDF customization you should edit the file [Oxygen-install-dir]\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\cfg\fo\attrs\tables-attr.xsl:

Code: Select all

  <xsl:attribute-set name="tbody.row">
<!--Table body row-->
<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
</xsl:attribute-set>
This works for CALS tables. If you use simple tables in your DITA topics you should add the same attribute keep-with-next.within-page for each rows of a simple table, in the attribute group for the rows of simple tables:

Code: Select all

  <xsl:attribute-set name="strow">
<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
</xsl:attribute-set>
If you use a customization directory that you set in the customization.dir parameter you should add the same declarations in the XSL file that sets the table attributes (corresponding to the above cfg\fo\attrs\tables-attr.xsl file).


Regards,
Sorin
Le Basque
Posts: 147
Joined: Sat Oct 19, 2013 8:21 am

Re: break page and table

Post by Le Basque »

Thank you Sorin
Post Reply