Re: How to create a subtitle for a level 0 heading?
Administrator
2681 posts
I have good news. Asciidoctor has support for this use case!
What you are looking for is the colon delimiter. Asciidoctor splits the title on the *last* colon in the title. At present, Asciidoctor doesn't show the subtitle on a separate line in the HTML backend, but it does put the subtitle inside a <subtitle> element in the docbook backend and renders it on a separate line in the epub3 backend. Support for the subtitle is planned for Asciidoctor PDF, but not yet implemented.
[source,asciidoc]
----
= Agile Documentation: Leveraging the power of Asciidoctor :doctype: book
----
In the future, we plan to make subtitle support even more sophisticated, but this should get you what you need for now.
Note that Asciidoctor 1.5.0 also introduced an API for extracting the primary title and subtitle. See the following line of code: