Parts and Chapters

Book parts

Parts can only be used when the document type is book. There is no dedicated doctype for a multi-part book to distinguish it from a regular book. That distinction is made by the section levels you use.

Parts are specified by a level 0 section (=). Each part must contain at least one section (a chapter or special section). You can insert optional introduction content beneath in the part section prior to the first section.

Special sections for parts

A part can have its own preface, bibliography, glossary and index.

= Book Title
:doctype: book

= Forward

This is the preface for the whole book.

= Part 1

This is the introduction to the first part of our mud-encrusted journey.

== Chapter 1

There was mud...

== Chapter 2

Great gobs of mud...

== Part 1 Glossary

mud:: wet, cold dirt

= Part 2

== Part 2 Preface

This is a preface for part 2.

== Chapter 3

The mud had turned to cement...

Part numbers

Book parts are assigned roman numerals when the attribute partnums is set.

= The Secret Manual
:doctype: book

= Defensive Operations

== An Introduction to DefenceOps

= Managing Werewolves

When rendered, part numbers are displayed as roman numerals.

I. Defensive Operations
1. An Introduction to DefenceOps
II. Managing Werewolves

Chapter labels (Asciidoctor PDF only)

When using Asciidoctor PDF and the document type is book, level 1 section titles (==) are automatically prefixed with Chapter, then the autogenerated chapter number, followed by the title. For example:

Chapter 1: Title

You can modify the chapter label by defining the chapter-label attribute.

:chapter-label: Peat├╝kk

The chapter-label value should be followed by a space to separate the autogenerated number from the label. To remove the label, unset the attribute (:chapter-label!:).