Okay, I've figured it out.
To make the table to continue on a next page when it is long enough to fit the current page, we have to clear the attribute that prevents the rows to break. The attribute that controls whether a row can break is called
keep-together.within-page. It is the inverse analog of the
Allow row to break across pages check box found in table properties in Microsoft Word.
The thing is, while
Allow row to break across pages stops Word from keeping rows together,
keep-together.within-page forces that effectively preventing two adjacent rows to break. As a result, rows stick together when output to PDF.
To allow rows to break across pages and enable tables to continue of next page,
1) In Author 19 open ${frameworksDir}/dita/DITA-OT2.x/plugins/org.dita.pdf2/cfg/fo/attrs/.
Note: ${frameworksDir} substitutes for %programfiles%\Oxygen XML Author 19\frameworks\. When using 32-bit version of Author 19 on a 64-bit platform, this maps to %programfiles(x86)%\Oxygen XML Author 19\frameworks\.
Note: Author 19 ships with two built-in versions of DITA framework: DITA-OT 1.8 and DITA-OT 2.x (used by default). You can select the framework to be used for publishing in Preferences | DITA.
2) Locate the tables-attr.xsl and open it for editing. Preferably in an editor that supports Linux-like line endings (LF without CR) such as Notepad++.
3) In the opened tables-attr.xsl locate the block that starts with the following line:
Code: Select all
<xsl:attribute-set name="tbody.row">
3.1) Create a backup of the expression by copying the block and commenting it out, like:
Code: Select all
<!--Default: Do not continue table on the next page-->
<!-- <xsl:attribute-set name="tbody.row">-->
<!--Table body row-->
<!-- <xsl:attribute name="keep-together.within-page">always</xsl:attribute>-->
<!-- </xsl:attribute-set>-->
4) Modify the original block by removing the
keep-together.within-page attribute:
Code: Select all
<!--Modified: Сontinue table on the next page-->
<xsl:attribute-set name="tbody.row">
<!--Table body row-->
</xsl:attribute-set>
The change will look as:
Code: Select all
<!--Default: Do not continue table on the next page-->
<!-- <xsl:attribute-set name="tbody.row">-->
<!--Table body row-->
<!-- <xsl:attribute name="keep-together.within-page">always</xsl:attribute>-->
<!-- </xsl:attribute-set>-->
<!--Modified: Сontinue table on the next page-->
<xsl:attribute-set name="tbody.row">
<!--Table body row-->
</xsl:attribute-set>
Save changes and then close the editor. You do not have to restart the Author 19 to make the changes apply. Now if you print the document to PDF by using the PDF2 transformation, your tables will run across multiple pages if they do not fit a single page.
Adding shading for table headings
To allow rows to break across pages and enable tables to continue of next page,
1) In Author 19 open ${frameworksDir}/dita/DITA-OT2.x/plugins/org.dita.pdf2/cfg/fo/attrs/.
Note: ${frameworksDir} substitutes for %programfiles%\Oxygen XML Author 19\frameworks\. When using 32-bit version of Author 19 on a 64-bit platform, this maps to %programfiles(x86)%\Oxygen XML Author 19\frameworks\.
Note: Author 19 ships with two built-in versions of DITA framework: DITA-OT 1.8 and DITA-OT 2.x (used by default). You can select the framework to be used for publishing in Preferences | DITA.
2) Locate the tables-attr.xsl and open it for editing. Preferably in an editor that supports Linux-like line endings (LF without CR) such as Notepad++.
3) In the opened tables-attr.xsl locate the block that starts with the following line:
Code: Select all
<xsl:attribute-set name="thead.row.entry">
3.1) Create a backup of the expression by copying the block and commenting it out, like:
Code: Select all
<!--Default: Do not fill table head with color-->
<!-- <xsl:attribute-set name="thead.row.entry">-->
<!--head cell-->
<!-- </xsl:attribute-set>-->
4) Modify the original block by adding the
background-color attribute and setting its value to
antiquewhite:
Code: Select all
<!--Default: Fill table head with color-->
<xsl:attribute-set name="thead.row.entry">
<!--head cell-->
<xsl:attribute name="background-color">antiquewhite</xsl:attribute>
</xsl:attribute-set>
The change will look as:
Code: Select all
<!--Default: Do not fill table head with color-->
<!-- <xsl:attribute-set name="thead.row.entry">-->
<!--head cell-->
<!-- </xsl:attribute-set>-->
<!--Default: Fill table head with color-->
<xsl:attribute-set name="thead.row.entry">
<!--head cell-->
<xsl:attribute name="background-color">antiquewhite</xsl:attribute>
</xsl:attribute-set>
5) Repeat steps 3 through 4.1 for:
5.1) Block that starts with
Code: Select all
<xsl:attribute-set name="sthead.stentry__keycol-content" use-attribute-sets="common.table.body.entry common.table.head.entry">
The change will look as:
Code: Select all
<!--Default: Do not fill table head with color-->
<!-- <xsl:attribute-set name="sthead.stentry__keycol-content" use-attribute-sets="common.table.body.entry common.table.head.entry">-->
<!-- </xsl:attribute-set>-->
<!--Default: Fill table head with color-->
<xsl:attribute-set name="sthead.stentry__keycol-content" use-attribute-sets="common.table.body.entry common.table.head.entry">
<xsl:attribute name="background-color">antiquewhite</xsl:attribute>
</xsl:attribute-set>
6) Repeat steps 3 through 4.1 for:
6.1) Block that starts with
Code: Select all
<xsl:attribute-set name="strow.stentry__keycol-content" use-attribute-sets="common.table.body.entry common.table.head.entry">
The change will look as:
Code: Select all
<!--Default: Do not fill table head with color-->
<!-- <xsl:attribute-set name="strow.stentry__keycol-content" use-attribute-sets="common.table.body.entry common.table.head.entry">-->
<!-- </xsl:attribute-set>-->
<!--Default: Fill table head with color-->
<xsl:attribute-set name="strow.stentry__keycol-content" use-attribute-sets="common.table.body.entry common.table.head.entry">
<xsl:attribute name="background-color">antiquewhite</xsl:attribute>
</xsl:attribute-set>
Save changes and then close the editor. You do not have to restart the Author 19 to make the changes apply. Now if you print the document to PDF by using the PDF2 transformation, your tables will now have shading in their headings.