Title Page

The Asciidoctor PDF converter introduces a dedicated title page at the start of the document. The title page contains the doctitle, author, date, and revision info. The title page can be styled using the theme and reserved page attributes.

Activate the title page

The title page is enabled if one of these conditions is met:

  • the doctype document attribute is set to book, or

  • the title-page document attribute is set with an empty value in the document header.

The title page is only enabled by default for the book doctype. The doctype is set and assigned book either in the document header or using the CLI.

= Document Title
:doctype: book

To force the title page to be used for other doctypes, set the title-page attribute in the document header.

= Document Title

If a front cover image is specified, the title page comes after the front cover. When the title page is enabled, the table of contents also gets its own page (or pages, if necessary).

Deactivate with notitle attribute

For documents that declare the book doctype, the title page can be omitted by setting the notitle attribute in the AsciiDoc document header. (Its counterpart, :!showtitle:, does not work with Asciidoctor PDF.)

= Document Title
:doctype: book

The title page can also be deactivated from the theme by setting the value of the title-page category key to false. For all other doctypes, the title page is not added by default. In that case, setting the :notitle: attribute only removes the document title from the first page of content.

Background image

You can place a background image on the title page using the title-page-background-image document attribute.

= Document Title
Author Name
:title-page-background-image: image:title-bg.png[]

By default, page background images are automatically scaled to fit the bounds of the page (i.e., fit=contain) and centered (i.e., position=center). See Background Images to learn more.

You can place a logo image on the title page using the title-logo-image document attribute. Using an inline image macro, you can specify attributes to position and resize the image. The special top attribute is recognized in this context for setting the vertical position of the image.

= Document Title
Author Name
:title-logo-image: image:logo.png[top=25%,align=center,pdfwidth=0.5in]

The value of the top attribute is the distance from the top of the content area (just below the top margin). It can either be a fixed value (e.g., 1in) or relative value (10%). A fixed value is converted to a point value. A percentage value is multiplied by the height of the content area (the area inside the top and bottom margins). The advantage of a fixed value is that it gives you precision. The advantage of a relative value is that it automatically adjusts for different page sizes.