Dblatex transforms a DocBook XML/SGML document to LaTeX. Once transformed into LaTeX, standard LaTeX tools are used to produce DVI, Postcript or PDF files.
Figure 1.1, “Transforming Process” explains the process applied. It shows the tools used and the steps. The emphasized tools are provided by the package.
The main script allows to use two LaTeX backend drivers:
The “dvips” driver calls latex, and produces DVI, Postscript and at the end PDF files. Latex natively accepts only EPS graphics. The drawback is that converting to PDF can take a while.
The “pdftex” driver calls pdflatex, to produce directly PDF files. The conversion is fast, the file size is smaller. Pdflatex natively accepts PDF, PNG, JPEG, and TIFF graphics.
The XSL stylesheets located under xsl/ are used to transform from XML to “raw” LaTeX. The main file is latex_book_fast.xsl, that includes the other stylesheets of the directory.
Actually the XSL stylesheets doesn't produce valid LaTeX. The reason is that some DocBook processing is too complex or too time-consuming for XSL transforming. Besides, some extra actions need sometimes to be done such like figure conversion. Here are the main actions done by Python Post processing:
Transform the entities to valid LaTeX characters (e.g. is transformed to '~'). Python is suited and performant for this task.
Convert the figures to be compatible with the backend driver. See the section called “ Figure Inclusion ” for more detail.
Force some hyphenation in tables or for typed words.
Do the whole LaTeX compilation sequence thanks to the rubber compilation engine.
Once valid LaTeX is available, the LaTeX style package (docbook.sty) under latex/style/ is used to customize the output rendering. It includes the other files of the directory. You can also provide your own LaTeX style (cf. Chapter 4, Customization).