Multilevel nested ordered lists numbering

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Multilevel nested ordered lists numbering

Hoplop
Is it somehow possible to make ordered lists look similar to this example:

----
1. Level 1
2. Level 1
    2.1 Level 2
    2.2 Level 2
3. Level 1
    3.1 Level 2
          3.1.1 Level 3
          3.1.2 Level 3
...
----

I am particularly interesting in PDF output.
Reply | Threaded
Open this post in threaded view
|

Re: Multilevel nested ordered lists numbering

mojavelinux
Administrator
There's no built-in behavior to do that. You could, however, override the converter to provide your own formatting.


Best,

-Dan

On Mon, Sep 30, 2019 at 1:04 AM Hoplop [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Is it somehow possible to make ordered lists look similar to this example:

----
1. Level 1
2. Level 1
    2.1 Level 2
    2.2 Level 2
3. Level 1
    3.1 Level 2
          3.1.1 Level 3
          3.1.2 Level 3
...
----

I am particularly interesting in PDF output.


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Multilevel-nested-ordered-lists-numbering-tp7170.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Multilevel nested ordered lists numbering

Hoplop
Thanks for the reply. I'll try to extend converter, then.
Is there similar way to achieve such behavior for HTML output?
Reply | Threaded
Open this post in threaded view
|

Re: Multilevel nested ordered lists numbering

mojavelinux
Administrator
You can extend any converter. The mechanism is basically the same. The difference is that in the HTML converter, you return HTML.


Best,

-Dan

On Mon, Sep 30, 2019 at 1:15 AM Hoplop [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thanks for the reply. I'll try to extend converter, then.
Is there similar way to achieve such behavior for HTML output?


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Multilevel-nested-ordered-lists-numbering-tp7170p7172.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Multilevel nested ordered lists numbering

Alexander Schwartz
In reply to this post by Hoplop
For the HTML output you also have the choice of adding custom CSS.

I've answered a similar question on StackOverflow. Maybe this is close to what you are looking for: https://stackoverflow.com/questions/49189563/sublist-numbering-in-asciidoc/57244921#57244921

You can add CSS as either pass through content, or as a custom stylesheet that replaces the standard asciidoctor CSS stylesheet. See https://asciidoctor.org/docs/user-manual/#applying-a-theme for more information.
Alexander Schwartz (alexander.schwartz@gmx.net)
https://www.ahus1.de