How can ordered list have 4 level lists?

Post here questions and problems related to editing and publishing DITA content.
lisazeng
Posts: 29
Joined: Tue Jun 27, 2017 2:10 pm

How can ordered list have 4 level lists?

Post by lisazeng »

Hi Oxygen Expert,

In my task topic, I want to have below 4-level ordered list.
1.....
a......
1........
a.....
b......
2.......
b

However in the task tpic I can only add one level substeps in steps.
Steps
------step
------substep

How can I have another 2 level ordered substeps in dita?

Thanks!
Lisa
bogdan
Posts: 13
Joined: Tue Jan 14, 2003 12:22 pm

Re: How can ordered list have 4 level lists?

Post by bogdan »

Hi Lisa,

Tasks are topic specializations meant to express simple, concise instructions. Probably this is the reason why you can only use steps and substeps.
As possible solutions for your problem:
- a 4-level list seems to be very difficult to follow for any audience. Maybe you can rewrite the information so you can accommodate it in the default 2-level list structure (steps and substeps).
- convert your task to a topic. Then use a combination of ol and li elements to obtain the structure you wish. For example:

Code: Select all


<ol>
<li>Step 1
<ol>
<li>Substep 1.1
<ol>
<li>Substep 1.1.1
<ol>
<li>Substep 1.1.1.1</li>
</ol>
</li>
</ol>
</li>
<li>Substep 1.2</li>
</ol>
</li>
<li>Step 2</li>
</ol>
Regards,
Bogdan

Bogdan Goreci
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
lisazeng
Posts: 29
Joined: Tue Jun 27, 2017 2:10 pm

Re: How can ordered list have 4 level lists?

Post by lisazeng »

Hi Bogdan,

Yes, this help me alot.
I tested it with topic and it works.

thanks!

Lisa
hpyu37
Posts: 1
Joined: Tue Jun 30, 2020 9:13 pm

Re: How can ordered list have 4 level lists?

Post by hpyu37 »

Hi Bogdan,

I tried this in my topic (concept) but it is appearing as a, b, c, .... instead of 1.1, 1.2, 1.3

See the attched doc.
Image
Attachments
orderedlist.PNG
orderedlist.PNG (35.44 KiB) Viewed 1847 times
orderedlist.PNG
orderedlist.PNG (35.44 KiB) Viewed 1847 times
image.png
image.png (48.22 KiB) Viewed 1847 times
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: How can ordered list have 4 level lists?

Post by Radu »

Hi,

This forum thread is quite old (last post about 3 years ago). Maybe in such cases you can consider starting a new post.
The visual editing is styled in Oxygen using CSS, if you look in this CSS OXYGEN_INSTALLD_DIR/frameworks/dita/css/core/-topic-body-lists.css, there are CSS selectors which configure the list item counters depending on their level:

Code: Select all

  *[class~="topic/ol"] > *[class~="topic/li"] {
      counter-increment: item-count;
  }
  *[class~="topic/ol"] > *[class~="topic/li"]::marker {
      content: counter(item-count, decimal) ". ";
      font-weight:bold;
  }
  *[class~="topic/ol"] > *[class~="topic/li"] 
    *[class~="topic/ol"] > *[class~="topic/li"]::marker {
      content: counter(item-count, lower-alpha) ". ";
  }
  *[class~="topic/ol"] > *[class~="topic/li"] 
    *[class~="topic/ol"] > *[class~="topic/li"]  
       *[class~="topic/ol"] > *[class~="topic/li"]::marker {
      content: counter(item-count, lower-roman) ". ";
  }
  *[class~="topic/ol"] > *[class~="topic/li"] 
    *[class~="topic/ol"] > *[class~="topic/li"]  
       *[class~="topic/ol"] > *[class~="topic/li"]  
         *[class~="topic/ol"] > *[class~="topic/li"]::marker {
      content: counter(item-count, decimal) ". ";
  }
but this does not influence the published output as with XML in general there is a separation between content and publishing.
So in what published format (HTML, PDF) do you want to obtain that specific numbering?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply