From d3c4cf1b36b132a2fc6f79970b32046ac4eaeef9 Mon Sep 17 00:00:00 2001 From: Evan Martin Date: Sat, 16 Feb 2013 17:13:10 -0800 Subject: move from asciidoc html to asciidoc -> docbook -> html As best as I can tell this is the easiest way to customize the asciidoc HTML output. --- configure.py | 11 ++++++++--- doc/docbook.xsl | 17 +++++++++++++++++ doc/style.css | 29 +++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 doc/docbook.xsl create mode 100644 doc/style.css diff --git a/configure.py b/configure.py index dc6bfb9..10c6994 100755 --- a/configure.py +++ b/configure.py @@ -397,9 +397,14 @@ n.newline() n.comment('Generate the manual using asciidoc.') n.rule('asciidoc', - command='asciidoc -a toc -a max-width=45em -o $out $in', - description='ASCIIDOC $in') -manual = n.build(doc('manual.html'), 'asciidoc', doc('manual.asciidoc')) + command='asciidoc -b docbook -d book -o $out $in', + description='ASCIIDOC $out') +n.rule('xsltproc', + command='xsltproc --nonet doc/docbook.xsl $in > $out', + description='XSLTPROC $out') +xml = n.build(built('manual.xml'), 'asciidoc', doc('manual.asciidoc')) +manual = n.build(doc('manual.html'), 'xsltproc', xml, + implicit=doc('style.css')) n.build('manual', 'phony', order_only=manual) n.newline() diff --git a/doc/docbook.xsl b/doc/docbook.xsl new file mode 100644 index 0000000..8afdc8c --- /dev/null +++ b/doc/docbook.xsl @@ -0,0 +1,17 @@ + + +]> + + + + + + + ul + + + diff --git a/doc/style.css b/doc/style.css new file mode 100644 index 0000000..fc22ec1 --- /dev/null +++ b/doc/style.css @@ -0,0 +1,29 @@ +body { + margin: 5ex 10ex; + max-width: 40em; + line-height: 1.4; + font-family: sans-serif; + font-size: 0.8em; +} +h1, h2, h3 { + font-weight: normal; +} +pre, code { + font-family: x, monospace; +} +pre { + padding: 1ex; + background: #eee; + border: solid 1px #ddd; + min-width: 0; + font-size: 90%; +} +code { + color: #007; +} +.chapter { + margin-top: 4em; +} +p { + margin-top: 0; +} -- cgit v0.12