PDF output: How to prevent leaving section titles at the bottom of page with nothing following them
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 3
- Joined: Wed Apr 10, 2019 2:32 pm
PDF output: How to prevent leaving section titles at the bottom of page with nothing following them
Hello,
I use Docbook 5.1, Saxon HE 9.8.0.12, and DockBook PDF scenario to build PDFs. How should I customize XSL to prevent leaving section titles at the bottom of page with nothing following them?
I use Docbook 5.1, Saxon HE 9.8.0.12, and DockBook PDF scenario to build PDFs. How should I customize XSL to prevent leaving section titles at the bottom of page with nothing following them?
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: PDF output: How to prevent leaving section titles at the bottom of page with nothing following them
Hi Olga,
We are not very familiar with customizing DocBook but there is a free mailing list (<docbook-apps@lists.oasis-open.org>) on which you may want in the future to ask DocBook-related customization questions:
https://docbook.org/help
Coming back to your question:
The DocBook publishing uses Saxon 6 for publishing as the DocBook XSLT stylesheet have version 1.0.
In the XSLT stylesheet:
OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/fo/param.xsl
there is an attribute set called "section.title.properties" which already has the "keep-with-next.within-column" attribute set to "always" so it should work by default.
Regards,
Radu
We are not very familiar with customizing DocBook but there is a free mailing list (<docbook-apps@lists.oasis-open.org>) on which you may want in the future to ask DocBook-related customization questions:
https://docbook.org/help
Coming back to your question:
The DocBook publishing uses Saxon 6 for publishing as the DocBook XSLT stylesheet have version 1.0.
In the XSLT stylesheet:
OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/fo/param.xsl
there is an attribute set called "section.title.properties" which already has the "keep-with-next.within-column" attribute set to "always" so it should work by default.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Wed Apr 10, 2019 2:32 pm
Re: PDF output: How to prevent leaving section titles at the bottom of page with nothing following them
Hi Radu,
Thank you for your response. I found out that the <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> works in case you don't have indexterms following a section title. If you have the stucture like this:
<section xml:id="CDU_DEFINING_COMMAND_VERBS">
<title>Defining Command Verbs</title>
<indexterm><primary>Command Definition Utility (CDU)</primary><secondary>defining verbs</secondary></indexterm>
<para>The DEFINE VERB statement defines a new command verb and specifies its characteristics. You
can define any number of verbs in a single command definition file.</para>
then in PDF, a section title may appear at the bottom of the page. Is there any way to prevent this?
Thank you for your response. I found out that the <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> works in case you don't have indexterms following a section title. If you have the stucture like this:
<section xml:id="CDU_DEFINING_COMMAND_VERBS">
<title>Defining Command Verbs</title>
<indexterm><primary>Command Definition Utility (CDU)</primary><secondary>defining verbs</secondary></indexterm>
<para>The DEFINE VERB statement defines a new command verb and specifies its characteristics. You
can define any number of verbs in a single command definition file.</para>
then in PDF, a section title may appear at the bottom of the page. Is there any way to prevent this?
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: PDF output: How to prevent leaving section titles at the bottom of page with nothing following them
Hi,
I understand, because the indexterm follow the title (although the fo elements corresponding to them are probably hidden in the generated XSL-FO file) there indeed may appear a line break before the paragraph as the paragraph no longer directly follows the title.
I'm not sure how best to approach this, maybe you can define the index terms directly at the end of the title.
Or maybe some sort of XSLT customization which would migrate the index terms inside the title when publishing just to avoid this extra element which appears between the title and the first paragraph.
Maybe the people on the DocBook Apps users list may have better ideas about this.
Regards,
Radu
I understand, because the indexterm follow the title (although the fo elements corresponding to them are probably hidden in the generated XSL-FO file) there indeed may appear a line break before the paragraph as the paragraph no longer directly follows the title.
I'm not sure how best to approach this, maybe you can define the index terms directly at the end of the title.
Or maybe some sort of XSLT customization which would migrate the index terms inside the title when publishing just to avoid this extra element which appears between the title and the first paragraph.
Maybe the people on the DocBook Apps users list may have better ideas about this.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service