Words and phrases can be formatted by enclosing inline text with quote characters:
Monospaced text
Quoted text behavior
Quoted text can be prefixed with an attribute list:
[role="foo"]'Hello World' generates this DocBook:
<phrase role="foo"><emphasis>Hello World</emphasis></phrase> and
this HTML: <span class="foo"><em>Hello World</em></span>
You can set the font color, background color and size using the first three positional attribute arguments (HTML outputs only). The first argument is the text color; the second the background color; the third is the font size. Colors are valid CSS colors and the font size is a number which treated as em units. Here are some examples:
[red]#Red text#. [,yellow]*bold text on a yellow background*. [blue,#b0e0e6]+Monospaced blue text on a light blue background+ [,,2]#Double sized text#.
New quotes can be defined by editing asciidoc(1) configuration files.
See the Configuration Files section for details.
There are actually two types of quotes:
Quoted must be bounded by white space or commonly adjoining punctuation characters. These are the most commonly used type of quote.
Unconstrained quotes have no boundary constraints and can be placed
anywhere within inline text. For consistency and to make them easier
to remember unconstrained quotes are double-ups of the _, *, +
and # constrained quotes:
__unconstrained emphasized text__ **unconstrained strong text** ++unconstrained monospaced text++ ##unconstrained unquoted text##
The following example emboldens the letter F:
**F**ile Open...
Put ^carets on either^ side of the text to be superscripted, put ~tildes on either side~ of text to be subscripted. For example, the following line:
e^πi^+1 = 0. H~2~O and x^10^. Some ^super text^ and ~some sub text~
Is rendered like:
eπi+1 = 0. H2O and x10. Some super text and some sub text
Superscripts and subscripts are implemented as unconstrained quotes and they can be escaped with a leading backslash and prefixed with with an attribute list.
A plus character preceded by at least one space character at the end
of a non-blank line forces a line break. It generates a line break
(br) tag for HTML outputs and a custom XML asciidoc-br processing
instruction for DocBook outputs. The asciidoc-br processing
instruction is handled by a2x(1).
A line of three or more less-than (<<<) characters will generate a
hard page break in DocBook and printed HTML outputs. It uses the CSS
page-break-after property for HTML outputs and a custom XML
asciidoc-pagebreak processing instruction for DocBook outputs. The
asciidoc-pagebreak processing instruction is handled by
a2x(1). Hard page breaks are sometimes handy but as a general
rule you should let your page processor generate page breaks for you.
A line of three or more apostrophe characters will generate a ruler
line. It generates a ruler (hr) tag for HTML outputs and a custom
XML asciidoc-hr processing instruction for DocBook outputs. The
asciidoc-hr processing instruction is handled by a2x(1).
By default tab characters input files will translated to 8 spaces. Tab
expansion is set with the tabsize entry in the configuration file
[miscellaneous] section and can be overridden in included files by
setting a tabsize attribute in the include macro’s attribute list.
For example:
include::addendum.txt[tabsize=2]
The tab size can also be set using the attribute command-line option,
for example --attribute tabsize=4
The following replacements are defined in the default AsciiDoc configuration:
(C) copyright, (TM) trademark, (R) registered trademark, -- em dash, ... ellipsis, -> right arrow, <- left arrow, => right double arrow, <= left double arrow.
Which are rendered as:
© copyright, ™ trademark, ® registered trademark, — em dash, … ellipsis, → right arrow, ← left arrow, ⇒ right double arrow, ⇐ left double arrow.
You can also include arbitrary entity references in the AsciiDoc source. Examples:
➊ ¶
renders:
➊ ¶
To render a replacement literally escape it with a leading back-slash.
The Configuration Files section explains how to configure your own replacements.
Words defined in [specialwords] configuration file sections are
automatically marked up without having to be explicitly notated.
The Configuration Files section explains how to add and replace special words.