How to set the keep-with-next property

Post here questions and problems related to editing and publishing DITA content.
shanweizhong
Posts: 30
Joined: Mon Jul 10, 2017 2:18 am

How to set the keep-with-next property

Post by shanweizhong »

Hi guys,

I'm using Oxygen Author 21.1 and the "DITA Map PDF - based on HTML5 & CSS" transformation.

There are many occasions that I want a paragraph to stay with the next element. For example, an introductory sentence and the list or table below it. I tried to add the following code in my CSS template but it did not work:

Code: Select all

*[outputclass ~= "keep-with-next"] {
	page-break-after:avoid;
}

Code: Select all

<p outputclass="keep-with-next">New features in this release are as follows:</p>
Can any of you give me a hand?

Cheers,
Michael
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

Re: How to set the keep-with-next property

Post by Dan »

Hello Michael,

This looks like a bug. Can you tell us what element is following the p element? A DITA snipped would be good.

Many regards,
Dan
shanweizhong
Posts: 30
Joined: Mon Jul 10, 2017 2:18 am

Re: How to set the keep-with-next property

Post by shanweizhong »

Thanks Dan. My bad. I enclosed the element that follows in the <p> tag... Please ignore my question.
Post Reply