How to declare custom prefix to the sections in asciidoc?

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

How to declare custom prefix to the sections in asciidoc?

siddjain
Hello,

I am writing a book in asciidoc. I want to declare a custom prefix that I would like to be used for the sections in my appendices. E.g., if my prefix is P, I want sections to be numbered as:

Appendix P
  P.1 Subsection 1

How can I do this? Also how to so the same thing for a normal chapter in the book?

Sid
Reply | Threaded
Open this post in threaded view
|

Re: How to declare custom prefix to the sections in asciidoc?

mojavelinux
Administrator
You'd need to either use an extension (such as a tree processor) or extend the converter. This is not something the AsciiDoc language supports by default.

Best Regards,

-Dan

On Fri, Apr 3, 2020 at 4:55 PM siddjain [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

I am writing a book in asciidoc. I want to declare a custom prefix that I would like to be used for the sections in my appendices. E.g., if my prefix is P, I want sections to be numbered as:

Appendix P
  P.1 Subsection 1

How can I do this? Also how to so the same thing for a normal chapter in the book?

Sid


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/How-to-declare-custom-prefix-to-the-sections-in-asciidoc-tp7826.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