Page 1 of 1

prevent page break between topic title and topic content

Posted: Mon Mar 06, 2017 5:49 pm
by asurkau
Hi,

in my PDF transformation I want to keep the topic title with the topic content, and not have the transformation insert a page break between them when the topic title would be rendered at the bottom of a page, but put the title at the top of the next page, together with the content.

I created a custom plugin and have inserted the following in the file commons-attr.xsl for the topic.title attribute set and all other attribute sets that format topic titles (topic.topic.title, topic.topic.topic.title, etc.):

Code: Select all

<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
However the title is still rendered at the bottom of a page and the topic content on the next page.

I'm using Oxygen Editor 18.1 with DITA OT 2.3.3.

Can you please let me know what else I need to change to have the title and topic content appear together, without a page break inbetween?

Thanks,
Angela

Re: prevent page break between topic title and topic content

Posted: Thu Mar 09, 2017 9:45 am
by radu_pisoi
Hi,

Setting the property keep-with-next.within-page=always should be enough to tell the XSL-FO processor to keep the topic title within the same page with its content.

You can verify if your customization was applied by setting the clean.temp="no" transformation parameter. This parameter will instruct the transformation to not clean the temporary folder, so you can analyse the topic.fo file from this folder at the end of the transformation.

This temporary file represent the input of the XSL-FO processor and it should contain the keep-with-next.within-page=always property.