widows and orphans
Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
-
- Posts: 156
- Joined: Sat Feb 26, 2005 12:09 am
- Location: USA
- Contact:
widows and orphans
Post by shudson310 »
The Chemistry documentation describes a style to control page breaks based on widows and orphans. The example only shows <p>, but is this possible with other elements? For example, I don't want an orphaned line from a step.
I tried:
but I'm still getting orphaned step content.
How can I address this?
I tried:
Code: Select all
p, tr, ul, ol, steps, step, substep, li {
orphans: 4;
widows: 2;
}
How can I address this?
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Staff Content Engineer
Site: docs.servicenow.com
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: widows and orphans
Hi Scott,
From what I understand the widows and orphans strategies apply to paragraph-like elements, so only to block elements which contain inside text and inline elements.
So if you have a very large <p> somewhere at the end of the page and its content overflows the page, then these properties are taken into account.
But if you have a step, the step contains in its turn other block elements (cmd, info (maybe inside the info there are other paragraps)) and this set of widow/orphan properties to not apply when deciding if a split between cmd and info should be made or not, or a split between two paragraphs inside the info should be attempted or not.
Regards,
Radu
From what I understand the widows and orphans strategies apply to paragraph-like elements, so only to block elements which contain inside text and inline elements.
So if you have a very large <p> somewhere at the end of the page and its content overflows the page, then these properties are taken into account.
But if you have a step, the step contains in its turn other block elements (cmd, info (maybe inside the info there are other paragraps)) and this set of widow/orphan properties to not apply when deciding if a split between cmd and info should be made or not, or a split between two paragraphs inside the info should be attempted or not.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 54
- Joined: Mon Jun 27, 2011 10:51 pm
Re: widows and orphans
Although it sometimes generates unwanted whitespace, I found using "page-break-after: avoid;" mostly keeps my steps together.
Code: Select all
li.step:before{
content: "Step " counter(item) ": " !important;
counter-increment: item;
font-weight: bold;
page-break-after: avoid;
}
-
- Posts: 156
- Joined: Sat Feb 26, 2005 12:09 am
- Location: USA
- Contact:
Re: widows and orphans
Post by shudson310 »
Thanks! That was very helpful. Works well for our tasks, too.
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Staff Content Engineer
Site: docs.servicenow.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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