general questions about DocBook -> LaTeX

In the mailing list docbook-apps, I recently answered to the post titled “General questions about DocBook -> LaTeX“. I think my notes are interesting not only for the subscribers, but also for others.

I’ve read online that some people follow a different procedure; instead of going from DocBook to FO, they go from DocBook to LaTeX before creating their final PDF print output (using dblatex, for example). I am wondering if this would be a better publishing model for my needs, since I know LaTeX is made for print output. I’ve never used LaTeX before, however, so it would take some research on my part before starting to work with it.

Unless you are an experienced LaTeX user, you’d better avoid the LaTeX way.

So, the point of this email is to ask some general questions, if anyone with more experience can answer them for me:

1. What are the main advantages of going from DocBook to LaTeX before generating final print output of documents?

The main advantages:

* better typesetting quality,
* more control over the final layout.

However, if you don’t know LaTeX, you can’t get them. An offensive remark: I expect that the authors of dblatex and db2latex are not LaTeX experts and their tools don’t give the advatanges.

I’m also not an expert, but I have experience with converting XML to LaTex. I lost a lot of time in LaTeX debris, but the results were very good.

Unfortunately, at the moment the results are not available. Year ago, I promised to write DocBook TeXML stylesheets, but I still can’t start doing it.

2. If you know what you’re doing, can you do most things with XSL stylesheets and FO that you could do with LaTeX?
3. Which publishing model would be the best choice for making pretty PDFs for print.

I’ve developed Consodoc publishing server:

XML to beautiful documents
http://consodoc.com/

I think it’s one of the best choices.

I realize that these are vague questions, and it is probably perfectly valid to respond “it depends on what you are actually doing in your documents”. I understand this, but I wanted to first get a basic understanding of what can be gained by the DocBook -> LaTeX publishing model before further investing large amounts of time in either approach.

At the moment, the safe side is to follow FO. At least, nobody will accuse you in case of problems.

4 Responses to “general questions about DocBook -> LaTeX”

  1. marsgui Says:

    You promised texml will overclass the other non-maintanable XML to TeX solution. It is not yet the case. Consodoc claims to create beautiful PDF, but the guide is not that beautiful and the overall tool is rather a big python makefile than a finished solution.

    Instead of bashing other projects, please prove what you say, and feel free to submit and share all your great latex expertise to the other free projects. I’d be glad to modestly integrate them.

  2. olpa Says:

    Hello Benoit, (sorry if I found your name incorrectly)

    first of all, I’d like to say thanks. At the moment, dblatex is the best way to publish DocBook documentation using the open source tools.

    However, being the best at the moment doesn’t mean being the best. Bashing the projects is the Right Thing, as the insulted authors will think how to improve the state of art.

    > Consodoc claims to create beautiful PDF, but the guide is not that beautiful

    Please don’t mix up the following:

    * beautiful in the sense that there is no overfull boxes, hanging lines etc,
    * beautiful in the sense that there is a lot of funny Paper 2.0 stuff.

    I know the Guide could be improved. But not the second way.

    > … and the overall tool is rather a big python makefile than a finished solution.

    You are totally right. It’s a big python makefile. It’s a _framework_.

    > please prove what you say

    Sorry, time is required. Time, time, and it’ll appear.

    > share all your great latex expertise

    I’m not a great expert.

    > to the other free projects. I’d be glad to modestly integrate them.

    No! Dblatex uses the very wrong way, it generates LaTeX code directly by XSLT. I don’t want to encourage such approach.

  3. marsgui Says:

    I would not say that dblatex is better than something else. Most of people prefer the FO way, others prefer jadetex or passivetex, just because it can handle more languages that dblatex can. I bet that there are people who prefer db2latex just because they still can call xsltproc themselves. I was about to forget another thing: there are still many bugs in dblatex.

    Knowing who is the best is not the point. Actually, if you want some technical credits, speak when you can bring a valuable thing, and avoid comparison to an hypothetical best solution that you cannot implement yourself.

    As a technical feedback (and there’s no bashing here) I think that texml is an interesting approach, but the current XML vocabulary is useless. It is just the same calls than you would do in latex, but in a much more verbose way since it is done with XML tags.

    Texml would be really helpul if it could provide a higher level of abstraction, and if it would care for you about all the packages to load, hide the tricky package orders, hide the babel stuff clashes, provide the patches to some known latex bugs, call context instead of latex without changing anything, handle complex tables, handle a nice layout abstraction, support verbatim environments in footnotes or in tables, support footnotes in tables, in titles. Until you can provide these features I’ll continue to write latex with XSL stylesheets.

  4. olpa Says:

    > Texml would be really helpul if it could provide a higher level of abstraction, … support footnotes in tables, in titles.
    In this case it would be not TeXML, but an alternative to LaTeX and ConTeXt. Why not, I’m thinking about chances of creating a competing system, but it’d be not TeXML.

    You do understand TeXML right:

    > It is just the same calls than you would do in latex, but in a much more verbose way since it is done with XML tags.

    But you ignore the reason of this approach. “Write latex with XSL stylesheets” is nightmare, at least for me. But using TeXML as an intermediate language is an easy ride for me.

Leave a Reply