Continuing a list

Post here questions and problems related to editing and publishing DITA content.
digital_nomad
Posts: 4
Joined: Thu Jul 28, 2022 9:03 am

Continuing a list

Post 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
andrei_pomacu
Posts: 39
Joined: Mon Jul 25, 2022 11:18 am

Re: Continuing a list

Post 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:
  1. Press Configure Transformation Scenario.
  2. Press Edit on both HTML & CSS scenario and WebHelp.
  3. In Paramters tab at CSS: selection field select the path of your CSS.
  4. Run the transformation again.
Regards,
Andrei
Post Reply