
- •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
PDF Fonts
The Adobe PDF Specification states that the following 14 fonts should be available to every PDF reader: Helvetica (normal, bold, italic, bold italic), Times (normal, bold, italic, bold italic), Courier (normal, bold, italic, bold italic), Symbol and ZapfDingbats. Non-standard fonts should be embedded in the distributed document.
Help Commands
The asciidoc(1) command has a --help option which prints help topics to stdout. The default topic summarizes asciidoc(1) usage:
$ asciidoc --help
To print a list of help topics:
$ asciidoc --help=topics
To print a help topic specify the topic name as a command argument. Examples:
$ asciidoc --help=manpage $ asciidoc --help=syntax
Customizing Help
To change, delete or add your own help topics edit a help.conf file. The file location will depend on whether you want the topics to apply to all users, to a single user or to a single project.
Help topics are stored help.conf text files. The help topic files have the same named section format as other configuration files. The help.conf files are stored in the same locations and loaded in the same order as other configuration files.
When the a --help command-line option is specified AsciiDoc loads the help.conf files and then prints the contents of the section whose name matches the help topic name. If a topic name is not specified default is used. If a matching help file section is not found a list of available topics is printed.
Tips and Tricks
Know Your Editor
Writing AsciiDoc documents will be a whole lot more pleasant if you know your favorite text editor. Learn how to indent and reformat text blocks, paragraphs, lists and sentences. Tips for vim users follow.
Vim Commands for Formatting AsciiDoc
The Vim text editor's gq command is great for reformatting and indenting AsciiDoc paragraphs and lists.
Tip
71

AsciiDoc User Guide
The Vim website (http://www.vim.org) has a wealth of resources, including scripts for automated spell checking and ASCII Art drawing.
Text Wrap Paragraphs
Use the vim :gq command to reformat paragraphs. Setting the textwidth sets the right text wrap margin; for example:
:set textwidth=70
To reformat a paragraph:
1.Position the cursor at the start of the paragraph.
2.Type gq}.
Execute :help gq command to read about the vim gq command.
Tip
Put set commands in your ~/.vimrc file so you don't have to enter them manually.
Format Lists
The :gq command can also be used to format bulleted and numbered lists. First you need to:
1.Set the textwidth right wrap margin.
2.Set the formatoptions n flag to enable numbered list reformatting (this flag also requires the autoindent option be set).
3.Add fb:*,fb:.,fb:+,fb:> to the comments option to assist the Vim :gq command reformat the AsciiDoc bulleted and numbered lists (in the example the C style comments middle part (mb:*) has been dropped to avoid ambiguity). Run the vim :help format-comments command for more about reformatting).
For example:
:set textwidth=70 formatoptions=tcqn autoindent
:set comments=s1:/*,ex:*/,://,b:#,:%,fb:-,fb:*,fb:.,fb:+,fb:>
Now you can format simple lists that use dash, asterisk, period and plus bullets along with numbered ordered lists:
1.Position the cursor at the start of the list.
72