table of contents
A2X(1) | A2X(1) |
NAME¶
a2x - convert Asciidoc text file to PDF, XHTML, HTML Help, manpage or plain text
SYNOPSIS¶
a2x [OPTIONS] FILE
DESCRIPTION¶
A DocBook toolchain wrapper script that translates an AsciiDoc text file FILE to PDF, DVI, PS, LaTeX, XHTML (single page or chunked), man page, HTML Help or plain text formats. PDF, XHTML, man page and HTML Help formats are are generated using the asciidoc(1), xsltproc(1), DocBook XSL Stylesheets, dblatex (or FOP) toolchain. Plain text is produced by passing asciidoc(1) generated HTML through lynx(1). The htmlhelp format option generates .hhp, .hhc and .html files suitable for compilation to an HTML Help .chm file.
OPTIONS¶
-a, --attribute=ATTRIBUTE
--asciidoc-opts=ASCIIDOC_OPTS
--copy
-D, --destination-dir=PATH
-d, --doctype=DOCTYPE
-f, --format=FORMAT
-h, --help
--icons
--icons-dir=PATH
-L, --no-xmllint
-n, --dry-run
-s, --skip-asciidoc
--stylesheet=PATH
-v, --verbose
--unsafe
--version
--xsltproc-opts=XSLTPROC_OPTS
--fop
--fop-opts=FOP_OPTS
--dblatex-opts=DBLATEX_OPTS
OUTPUT FILES¶
Output files are written to the directory specified by the --destination-dir option. If no --destination-dir option is set output files are written to the source FILE directory.
Output files have the same name as the source FILE but with an appropriate file name extension: .html for xhtml; .hhp for htmlhelp; .pdf for pdf; .text for text. By convention manpages have no .man extension (man page section number only). Chunked HTML directory names have a .chunked extension; chunked HTML Help directory names have a .htmlhelp extension.
Same named existing files are overwritten.
Intermediate output files are written to the source FILE directory and are not automatically deleted.
Intermediate DocBook XML files generated by AsciiDoc are only regenerated if out of date with respect to the AsciiDoc source FILE.
In addition to generating HTML files the xhtml, chunked and htmlhelp formats copy the DocBook XSL stylesheet plus admonition and navigation icons distributed with AsciiDoc to their respective destination locations. Existing stylesheets and icons are only copied if they are newer than the destination files or if the destination files are missing.
The xhtml format generates a single XHTML output page. The chunked format writes multiple per-section HTML pages to a chunked directory in the destination directory. The chunked directory has the same name as the source FILE name plus a .chunked extension.
EXAMPLES¶
a2x -f pdf doc/source-highlight-filter.txt
a2x -f chunked -D ../webpages guide.txt
REQUISITES¶
This script runs under the bash(1) shell and requires the following programs (which may or may not be prepackaged with your Linux distribution):
Asciidoc
xsltproc
DocBook XSL Stylesheets
dblatex (for PDF, DVI, PostScript and LaTeX file generation)
FOP (alternative PDF file generation)
w3m (text file generation)
Lynx (used for text file generation if w3m(1) not installed)
See also the latest README file.BUGS¶
AUTHOR¶
Written by Stuart Rackham, <srackham@gmail.com>
RESOURCES¶
SourceForge: http://sourceforge.net/projects/asciidoc/
Main web site: http://www.methods.co.nz/asciidoc/
COPYING¶
Copyright (C) 2002-2009 Stuart Rackham. Free use of this software is granted under the terms of the GNU General Public License (GPL).
05/26/2009 |