AsciiDoc is a text document format for writing documentation, articles, manuals, books and UNIX man pages. AsciiDoc files can be translated to HTML and DocBook markups using the asciidoc(1) command. AsciiDoc is highly configurable: both the AsciiDoc source file syntax and the backend output markups (which can be almost any type of SGML/XML markup) can be customized and extended by the user.

1. Introduction

Plain text is the most universal electronic document format, no matter what computing environment you use, you can always read and write plain text documentation. But for many applications plain text is not a viable presentation format. HTML, PDF and roff (roff is used for man pages) are the most widely used UNIX presentation formats. DocBook is a popular UNIX documentation markup format which can be translated to HTML, PDF and other presentation formats.

AsciiDoc is a plain text human readable/writable document format that can be translated to DocBook or HTML using the asciidoc(1) command. You can then either use asciidoc(1) generated HTML directly or run asciidoc(1) DocBook output through your favorite DocBook toolchain or use the AsciiDoc a2x(1) toolchain wrapper to produce PDF, EPUB, DVI, LaTeX, PostScript, man page, HTML and text formats.

The AsciiDoc format is a useful presentation format in its own right: AsciiDoc files are unencumbered by markup and are easily viewed, proofed and edited.

AsciiDoc is light weight: it consists of a single Python script and a bunch of configuration files. Apart from asciidoc(1) and a Python interpreter, no other programs are required to convert AsciiDoc text files to DocBook or HTML. See Example AsciiDoc Documents below.

You write an AsciiDoc document the same way you would write a normal text document, there are no markup tags or arcane notations. Built-in AsciiDoc formatting rules have been kept to a minimum and are reasonably obvious.

Text markup conventions tend to be a matter of (often strong) personal preference: if the default syntax is not to your liking you can define your own by editing the text based asciidoc(1) configuration files. You can create your own configuration files to translate AsciiDoc documents to almost any SGML/XML markup.

asciidoc(1) comes with a set of configuration files to translate AsciiDoc articles, books or man pages to HTML or DocBook backend formats.

2. Getting Started

2.1. Installing AsciiDoc

See the README and INSTALL files for install prerequisites and procedures. Packagers take a look at Appendix B: Packager Notes.

2.2. Example AsciiDoc Documents

The best way to quickly get a feel for AsciiDoc is to view the AsciiDoc web site and/or distributed examples:

  • Take a look at the linked examples on the AsciiDoc web site home page http://www.methods.co.nz/asciidoc/. Press the Page Source sidebar menu item to view corresponding AsciiDoc source.

  • Read the .txt source files in the distribution ./doc directory in conjunction with the corresponding HTML and DocBook XML files.

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.

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; in addition there is the option to add level 0 book part sections.

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 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.

4. AsciiDoc Backends

The asciidoc(1) command translates an AsciiDoc formatted file to the backend format specified by the -b (--backend) command-line option. asciidoc(1) itself has little intrinsic knowledge of backend formats, all translation rules are contained in customizable cascading configuration files. Backend specific attributes are listed in Appendix H.

AsciiDoc ships with the following predefined backend output formats:

4.1. docbook

AsciiDoc generates the following DocBook document types: article, book and refentry (corresponding to the AsciiDoc article, book and manpage document types).

DocBook documents are not designed to be viewed directly. Most Linux distributions come with conversion tools (collectively called a toolchain) for converting DocBook files to presentation formats such as Postscript, HTML, PDF, EPUB, DVI, PostScript, LaTeX, roff (the native man page format), HTMLHelp, JavaHelp and text.

The AsciiDoc Preamble element generates a DocBook book preface.

4.2. xhtml11

The default asciidoc(1) backend is xhtml11 which generates XHTML 1.1 markup styled with CSS2. Default output file have a .html extension. xhtml11 document generation is influenced by the following optional attributes (the default behavior is to generate XHTML with no section numbers, embedded CSS and no linked admonition icon images):

4.2.1. Stylesheets

