diff --git a/configure b/configure index e9e31910f5..74b0103df4 100755 --- a/configure +++ b/configure @@ -120,7 +120,7 @@ doc/api.xml: doc/api.txt doc/node.1: doc/api.xml xsltproc --output doc/node.1 \\ - --nonet /etc/asciidoc/docbook-xsl/manpage.xsl \\ + --nonet doc/docbook-xsl/manpage.xsl \\ doc/api.xml website-upload: doc diff --git a/doc/docbook-xsl/asciidoc-docbook-xsl.txt b/doc/docbook-xsl/asciidoc-docbook-xsl.txt new file mode 100644 index 0000000000..0ce7b93812 --- /dev/null +++ b/doc/docbook-xsl/asciidoc-docbook-xsl.txt @@ -0,0 +1,96 @@ +AsciiDoc DocBook XSL Stylesheets Notes +====================================== + +********************************************************************* +All current AsciiDoc PDF and manpage documentation has been generated +using *DocBook XSL Stylesheets version 1.72.0*, these notes and +patches relate to this version. The version of FOP used is 0.20.5 (I +did try FOP 0.93 under Ubuntu 6.10, but got a Java exception which I +didn't pursue). + +********************************************************************* + +My tools of choice for converting AsciiDoc generated DocBook files to +PDF and manpage files are xsltproc(1), FOP and DocBook XSL +Stylesheets. Output file customisation is achieved by tweaking the +DocBook XSL stylesheets. I've tried to keep customization to a minimum +and confine it to the separate XSL driver files in the distribution +`./docbook-xsl/` directory (see the User Guide for details). + +To polish some rough edges I've written some patches for the DocBook +XSL stylesheets -- you don't need them but they're documented below +and included in the distribution `./docbook-xsl/` directory. + + +Manually upgrading Debian to the latest DocBook XSL stylesheets +--------------------------------------------------------------- +The DocBook XSL Stylesheets distribution is just a directory full of +text files and you can switch between releases by changing the +directory name in the system XML catalog. + +To upgrade to the latest docbook-xsl stylesheets without having to +wait for the Debian `docbook-xsl` package: + +- Download the latest docbook-xsl tarball from + http://sourceforge.net/projects/docbook/[]. + +- Unzip the tarball to `/usr/share/xml/docbook/stylesheet/`: + + $ cd /usr/share/xml/docbook/stylesheet + $ sudo tar -xzf /tmp/docbook-xsl-1.72.0.tar.gz + +- Edit `/etc/xml/docbook-xsl.xml` catalog and replace occurences of + the current stylesheets directory with the new one (in our example + it would be `/usr/share/xml/docbook/stylesheet/docbook-xsl-1.72.0`. + + $ cd /etc/xml/ + $ sudo cp -p docbook-xsl.xml docbook-xsl.xml.ORIG + $ sudo vi docbook-xsl.xml + +- Apply optional patches (see below). + + +Patches to DocBook XSL Stylesheets +---------------------------------- +NOTE: You'll find the patch files in the AsciiDoc distribution archive +`./docbook-xsl/` directory. + +Shade Literal Block Patch +~~~~~~~~~~~~~~~~~~~~~~~~~ +The processing expectation for AsciiDoc LiteralBlocks and +LiteralParagraphs is that they are not shaded. The +`shaded-literallayout.patch` was devised to allow AciiDoc Listing +blocks to be shaded while leaving Literal paragraphs and Literal +blocks unshaded (the default DocBook XSL Stylesheets behavior is to +shade all verbatim elements). + +The patch implements a `shade.literallayout` XSL parameter so that +shading in literal elements could be disabled while other verbatim +elements are left shaded (by setting the XSL `shade.verbatim` +parameter). + +The relevant patch file is `shaded-literallayout.patch` and it can be +applied from the DocBook XSL Stylesheets directory: + + $ cd /usr/share/xml/docbook/stylesheet/docbook-xsl-1.72.0 + $ sudo patch -p0 < /tmp/shaded-literallayout.patch + +///////////////////////////////////////////////////////////////////// +Manpage spurious .sp patch +~~~~~~~~~~~~~~~~~~~~~~~~~~ +IMPORTANT: *Don't apply this patch*. It was designed for docbook-xsl +1.69.1 (the previous version of docbook-xsl used with AsciiDoc) and +does not work with 1.72.0. I don't think it's necessary with +docbook-xsl 1.72.0. + +Standalone `simpara` and some nested `title` DocBook elements generate +`.sp` groff markup without a preceding newline, the `manpage-sp.patch` +fixes this as well as stripping out extra blank lines generated by +some `.sp` markup elements. + +The patch can be applied from the DocBook XSL Stylesheets directory +with the following command: + + # patch -p0 < manpage-sp.patch + +///////////////////////////////////////////////////////////////////// diff --git a/doc/docbook-xsl/chunked.xsl b/doc/docbook-xsl/chunked.xsl new file mode 100644 index 0000000000..9af8defd86 --- /dev/null +++ b/doc/docbook-xsl/chunked.xsl @@ -0,0 +1,19 @@ + + + + + + +../images/icons/ +../images/icons/ + + diff --git a/doc/docbook-xsl/common.xsl b/doc/docbook-xsl/common.xsl new file mode 100644 index 0000000000..fdbfb0869e --- /dev/null +++ b/doc/docbook-xsl/common.xsl @@ -0,0 +1,61 @@ + + + + + + + + + + +./images/icons/ +0 + + + + 0 + #E0E0E0 + + + +./images/icons/ + + + margin-left: 0; margin-right: 10%; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/docbook-xsl/fo.xsl b/doc/docbook-xsl/fo.xsl new file mode 100644 index 0000000000..37e1de4cf4 --- /dev/null +++ b/doc/docbook-xsl/fo.xsl @@ -0,0 +1,112 @@ + + + + + + + + + + +false + +left + + +12 + + pt + + + + + + + + + + + + + 0pt + -12pt + + + + + + + 0.75in + 0.5in + + + + + 0.5in + 0.5in + + + + + + + + + + + + + + + + + + 10pt + + + + + + 14pt + bold + false + always + + + + solid + 1pt + silver + #ffffee + 12pt + 12pt + 6pt + 6pt + 0pt + 12pt + 6pt + 6pt + + + + + + + + #F0F0F0 + + + diff --git a/doc/docbook-xsl/htmlhelp.xsl b/doc/docbook-xsl/htmlhelp.xsl new file mode 100644 index 0000000000..b9b18af41a --- /dev/null +++ b/doc/docbook-xsl/htmlhelp.xsl @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/doc/docbook-xsl/manpage-sp.patch b/doc/docbook-xsl/manpage-sp.patch new file mode 100644 index 0000000000..8a51c846c2 --- /dev/null +++ b/doc/docbook-xsl/manpage-sp.patch @@ -0,0 +1,41 @@ +diff -u ./manpages.ORIG/block.xsl ./manpages/block.xsl +--- ./manpages.ORIG/block.xsl 2005-11-30 17:31:23.135642494 +1300 ++++ ./manpages/block.xsl 2005-11-30 17:35:59.368886010 +1300 +@@ -37,7 +37,7 @@ + + + +- .sp ++ .sp + + + +@@ -56,7 +56,7 @@ + + +- .sp ++ .sp + + + .nf +diff -u ./manpages.ORIG/param.xsl ./manpages/param.xsl +--- ./manpages.ORIG/param.xsl 2005-11-30 17:31:23.164638883 +1300 ++++ ./manpages/param.xsl 2005-11-30 17:58:14.345174391 +1300 +@@ -47,6 +47,16 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + diff --git a/doc/docbook-xsl/manpage.xsl b/doc/docbook-xsl/manpage.xsl new file mode 100644 index 0000000000..6f7d3336ed --- /dev/null +++ b/doc/docbook-xsl/manpage.xsl @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + diff --git a/doc/docbook-xsl/shaded-literallayout.patch b/doc/docbook-xsl/shaded-literallayout.patch new file mode 100644 index 0000000000..e88ff98200 --- /dev/null +++ b/doc/docbook-xsl/shaded-literallayout.patch @@ -0,0 +1,32 @@ +diff -u fo.ORIG/param.xsl fo/param.xsl +--- fo.ORIG/param.xsl 2005-11-30 19:22:15.992409173 +1300 ++++ fo/param.xsl 2005-11-30 11:25:40.000000000 +1300 +@@ -669,6 +669,7 @@ + + + ++ + + + #E0E0E0 +diff -u fo.ORIG/verbatim.xsl fo/verbatim.xsl +--- fo.ORIG/verbatim.xsl 2005-11-30 19:22:15.944415115 +1300 ++++ fo/verbatim.xsl 2005-11-30 11:26:12.000000000 +1300 +@@ -105,7 +105,7 @@ + + + +- ++ + + + +- ++ + elements on + a machine by machine basis. +--> + + + +