Output Formatting Style The output rendering done by dblatex can be widely customized like explained in . By default several rendering styles are provided, that one can choose by using the option (see ). The available styles are: native The rendering uses the default LaTeX stylesheets. It is the style used by default if dblatex has been configured without using the option . simple The rendering is very close to original latex rendering. The wrapper around the default latex packages is very thin. db2latex The rendering tries to be as close as possible to the DB2LaTeX formatting. Choosing the DB2LaTeX style
How it works The rendering style stuff is under the latex/ directory. You can see the XSL stylesheets under xsl/ as the way to produce latex with as little as possible docbook specific things (even if a large amount of latex packages are used to do the work). Then, it's up to LaTeX stylesheets to format the document as you wish. The organization under latex/ is as follow: contrib Contains the non-default available LaTeX stylesheets (simple and db2latex). graphics Default graphics used in the admonitions (e.g. warning). These graphics are used by the default output formatting. scripts Scripts used to compile with latex or pdflatex. specs Contains all the configuration files describing the available styles. A specification file must have the extension .specs, .conf, or .xml to be detected as a style description, and its basename is the name of the style. For example the style db2latex is described by the configuration file db2latex.xml. When dblatex is executed with no parameter, the usage is displayed. In particular, the list of the available styles is given, like this: The list is built by scanning the specs files found under specs/. The spec file syntax is described in . style Default LaTeX stylesheets.
Adding a New Formatting Style To add a new formatting style, do the following steps: Let's create the style directories that will contain all the specific data. We choose to put them under the default dblatex user configuration directory. Note that you could choose another configuration directory (see for more details). Create the latex stylesheets you need. It must define the expected DocBook interface and include some core definitions from the default latex stylesheets (cf. ). Create also your XSL stylesheet if necessary. Put these files under the appropriate directories: Create a configuration file under the directory $HOME/.dblatex. The configuration file must point to the new latex stylesheet, and give the specific parameters. Example: mystyle/latex// -f fig ]]> That's it. Try to compile your document with your style, and check the output. The configuration file basename is the name of the style to call.