How to create a subtitle for a level 0 heading?

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

How to create a subtitle for a level 0 heading?

ysb33r
What I would like to do is create a subtitle for a book. For instance

     Agile Documentation
     Leveraging the power of Asciidoctor

Just doing

  = Agile Documentation
     Leveraging the power of Asciidoctor
  :doctype: book

will not work.
 
Is there any way by which this possible at present?
Reply | Threaded
Open this post in threaded view
|

Re: How to create a subtitle for a level 0 heading?

mojavelinux
Administrator
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:


This feature is not yet documented in the user manual. (See https://github.com/asciidoctor/asciidoctor.org/issues/297)

Cheers,

-Dan



On Tue, Sep 2, 2014 at 9:20 AM, ysb33r [via Asciidoctor :: Discussion] <[hidden email]> wrote:
What I would like to do is create a subtitle for a book. For instance

     Agile Documentation
     Leveraging the power of Asciidoctor

Just doing

  = Agile Documentation
     Leveraging the power of Asciidoctor
  :doctype: book

will not work.
 
Is there any way by which this possible at present?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-to-create-a-subtitle-for-a-level-0-heading-tp2102.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: How to create a subtitle for a level 0 heading?

ysb33r
Awesome. I actually found out last night about it when going through the asciidoctor-pdf issue list