- SourceForge
- Reference
- Samples

- Welcome & News |
- Download & Install |
- User Guides |
- Notes, E-mail & Bugs |
- Q&A

Suggestions
Search:

# What is DB2LaTeX?

## Motivation

Around 1997-1998, I happened to find the "LinuxDOC SGML DTD". "See, You work on a single source and you are able to flawlessly generate LaTeX, HTML, txt, rtf, and so on..." a friend said. The idea attracted me very much, but I could not include my pretty figures in my "hello world" SGML documents. After that "first contact", I found the DocBook framework. I must admit that at that time, even the "best of the best" DTD would not have been enough: the DSSSL stylesheets that were distributed and their ease of use is what really allowed me to see the results from the very beginning...

There were some issues that I did not like (I think that my complete ignorance of DSSSL and LISP derivatives had much to do with it), and it took me several days to just tweak the stylesheets to personalize the output. On the other hand, at that time XSL tools were not mature enough. Time has passed, and in order to contribute back some effort, I created DB2LaTeX, in the hope that it may be useful.

## Description

DB2LaTeX are a set of XSLT stylesheets which generate high level LaTeX2e from your docbook document. They do not perform any FO transformation, the only thing they do is to map DocBook tags into more or less standard LaTeX (a recent installation of LaTeX 2e is required, with most common packages. However, in more stable releases, package dependencies will be completely managed with xsl parameters, making it virtually compatible with basic LaTeX 2e installations). All the "styling" has to be done by modifying available xsl:params, overriding and customizing templates, and in the last, by adding your "sty" files.

More or less, they translate a `<command>` `</command>` into \begin{command}. Of course, there are a lot of other things to do, like tables, bibliography and so on... but this is the main idea.

They are heavily based (that is, I started from a local copy and then start changing things here and there) on Norman Walsh XSL docbook stylesheets. These stylesheets are published here with Norman Walsh permission. Copyright and due credit is for Norman Walsh. Bugs are mine. However, bear in mind the fact that these stylesheets are NOT the XSL Docbook stylesheets. Thank you.

They are "alpha". That means : it may work, it may not work. Your favourite feature may / may not be implemented. I will be glad to accept patches in form of XSL code or anything :). Many thanks to those who have already sent me patches and pointed out some bugs.

## Rationale

Why? The reason is easy. I wanted to have an easy/robust way to print docbook files. I have been thinking about this for several months and followed a lot of mail/news threads about this. I know about jadetex, passivetex, fop, jade/openjade, xt, xalan, MathML, and so on.

- A Short term solution until better solutions (passiveTeX, jadeTeX) become more mature.

- An easy way to include LaTeX Math support.

- Allows a way to print in more or less "out-of-the-box" LaTeX installations in current Linux/Unix - like distributions (although you may still need to install software like the JDK)

- Why not? They allow a migration towards docbook. the docbook source can be reused, and for today print releases, just translate into LaTeX, and change whatever you may want.

The basic comment here is: I do not want to discuss if this is a right approach or not. You may have your reasons to consider using these sylesheets. I use them, because MathML is difficult! to type, there are not good renderers that meet all my requirements, etc., and because I needed to be able to distribute LaTeX files. I think that FOP/PassiveTeX is the way to go, but unfortunately these tools are not mature enough... Consider these stylesheets as another available tool that may/may not help you. USE THEM AT YOUR OWN RISK.

## Disclaimer

IMPORTANT: These stylesheets ARE NOT the official DocBook XSL stylesheets. These stylesheets ARE NOT maintained by Norman Walsh. Please, DO NOT e-mail Norman about any question regarding these stylesheets (he has been kind enough to allow me to use a great part of his work). These file ARE NOT part of the XSL DocBook Stylesheet distribution.

IMPORTANT: These stylesheets are ALPHA. That (among other things) means that the documentation IS missing. I have added here some basic instructions about how to install and use these stylesheets. Hopefully, you will be able to install and use the stylesheets using these instructions.

$Date: 2004/01/31 09:51:12 $ | Home |
Copyright © 2000, 2001, 2002, 2003, 2004 Ramon Casellas and James Devenish.