How to install and use

docbook2X does not have automatic installation since the author does not know how to do it properly and users may only want some but not all of the tools in docbook2X (for hysterical reasons there are multiple tools to do the same thing; pick the ones you like).

Some docbook2X tools use Perl modules that are not found anywhere else but in the docbook2X package. They are all in the XML:: section (XML/ directory in the source distribution). Copy XML/ to the system Perl library directory or make your own user Perl library directory.

Finally, copy the files you need to the install directory, or simply run the tools from the source directory.

For details on operating the tools, see their respective reference entries. The following demonstrates some simple usage:

Example 1. Man page conversion using docbook2man-spec.pl


$ nsgmls mydoc.sgml | sgmlspl docbook2man-spec.pl
$ manpage_makelinks <manpage.refs

Example 2. Man page conversion using docbook2manxml


$ docbook2manxml --header-3=`date "+%d %B %Y"` --header-5="Jane Hacker's Amazing Manual" \
 --refs-file=mydoc.refs mydoc.xml > mydoc.mxml
$ man_xml --solinks mydoc.mxml

Example 3. Texinfo conversion using docbook2texixml


$ docbook2texixml mydoc.xml > mydoc.txml
$ texi_xml mydoc.txml
$ recode -df utf8..texi mydoc.texi
$ makeinfo mydoc.texi

Example 4. Texinfo conversion using docbook2texi-xslt (SAXON)


$ java -cp saxon.jar:./xslt/texi com.icl.saxon.StyleSheet \
 -o mydoc.txml mydoc.xml ./xslt/texi/docbook-java.xsl
$ texi_xml mydoc.txml
$ recode -df utf8..texi mydoc.texi
$ makeinfo mydoc.texi


See the Makefiles in doc/ and testdoc/ for one way to automate conversion.

GNU recode patch

ucs2texi.patch adds support for direct utf8..texi conversions to GNU recode, mapping some important Unicode characters into their Texinfo equivalents. (Future versions of recode will probably have this patch integrated.)