- •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
Here's an example AsciiDoc document header:
Writing Documentation using AsciiDoc
====================================
Stuart Rackham <srackham@methods.co.nz> v2.0, February 2003
You can override or set header parameters by passing revision, data, email, author, authorinitials, firstname and lastname attributes using the asciidoc(1) -a (—attribute) command-line option. For example:
$ asciidoc -a date=2004/07/27 article.txt
Attributes can also be added to the header for substitution in the header template with Attribute Entry elements.
Preamble
The Preamble is an optional untitled section body between the document Header and the first Section title.
Sections
AsciiDoc supports five section levels 0 to 4 (although only book documents are allowed to contain level 0 sections). Section levels are delineated by the section titles.
Sections are translated using configuration file markup templates. To determine which configuration file template to use AsciiDoc first searches for special section titles in the [specialsections] configuration entries, if not found it uses the [sect<level>] template.
The -n (—section-numbers) command-line option auto-numbers HTML outputs (DocBook line numbering is handled automatically by the DocBook toolchain commands).
Special Sections
In addition to normal sections, documents can contain optional frontmatter and backmatter sections — for example: preface, bibliography, table of contents, index.
The AsciiDoc configuration file [specialsections] section specifies special section titles and the corresponding backend markup templates.
[specialsections] entries are formatted like:
<pattern>=<name>
<pattern> is a Python regular expression and <name> is the name of a configuration file markup template section. If the <pattern> matches an AsciiDoc document section title then the backend output is marked up using the <name> markup template (instead of the default sect<level> section template). The {title} attribute value is set to the value of the matched regular expression group named title, if there is no title group {title} defaults to the the whole of the AsciiDoc section title.
AsciiDoc comes preconfigured with the following special section titles:
11