How to avoid page breaks between some chapters?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 26
- Joined: Wed Nov 27, 2019 11:03 am
How to avoid page breaks between some chapters?
Hi!
I need to place some very short chapters on the same page. I see that chapter heading has a different behavior than topic heading, and
doesn't work.
I tried to apply something like this:
but no result.
I 've found that p-chapters.css contains:
Does it affect?
I need to place some very short chapters on the same page. I see that chapter heading has a different behavior than topic heading, and
Code: Select all
*[class~="topic/topic"] > *[class~="topic/title"] {
page-break-before:avoid;
}
I tried to apply something like this:
Code: Select all
*:not([class ~= "map/chapter"])[outputclass ~= "no-page-break-before-chapter"] {
page-break-before:avoid;
}
I 've found that p-chapters.css contains:
Code: Select all
*[class ~= "topic/topic"][is-chapter] {
/* Each chapter starts a new page sequence, so the :first selector applies to each of them. */
-oxy-page-group:start;
page: chapter;
}
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: How to avoid page breaks between some chapters?
Yes, the property to change is -oxy-page-group. You should set the value of "auto" to merge the current element with the opened chapter page sequence.
Many regards,
Dan
Code: Select all
*[class ~= "topic/topic"][is-chapter] {
/* Each chapter starts a new page sequence, so the :first selector applies to each of them. */
-oxy-page-group:start;
page: chapter;
}
Dan
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: How to avoid page breaks between some chapters?
In addition to what Dan already suggested (setting the -oxy-page-group: auto), if you do not need all the topics in your publication to be continuous (if you need to remove the page breaks only for some specific chapters) you should also use the "outputclass" attribute.
More specific, in the DITA Map, you could set the outputclass="no-page-break-before-chapter" attribute on the topicrefs corresponding to the topics that you don't need to start on a new page, then slightly change the rule in your customization CSS to:
I hope this helps.
Regards,
Costin
More specific, in the DITA Map, you could set the outputclass="no-page-break-before-chapter" attribute on the topicrefs corresponding to the topics that you don't need to start on a new page, then slightly change the rule in your customization CSS to:
Code: Select all
*[class ~= "topic/topic"][is-chapter][class~="no-page-break-before-chapter"] {
-oxy-page-group:auto;
page: chapter;
}
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Return to “DITA (Editing and Publishing DITA Content)”
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