Page 1 of 1
Continuing a list
Posted: Thu Nov 17, 2022 1:14 pm
by digital_nomad
I have a DITA topic where I have ordered lists which need to be continued. For example, the first list has items 1-10, the next list (after some other tags) should continue from 11.
I have used outputclass=continue, but that doesn't work. I am generating the PDF and webhelp using the default transformation scenarios. Please help
Re: Continuing a list
Posted: Thu Nov 17, 2022 4:55 pm
by andrei_pomacu
Hi,
In the topic, on the ordered list that you want to continue you need to add an outputclass attribute with a specific value. Here is an example:
Code: Select all
<ol>
<li>elem1</li>
<li>elem2</li>
</ol>
<p>P1</p>
<p>P2</p>
<ol outputclass="continued-ol">
<li>elem3</li>
<li>elem4</li>
</ol>
In order to override the function of the ordered list you need to create a specific CSS style.
Here is what you need to add in your CSS:
Code: Select all
ol{
counter-reset:cnt;
}
ol[outputclass = 'continued-ol']{
counter-reset:none;
}
li::before{
counter-increment: cnt;
content:counter(cnt)" .";
}
li{
display:block;
}
To add a style new style into your transformation, it is necessary to override a transformation.
To do that:
- Press Configure Transformation Scenario.
- Press Edit on both HTML & CSS scenario and WebHelp.
- In Paramters tab at CSS: selection field select the path of your CSS.
- Run the transformation again.
Regards,
Andrei