
- •AsciiDoc User Guide
- •Table of Contents
- •Introduction
- •Getting Started
- •Installing the AsciiDoc tarball distribution
- •Example AsciiDoc Documents
- •AsciiDoc Document Types
- •article
- •book
- •manpage
- •AsciiDoc Backends
- •docbook
- •xhtml11
- •Stylesheets
- •html4
- •linuxdoc
- •Document Structure
- •Block Elements
- •Header
- •Preamble
- •Sections
- •Special Sections
- •Inline Elements
- •Document Processing
- •Text Formatting
- •Quoted Text
- •Inline Passthroughs
- •Superscripts and Subscripts
- •Line Breaks (HTML/XHTML)
- •Rulers (HTML/XHTML)
- •Tabs
- •Replacements
- •Special Words
- •Titles
- •Two line titles
- •One line titles
- •BlockTitles
- •BlockId Element
- •Paragraphs
- •Default Paragraph
- •Literal Paragraph
- •Admonition Paragraphs
- •Admonition Icons and Captions
- •Delimited Blocks
- •Predefined Delimited Blocks
- •Listing Blocks
- •Literal Blocks
- •SidebarBlocks
- •Comment Blocks
- •Passthrough Blocks
- •Quote Blocks
- •Example Blocks
- •Admonition Blocks
- •Lists
- •Bulleted and Numbered Lists
- •Vertical Labeled Lists
- •Horizontal Labeled Lists
- •Question and Answer Lists
- •Glossary Lists
- •Bibliography Lists
- •List Item Continuation
- •List Block
- •Footnotes
- •Indexes
- •Callouts
- •Implementation Notes
- •Macros
- •Inline Macros
- •URLs
- •Internal Cross References
- •anchor
- •xref
- •Linking to Local Documents
- •Images
- •Block Macros
- •Block Identifier
- •Images
- •Comment Lines
- •System Macros
- •Include Macros
- •Conditional Inclusion Macros
- •eval, sys and sys2 System Macros
- •Template System Macro
- •Macro Definitions
- •Tables
- •Example Tables
- •AsciiDoc Table Block Elements
- •Ruler
- •Row and Data Elements
- •Underline
- •Attribute List
- •Markup Attributes
- •Manpage Documents
- •Document Header
- •The NAME Section
- •The SYNOPSIS Section
- •Configuration Files
- •Configuration File Format
- •Markup Template Sections
- •Special Sections
- •Miscellaneous
- •Titles
- •Tags
- •Attributes Section
- •Special Characters
- •Quoted Text
- •Special Words
- •Replacements
- •Configuration File Names and Locations
- •Document Attributes
- •Attribute Entries
- •Attribute Lists
- •Macro Attribute lists
- •AttributeList Element
- •Attribute References
- •Simple Attributes References
- •Conditional Attribute References
- •Conditional attribute examples
- •System Attribute References
- •Intrinsic Attributes
- •Block Element Definitions
- •Styles
- •Paragraphs
- •Delimited Blocks
- •Lists
- •Tables
- •Filters
- •Filter Search Paths
- •Filter Configuration Files
- •Code Filter
- •Converting DocBook to other file formats
- •a2x Toolchain Wrapper
- •Toolchain Components
- •AsciiDoc DocBook XSL Drivers
- •Generating Plain Text Files
- •XML and Character Sets
- •PDF Fonts
- •Help Commands
- •Customizing Help
- •Tips and Tricks
- •Know Your Editor
- •Vim Commands for Formatting AsciiDoc
- •Text Wrap Paragraphs
- •Format Lists
- •Indent Paragraphs
- •Troubleshooting
- •Gotchas
- •Combining Separate Documents
- •Processing Document Sections Separately
- •Processing Document Chunks
- •Badges in HTML Page Footers
- •Pretty Printing AsciiDoc Output
- •Supporting Minor DocBook DTD Variations
- •Shipping Stand-alone AsciiDoc Source
- •Inserting Blank Space
- •Closing Open Sections
- •Validating Output Files
- •Glossary
- •A. Migration Notes
- •Version 6 to version 7
- •B. Packager Notes
- •C. AsciiDoc Safe Mode
- •E. Installing FOP on Linux
- •F. Installing Java on Windows
- •G. Installing Java on Linux

AsciiDoc User Guide
<value> is substituted if the attribute <name> is defined otherwise the undefined attribute entry causes the containing line to be dropped. <value> can contain simple attribute references.
{<name>%<value>}
<value> is substituted if the attribute <name> is not defined otherwise the containing line is dropped. <value> can contain simple attribute references.
{<name>@<regexp>:<value1>[:<value2>]}
<value1> is substituted if the value of attribute <name> matches the regular expression <regexp> otherwise <value2> is substituted. If attribute <name> is not defined the containing line is dropped. If <value2> is omitted an empty string is assumed. The values and the regular expression can contain simple attribute references. To embed colons in the values or the regular expression escape them with backslashes.
{<name>$<regexp>:<value1>[:<value2>]}
Same behaviour as the previous ternary attribute except for the following cases:
{<name>$<regexp>:<value>}
Substitutes <value> if <name> matches <regexp> otherwise the result is undefined and the containing line is dropped.
{<name>$<regexp>::<value>}
Substitutes <value> if <name> does not match <regexp> otherwise the result is undefined and the containing line is dropped.
Conditional attribute examples
Conditional attributes are mainly used in AsciiDoc configuration files — see the distribution .conf files for examples.
Attribute equality test
If {backend} is docbook or xhtml11 the example evaluates to “DocBook or XHTML backend” otherwise it evaluates to “some other backend”:
{backend@docbook|xhtml11:DocBook or XHTML backend:some other backend}
Attribute value map
This example maps the frame attribute values [topbot, all, none, sides] to [hsides, border, void, vsides]:
{frame@topbot:hsides}{frame@all:border}{frame@none:void}{frame@sides:vsides}
System Attribute References
System attribute references generate the attribute text value by executing a predefined action that is parameterized by a single argument. The syntax is {<action>:<argument>}.
{eval:<expression>}
Substitutes the result of the Python <expression>. If <expression> evaluates to None or False the
58