Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Misc. docbook notes, scripts, xsl ...

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 samples
Octocat-spinner-32 xsl

Docbook helper


  • Install script for ubuntu (toolchain installation)
  • XSL modification for documents, minor .fo changes (margins, etc)
  • DocBook XML samples
  • Markdown (pandoc) samples
  • Convert script "x2doc" for building HTML and PDF output from Markdown and/or DocBook sources

Good to know

  • In order to get good images in the pdf output, specify image sizes, e.g. via Gimp: "Image" => "Print Size"
  • More Markdown (pandoc) samples are at (Markdown to DocBook conversion)


Just run the provided install script on a supported Ubuntu distribution (10.04 for now):


This installs the neccessary Ubuntu packages and copies the x2doc conversion script to /usr/local/bin and the xsl stylesheets to /usr/local/share/xml/docbook.

Samples, usage

Convert a Markdown (pandoc) document to DocBook XML:

x2doc -f

Convert a Markdown (pandoc) document to PDF:

x2doc -t pdf -f

Convert a Markdown (pandoc) document to HTML (one page):

x2doc -t html -f

Convert a Markdown (pandoc) document to HTML (multiple pages):

x2doc -t htmlmulti -f

Convert a DocBook XML document to PDF, specifying a new output file:

x2doc -t pdf -o newdoc.pdf -f docbook-sample.xml

Convert a DocBook XML document to TYPE):

x2doc -t TYPE -f docbook-sample.xml

Valid TYPEs are:

  • pdf
  • html
  • htmlmulti
  • docbook (not available for DocBook input files .. obviously)

Use the "-h" option for additional usage instructions:

x2doc -h


Something went wrong with that request. Please try again.