I need to display a list with this exact format:
1. First item
1.1. Subitem
1.1.1. Sub-subitem
1.1.2. Sub-subitem
1.2. Subitem
2. Second item
...
Is there a way to achieve this using asciidoc?
The closer way I found is using horizontal labeled lists, but the rendering differs from a normal numbered list.
If you want CSS to do the Job of numbering, you an apply this solution to Asciidoctor
++++
<style>
ol {
list-style-type: none;
counter-reset: item;
margin: 0;
padding: 0;
}
ol > li {
display: table;
counter-increment: item;
margin-bottom: 0.6em;
}
ol > li:before {
content: counters(item, ".") ". ";
display: table-cell;
padding-right: 0.6em;
}
li ol > li {
margin: 0;
}
li ol > li:before {
content: counters(item, ".") " ";
}
</style>
++++
. First item
.. Subitem
... Sub-subitem
... Sub-subitem
.. Subitem
. Second item
Will produce

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With