asciidoc /usr/share/doc/asciidoc/article.txt
asciidoc /usr/share/doc/asciidoc/article.txt
-n, --section-numbers Auto-number HTML article section titles. Synonym for -a numbered.
asciidoc(1) can be used as a filter, so you can pipe chunks of text through it. For example:
$ echo 'Hello *World!*' | asciidoc -s - <p>Hello <strong>World!</strong></p>
The -s (-no-header-footer) command-line option suppresses header and footer output and is useful if the processed output is to be included in another file.
To print a help topic specify the topic name as a command argument. Examples:
$ asciidoc --help=manpage $ asciidoc --help=syntax
The asciidoc(1) -v (-verbose) command-line option displays the order of configuration file loading and warns of potential configuration file problems.
asciidoc [OPTIONS] FILE
OPTIONS
-a ATTRIBUTE, --attribute=ATTRIBUTE Define or delete document attribute. ATTRIBUTE is formatted like NAME=VALUE. Alternate acceptable forms are NAME (the VALUE defaults to an empty string) and NAME! (delete the NAME attribute). Values containing spaces should be enclosed in double-quote characters.
-b BACKEND, --backend=BACKEND Backend output file format: docbook, xhtml11 or html4. Defaults to xhtml11.
-f CONF_FILE, --conf-file=CONF_FILE Use configuration file CONF_FILE.
-d DOCTYPE, --doctype=DOCTYPE Document type: article, manpage or book. The book document type is only supported by the docbook backend. Default document type is article.
-c, --dump-conf Dump configuration to stdout.
-e, --no-conf Exclude implicitly loaded configuration files except for those named like the input file (infile.conf and infile-backend.conf).
-s, --no-header-footer Suppress document header and footer output.
-o OUT_FILE, --out-file=OUT_FILE Write output to file OUT_FILE. Defaults to the base name of input file with backend extension. If the input is stdin then the outfile defaults to stdout. If OUT_FILE is - then the standard output is used.
-n, --section-numbers Auto-number HTML article section titles. Synonym for -a numbered.
-v, --verbose Verbosely print processing information and configuration file checks to stderr.
-h [TOPIC], --help[=TOPIC] Print help TOPIC. --help topics will print a list of help topics, --help syntax summarises AsciiDoc syntax, --help manpage prints the AsciiDoc manpage.
--version Print program version number.
/usr/share/doc/asciidoc/examples/website/README-website.txt
The AsciiDoc website source is included in the AsciiDoc distribution (in ./examples/website/) as an example of using AsciiDoc to build a website.
A simple shell script (./examples/website/build-website.sh) will build the site's web pages — just set the LAYOUT variable to the desired layout.
#!/bin/sh VERS="7.1.0" DATE="2006-01-13" # Leave the desired layout uncommented. LAYOUT=layout1 # Tables based layout. #LAYOUT=layout2 # CSS based simulated frames layout. ASCIIDOC_HTML="python ../../asciidoc.py --unsafe --backend=xhtml11 \ --conf-file=${LAYOUT}.conf --attribute icons \ --attribute iconsdir=./images/icons --attribute=badges \ --attribute=revision=$VERS --attribute=date=$DATE" $ASCIIDOC_HTML --attribute=index-only index.txt $ASCIIDOC_HTML --attribute=numbered userguide.txt $ASCIIDOC_HTML --doctype=manpage manpage.txt $ASCIIDOC_HTML downloads.txt $ASCIIDOC_HTML README.txt $ASCIIDOC_HTML CHANGELOG.txt $ASCIIDOC_HTML README-website.txt $ASCIIDOC_HTML a2x.1.txt
You might have noticed that the distributed documentation files (for example ./doc/asciidoc.html) are not produced directly using the xhtml11 approach. They are produced using the DocBook backend. Moreover, they are not the plain outputs produced using default DocBook XSL Stylesheets configuration, because they have been processed using customized DocBook XSL Stylesheet drivers along with (in the case of HTML outputs) the custom ./stylesheets/docbook.css CSS stylesheet.
If you want to see how the complete documentation set is processed take a look at the A-A-P script ./doc/main.aap.
Basically, the user guide is first converted to a DocBook XML file, then to a single XHTML file:
$ asciidoc -b docbook asciidoc.txt $ xsltproc --nonet --stringparam html.stylesheet ./docbook-xsl.css \ ../docbook-xsl/xhtml.xsl asciidoc.xml > asciidoc.html
If using a DocBook XML toolchain is a big hurdles for your, a2x(1) can help — it's toolchain wrapper command that will generate XHTML (chunked and unchunked), PDF, man page, HTML Help and text file outputs from an AsciiDoc text file. a2x(1) does all the grunt work associated with generating and sequencing the toolchain commands and managing intermediate and output files. a2x(1) also optionally deploys admonition and navigation icons and a CSS stylesheet.