Page 1 of 1

How can ordered list have 4 level lists?

Posted: Mon Aug 14, 2017 9:14 am
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

Re: How can ordered list have 4 level lists?

Posted: Mon Aug 14, 2017 3:41 pm
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

Re: How can ordered list have 4 level lists?

Posted: Wed Aug 23, 2017 4:20 am
by lisazeng
Hi Bogdan,

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

thanks!

Lisa

Re: How can ordered list have 4 level lists?

Posted: Tue Jun 30, 2020 9:30 pm
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

Re: How can ordered list have 4 level lists?

Posted: Wed Jul 01, 2020 1:41 pm
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