Section title (level 1) 

Section title (level 2) 

Section title (level 3) 

Section title (level 4) 
= Document Title (level 0)
ERROR: only book doctypes can contain level 0 sections

Paragraphs 

Default Paragraph, Literal Paragraph, & Admonition Paragraphs

Default Paragraph

A Default paragraph ([paradef-default]) consists of one or more non-blank lines of text. The first line must start hard against the left margin (no intervening white space). The processing expectation of the default paragraph type is that of a normal paragraph of text.

The verse paragraph style is useful for lyrics and poems. For example:

[verse]
Consul *necessitatibus* per id,
consetetur, eu pro everti postulant
homero verear ea mea, qui.

Renders:

Consul necessitatibus per id,
consetetur, eu pro everti postulant
homero verear ea mea, qui.

Literal Paragraph

A Literal paragraph ([paradef-literal]) consists of one or more lines of text, where the first line is indented by one or more space or tab characters. Literal paragraphs are rendered verbatim in a monospaced font usually without any distinguishing background or border. There is no text formatting or substitutions within Literal paragraphs apart from Special Characters and Callouts.

  Note that only the first line need to be indented. I.e., the whole
paragraph will be considered a Literal Paragraph if merely the first
line is indented, like this paragraph.

Admonition Paragraphs

Tip, Note, Important, Warning and Caution paragraph definitions support the corresponding DocBook admonishment elements — just write a normal paragraph but place NOTE:, TIP:, IMPORTANT:, WARNING: or CAUTION: as the first word of the paragraph. For example:

NOTE: This is an example note.

or the alternative syntax:

[NOTE]
This is an example note.

Renders:

[Note]

This is an example note.

[Caution]

Admonition accept only single paragraphs.

[Tip]

If your admonition is more than a single paragraph use an admonition block instead.

Comment Lines

Single lines starting with two forward slashes hard up against the left margin are treated as comments and are stripped from the output. Comment lines have been implemented as a block macro and are only valid in a block context — they are not treated as comments inside paragraphs or delimited blocks. Example comment line:

// This is a comment.

See also Comment Blocks.

Delimited blocks 

Predefined delimited block underlines:

CommentBlock:  //////////////////////////
BackendBlock:  ++++++++++++++++++++++++++
ListingBlock:  --------------------------
LiteralBlock:  ..........................
SidebarBlock:  **************************
QuoteBlock:    __________________________

Table 1. Default DelimitedBlock substitutions

Backend Listing Literal Sidebar Quote
Callouts No Yes Yes No No
Attributes Yes No No Yes Yes
Inline Macros Yes No No Yes Yes
Quotes No No No Yes Yes
Replacements No No No Yes Yes
Special chars No Yes Yes Yes Yes
Special words No No No Yes Yes

Delimiters must begin at left margin.

-------------------
listing block
-------------------
listing block

ListingBlocks are rendered verbatim in a monospaced font, they retain line and whitespace formatting and often distinguished by a background or border. There is no text formatting or substitutions within Listing blocks apart from Special Characters and Callouts. Listing blocks are often used for code and file listings.

...................
literal block
...................
literal block

LiteralBlocks can be used to resolve list ambiguity. If the following
list was just indented it would be processed as an ordered list (not
an indented paragraph):

1. Item 1
2. Item 2

LiteralBlocks behave just like LiteralParagraphs except you don't have to indent the contents.

*******************
sidebar block
*******************
[author, source]            (optional)
___________________
quote block
___________________
 

quote block

 
 -- author source
 

A good notation has subtlety and suggestiveness which at times makes it almost seem like a live teacher.

 
 -- Bertrand Russell The World of Mathematics (1956)
///////////////////
comment block
///////////////////

Admonition Blocks

The ExampleBlock definition includes a set of admonition styles (NOTE, TIP, IMPORTANT, WARNING, CAUTION) for generating admonition blocks (admonitions containing more than just a simple paragraph). Just precede the ExampleBlock with an attribute list containing the admonition style name. For example:

[NOTE]
.A NOTE block
=====================================================================
Qui in magna commodo, est labitur dolorum an. Est ne magna primis
adolescens.

. Fusce euismod commodo velit.
. Vivamus fringilla mi eu lacus.
  .. Fusce euismod commodo velit.
  .. Vivamus fringilla mi eu lacus.
. Donec eget arcu bibendum
  nunc consequat lobortis.
=====================================================================

[IMPORTANT]
=====================================================================
This block is very important.

This block is very important.
=====================================================================

Renders:

[Note]A NOTE block

Qui in magna commodo, est labitur dolorum an. Est ne magna primis adolescens.

  1. Fusce euismod commodo velit.
  2. Vivamus fringilla mi eu lacus.

    1. Fusce euismod commodo velit.
    2. Vivamus fringilla mi eu lacus.
  3. Donec eget arcu bibendum nunc consequat lobortis.
[Important]

This block is very important.

This block is very important.

More block elements 

[attributes list]           (Note 1)
.Block title                (Note 1)
// Comment line             (Note 1)
include::filename[]         (Note 1)

Note 1: Begin at the left margin.

BlockTitles 

A BlockTitle element is a single line beginning with a period followed by a title. The title is applied to the next Paragraph, DelimitedBlock, List, Table or BlockMacro. For example:

.Notes
- Note 1.
- Note 2.

is rendered as:

Notes

  • Note 1.
  • Note 2.

BlockId Element 

A BlockId is a single line block element containing a unique identifier enclosed in double square brackets. It is used to assign an identifier to the ensuing block element for use by referring links. For example:

[[chapter-titles]]
Chapter titles can be ...

Chapter titles can be …

The preceding example identifies the following paragraph so it can be linked from other location, for example with <<chapter-titles,chapter titles>> chapter titles.

BlockId elements can be applied to Title, Paragraph, List, DelimitedBlock, Table and BlockMacro elements. The BlockId element is really just an AttributeList with a special syntax which sets the {id} attribute for substitution in the subsequent block's markup template.

The BlockId element has the same syntax and serves a similar function to the anchor inline macro.

More inline elements 

footnote:[footnote text]    (document footnote)

Document links 

[[id]]                      (define link target)
<<id,caption>>              (link to target id)
link:filename#id[caption]   (link to external HTML file)

URLs 

http:address[caption]       (link to web page)
mailto:address[caption]     (link to mail recipient)

Images 

image:filename[caption]     (inline image)
image::filename[caption]    (block image)