AsciiDoc XHTML output is styled using CSS2 stylesheets from the distribution ./stylesheets/ directory.

Important

All browsers have CSS quirks, but Microsoft’s IE6 has so many omissions and errors that the xhtml11-quirks.css stylesheet and xhtml11-quirks.conf configuration files are included during XHTML backend processing to to implement workarounds for IE6. If you don’t use IE6 then the quirks stylesheet and configuration files can be omitted using the --attribute quirks! command-line option.

Default xhtml11 stylesheets:

./stylesheets/xhtml11.css

The main stylesheet.

./stylesheets/xhtml11-manpage.css

Tweaks for manpage document type generation.

./stylesheets/xhtml11-quirks.css

Stylesheet modifications to work around IE6 browser incompatibilities.

Use the theme attribute to select an alternative set of stylesheets. For example, the command-line option -a theme=foo will use stylesheets foo.css, foo-manpage.css and foo-quirks.css instead of the default stylesheets.

Use the stylesheet attribute to include an additional stylesheet in XHTML documents. For example, the command-line option -a stylesheet=newsletter.css will use stylesheets newsletter.css.

4.3. html4

This backend generates plain (unstyled) HTML 4.01 Transitional markup.

5. Document Structure

An AsciiDoc document consists of a series of block elements starting with an optional document Header, followed by an optional Preamble, followed by zero or more document Sections.

Almost any combination of zero or more elements constitutes a valid AsciiDoc document: documents can range from a single sentence to a multi-part book.

5.1. Block Elements

Block elements consist of one or more lines of text and may contain other block elements.

The AsciiDoc block structure can be informally summarized as follows
[This is a rough structural guide, not a rigorous syntax definition]
:

Document      ::= (Header?,Preamble?,Section*)
Header        ::= (Title,(AuthorLine,RevisionLine?)?)
AuthorLine    ::= (FirstName,(MiddleName?,LastName)?,EmailAddress?)
RevisionLine  ::= (Revision?,Date)
Preamble      ::= (SectionBody)
Section       ::= (Title,SectionBody?,(Section)*)
SectionBody   ::= ((BlockTitle?,Block)|BlockMacro)+
Block         ::= (Paragraph|DelimitedBlock|List|Table)
List          ::= (BulletedList|NumberedList|LabeledList|CalloutList)
BulletedList  ::= (ListItem)+
NumberedList  ::= (ListItem)+
CalloutList   ::= (ListItem)+
LabeledList   ::= (ListEntry)+
ListEntry     ::= (ListLabel,ListItem)
ListLabel     ::= (ListTerm+)
ListItem      ::= (ItemText,(List|ListParagraph|ListContinuation)*)

Where:

  • ? implies zero or one occurrence, + implies one or more occurrences, * implies zero or more occurrences.

  • All block elements are separated by line boundaries.

  • BlockId, AttributeEntry and AttributeList block elements (not shown) can occur almost anywhere.

  • There are a number of document type and backend specific restrictions imposed on the block syntax.

  • The following elements cannot contain blank lines: Header, Title, Paragraph, ItemText.

  • A ListParagraph is a Paragraph with its listelement option set.

  • A ListContinuation is a list continuation element.

5.2. Header

The Header contains a document title plus optional authorship and revision information:

  • The Header is optional, but if it is used it must start with a document title.

  • The header can be preceded by comments and attribute entries.

  • Optional Author and Revision lines immediately follow the header title.

  • The header can include attribute entries.

  • The document header must be separated from the remainder of the document by one or more blank lines.

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Bloggs
Vincent Willem van_Gogh

The optional header revision line follows the author line. The revision line can be one of two formats:

  1. An optional document revision number followed by an optional revision date followed by an optional revision remark:

    • If the revision number is specified it must be followed by a comma.

    • The revision number must contain at least one numeric character.

    • Any non-numeric characters preceding the first numeric character will be dropped.

    • If a revision remark is specified it must be preceded by a colon. The revision remark extends from the colon up to the next blank line or attribute entry and is subject to normal text substitutions.

    • If a revision number or remark has been set but the revision date has not been set then the revision date is set to the value of the docdate attribute.

  2. An RCS/CSV/SVN $Id$ marker (if an $Id$ revision marker is used the header author line can be omitted).

