53
AsciiDoc User Guide
19 / 88
14.1 Attribute value substitution
By default, onlysubstitutions that takeplace insideattributelistvaluesareattributereferences, this is because not all attributes are
destined to be marked up and rendered as text (for example the table cols attribute). To perform normal inline text substitutions
(special characters, quotes, macros, replacements) on an attribute value you need to enclose it in single quotes. In the following
quote block the second attribute value in the AttributeList is quoted to ensure the http macro is expanded to a hyperlink.
[quote,’http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]’]
_____________________________________________________________________
Sir, a woman’s preaching is like a dog’s walking on his hind legs. It
is not done well; but you are surprised to find it done at all.
_____________________________________________________________________
14.2 Common attributes
Most block elements support the following attributes:
Name
Backends
Description
id
html4, html5,
xhtml11,
docbook
Unique identifier typically serve as link targets. Can also be set by the BlockId
element.
role
html4, html5,
xhtml11,
docbook
Role contains a string used to classify or subclassify an element and can be applied
to AsciiDoc block elements. The AsciiDoc role attribute is translated to the role
attribute in DocBook outputs and is includedin the class attribute in HTML
outputs, inthis respect it behaves like thequotedtextroleattribute.
DocBook XSL Stylesheets translate DocBook role attributes to HTML class
attributes; CSS can then be usedtostylethegeneratedHTML .
reftext
docbook
reftext is used to set the DocBook xreflabel attribute. The reftext attribute can an
also be set by the BlockId element.
15 Paragraphs
Paragraphs are blocks of text terminated by a blank line, the end of file, or the start of a delimited block or a list. There are three
paragraph syntaxes: normal, indented (literal) and admonition which are rendered, by default, with the corresponding paragraph
style.
Each syntax has a default style, but you can explicitly apply any paragraph style to any paragraph syntax. You can also apply
delimited blockstylestosingleparagraphs.
The built-in paragraph styles are: normal, literal, verse, quote, listing, TIP, NOTE, IMPORTANT, WARNING, CAUTION, ab-
stract, partintro, comment, example, sidebar, source, music, latex, graphviz.
15.1 normal paragraph syntax
Normal paragraphsyntax consists of one or more non-blank lines of text. The first line must starthard against the left margin(no
intervening white space). The default processing expectation is that of a normal paragraph of text.
15.2 literal paragraph syntax
Literal paragraphs are rendered verbatim in a monospaced font without any distinguishing background or border. By default
there is no text formatting or substitutions within Literal paragraphs apart from Special Characters and Callouts.
The literal style is applied implicitly to indented paragraphs i.e. where the first line of the paragraph is indented by one or more
space or tab characters. For example: