Page 1 of 1

Ordered list inside of the list item

Posted: Mon Aug 14, 2023 11:13 pm
by justyna_i
Hello,

I would like to create an ordered list inside of the list item (of the existing ordered list).
When I next <ol> element inside of <li> I get second level bullets (a, b, c instead of 1, 2, 3).

Is there any way to make dita think that this is completely new ordered list and start numbering on top level?

Re: Ordered list inside of the list item

Posted: Tue Aug 15, 2023 2:45 am
by chrispitude
Hi justyna_i,

Are you looking for something like this, starting a new count but using the same number format?

Code: Select all

1. Top list item 1
2. Top list item 2
   1. Lower list item 1
   2. Lower list item 2
   3. Lower list item 3
3. Top list item 3

Re: Ordered list inside of the list item

Posted: Tue Aug 15, 2023 9:38 am
by justyna_i
Yes, something like that.
chrispitude wrote: Tue Aug 15, 2023 2:45 am Hi justyna_i,

Are you looking for something like this, starting a new count but using the same number format?

Code: Select all

1. Top list item 1
2. Top list item 2
   1. Lower list item 1
   2. Lower list item 2
   3. Lower list item 3
3. Top list item 3

Re: Ordered list inside of the list item

Posted: Tue Aug 15, 2023 11:47 am
by chrispitude
Hi justyna_i,

What transformation types are you using?

Do you want this behavior for every second-level ordered list in every document, or only for certain ones?

Re: Ordered list inside of the list item

Posted: Tue Aug 15, 2023 12:51 pm
by justyna_i
I am using pdf based on XSL-FO and I have a custom plugin for this product. Right now I don't see any other instances where this would have to be used but I wouldn't want to apply this change to all second-level ordered lists.

chrispitude wrote: Tue Aug 15, 2023 11:47 am Hi justyna_i,

What transformation types are you using?

Do you want this behavior for every second-level ordered list in every document, or only for certain ones?

Re: Ordered list inside of the list item

Posted: Tue Aug 15, 2023 1:59 pm
by chrispitude
For this situation, maybe you could define an @outputclass value of "top" on the lower-level <ol> element, then add some XSL-FO customization to also render such @outputclass-matching lists as top-level lists.

It looks like you could duplicate and customize the topic/ol processing template at

<DITA-OT>/plugins/org.dita.pdf2/xsl/fo/lists.xsl