Here a some examples of header revision lines:

v2.0, February 2003
February 2003
v2.0,
v2.0, February 2003: Rewritten for version 2 release.
February 2003: Rewritten for version 2 release.
v2.0,: Rewritten for version 2 release.
:Rewritten for version 2 release.

You can override or set header parameters by passing revnumber, revremark, revdate, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (--attribute) command-line option. For example:

$ asciidoc -a revdate=2004/07/27 article.txt

The revnumber attribute can be an RCS/CSV/SVN $Id$ marker. Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.

5.2.1. Additional document header information

DocBook defines numerous elements for document meta-data, for example: copyrights, document history and authorship information. The AsciiDoc header syntax provides for basic revision and author information — additional information such as copyrights, document history authorship details can be optionally included from a separate document information. The document information file can contain any DocBook elements that are allowed inside the DocBook articleinfo and bookinfo elements:

  • The document information file must be in the same directory as the source document and must be named like <docname>-docinfo.xml. For example, if the source document is called mydoc.txt then the document information file would be named mydoc-docinfo.xml.

  • The document information file will be included in the DocBook output if the docinfo attribute is defined, for example:

    $ asciidoc -a docinfo -b docbook mydoc.txt
  • See the ./doc/article-docinfo.xml example that comes with the AsciiDoc distribution.

  • Similarly AsciiDoc will include a docinfo file named like <docname>-docinfo.html (if it exists) into HTML backend outputs. In the case of HTML outputs however it’s usually easier to put AsciiDoc markup in your source file directly after the header.

Note
DocBook has a rich set of meta data elements, just how many of these elements are rendered is DocBook processor dependent.

5.3. Preamble

The Preamble is an optional untitled section body between the document Header and the first Section title.

5.4. Sections

In addition to the document title (level 0), AsciiDoc supports four section levels: 1 (top) to 4 (bottom). Section levels are delimited by section titles. Sections are translated using configuration file markup templates. AsciiDoc generates the following intrinsic attributes specifically for use in section markup templates:

level

The level attribute is the section level number, it is normally just the title level number (1..4). However, if the leveloffset attribute is defined it will be added to the level attribute. The leveloffset attribute is useful for combining documents.

sectnum

The -n (--section-numbers) command-line option generates the sectnum (section number) attribute. The sectnum attribute is used for section numbers in HTML outputs (DocBook section numbering are handled automatically by the DocBook toolchain commands).

5.4.1. Section markup templates

Section markup templates specify output markup and are defined in AsciiDoc configuration files. Section markup template names are derived as follows (in order of precedence):

  1. From the title’s first positional attribute or template attribute to the name of a configuration file template. For example, the following three section titles are functionally equivalent:

    [[terms]]
    [glossary]
    List of Terms
    -------------
    
    ["glossary",id="terms"]
    List of Terms
    -------------
    
    [template="glossary",id="terms"]
    List of Terms
    -------------
  2. When the title text matches a configuration file [specialsections] entry.

  3. If neither of the above the default sect<level> template is used (where <level> is a number from 1 to 4).

In addition to the normal section template names (sect1, sect2, sect3, sect4) AsciiDoc ha >

Here’s an example AsciiDoc document header:

Writing Documentation using AsciiDoc
====================================
Joe Bloggs <jbloggs@mymail.com>
v2.0, February 2003:
Rewritten for version 2 release.

The author line contains the author’s name optionally followed by the author’s email address. The author’s name consists of a first name followed by optional middle and last names separated by white space. Multi-word first, middle and last names can be entered in the header author line using the underscore as a word separator. The email address comes last and must be enclosed in angle <> brackets. Author names cannot contain angle <> bracket characters. Here a some examples of author lines:

Joe Bloggs <jbloggs@mymail.com>
Joe Blo