- •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
$ python ../asciidoc.py -d manpage -b docbook asciidoc.1.txt $ xsltproc --nonet ../docbook-xsl/manpage.xsl asciidoc.1.xml
xhtml.xsl
Convert a DocBook XML file to a single XHTML file. For example:
$ python ../asciidoc.py -b docbook asciidoc.txt
$ xsltproc --nonet ../docbook-xsl/xhtml.xsl asciidoc.xml > asciidoc.html
If you want to see how the complete documentation set is processed take a look at the A-A-P script
./doc/main.aap.
FOP
XSL Stylesheets can be used to generate FO (Formatting Object) files, which in turn can be used to produce PDF files using the Apache Formatting Object Processor program (FOP). The FOP home page is at http://xml.apache.org/fop/.
As of version 0.20.5 installation and configuration of FOP is a manual process. You also need a working Java Runtime to run FOP. You'll find FOP and Java installation information in the appendices.
Tip
Once you've got FOP installed use the AsciiDoc a2x(1) toolchain wrapper to generate PDF files from AsciiDoc source.
Generating Plain Text Files
AsciiDoc does not have a text backend (for most purposes AsciiDoc source text is fine), however you can convert AsciiDoc text files to formatted text using the AsciiDoc a2x(1) toolchain wrapper utility.
XML and Character Sets
The default XML character set UTF-8 is used when AsciiDoc generates DocBook files but this can be changed by setting the xmldecl entry in the [attributes] section of the docbook.conf file or by composing your own configuration file [header] section).
Tip
If you get an undefined entity error when processing DocBook files you'll may find that you've used an undefined HTML character entity. An easy (although inelegant) fix is to use the character's character code instead of it's symbolic name (for example use instead of
).
If your system has been configured with an XML catalog you may find a number of entity sets are already automatically included.
70