Chapter 3. AsciiDoc Document Types

There are three types of AsciiDoc documents: article, book and manpage. All document types share the same AsciiDoc format with some minor variations. If you are familiar with DocBook you will have noticed that AsciiDoc document types correspond to the same-named DocBook document types.

Use the asciidoc(1) -d (--doctype) option to specify the AsciiDoc document type — the default document type is article.

By convention the .txt file extension is used for AsciiDoc document source files.

3.1. article

Used for short documents, articles and general documentation. See the AsciiDoc distribution ./doc/article.txt example.

AsciiDoc defines standard DocBook article frontmatter and backmatter section markup templates (appendix, abstract, bibliography, glossary, index).

3.2. book

Books share the same format as articles, with the following differences:

  • The part titles in multi-part books are top level titles (same level as book title).
  • Some sections are book specific e.g. preface and colophon.

Book documents will normally be used to produce DocBook output since DocBook processors can automatically generate footnotes, table of contents, list of tables, list of figures, list of examples and indexes.

AsciiDoc defines standard DocBook book frontmatter and backmatter section markup templates (appendix, dedication, preface, bibliography, glossary, index, colophon).

Example book documents

Book
The ./doc/book.txt file in the AsciiDoc distribution.
Multi-part book
The ./doc/book-multi.txt file in the AsciiDoc distribution.

3.3. manpage

Used to generate roff format UNIX manual pages. AsciiDoc manpage documents observe special header title and section naming conventions — see the Manpage Documents section for details.

AsciiDoc defines the synopsis section markup template to generate the DocBook refsynopsisdiv section.

See also the asciidoc(1) man page source (./doc/asciidoc.1.txt) from the AsciiDoc distribution.