DocBook [was Re: [Perl] Designing the Ultimate Presentation Tool]

Shlomi Fish shlomif at
Wed Nov 13 04:35:23 PST 2002

On Wed, 13 Nov 2002, Reuven M. Lerner wrote:

> >>>>> "Shlomi" == Shlomi Fish <shlomif at> writes:
>     Shlomi> The problem with it is that it is very verbose. Very, very
>     Shlomi> verbose. When writing DocBook documents I could die
>     Shlomi> whenever I have to write <listitem>...</listitem>.
> So you're telling me that because you want to type <li> </li> and not
> <listitem> </listitem>, you're going to create a whole new document
> formatting and presentation system?  It seems to me that you would do
> well to simply create a set of DocBook macros.  Or better yet, use or
> customize an Emacs mode that will perform the expansions for you.  Or
> even better, use Emacs PSGML mode, which performs these sorts of
> completions for you.

I like DocBook for writing Books and stuff like that. But I much prefer
HTML+CSS+WML+Quad-Pres for Presentations. For lectures, I need quick and
dirty code that won't take me ages to write, and that will give me
immediate results. WML can be customized with new meta-tags, something
that I understood is not very possible in DocBook. (In DocBook you have a
given set of elements and that's it)

I think converting HTML with given conventions to DocBook is still quite

> I've read Paul Graham's article on brevity before.  Brevity is good,
> but maintainability is better.

There are several approaches I can take:

1. Create an XSL stylesheet or something similar to have a less brief
docbook. (i.e: convert <li>'s to <listitem>'s)

2. Write an HTML-centric tool.

I purposely take No. 2 because I like HTML for writing slides. DocBook is
great for books and serious documents, but is (IMHO) a pain for
small-scale things. Also, how do you highlight code in DocBook? That's a
no-brainer in HTML using gvim or enscript.

>     Shlomi> I think HTML with CSS if it's well-formed can be
>     Shlomi> translated to DocBook quite easily, using an XSL
>     Shlomi> stylesheet or something like that.
> I'm glad that you think it's so easy; the dearth of high-quality tools
> to do this supposedly simple task speaks for itself, I believe.

I can give an ad-hoc conversion that may not work perfectly. But my tool
is mainly intended for generating HTML. You can take the HTML in one page,
and convert it to Postscript by using Mozilla or something like that.

> Unfortunately, HTML+CSS is less (semantically) expressive than
> DocBook.  And there aren't any standards for translating in that
> direction, because there's so much potential ambiguity.
>     Shlomi> I prefer to use HTML for my tools because it is much more
>     Shlomi> brief and so more environmentally friendly, and hackers
>     Shlomi> would like it better.
> As I indicated above -- brevity is nice, but it's far from the only
> thing.  I'm not sure what you mean by "more environmentally friendly."
> And an awful lot of hackers I respect (including many O'Reilly
> authors) are using DocBook, because it gives them the flexibility they
> need to turn things into multiple formats.

I also use DocBook. I like it very much. It rules!

> Look, I wrote Core Perl in LaTeX.  One of my (so-called) editors
> couldn't read LaTeX, so he needed it translated into RTF or HTML.  If
> I had used DocBook, everything would have been a snap.  But I used
> LaTeX, which meant that I used latex2html, which was mediocre at best.
> This doesn't mean that LaTeX or HTML is inherently good or bad.  It
> does, however, mean that each format has a role to play, and trying to
> use the format for too much will eventually come around and bite you.

I use DocBook for writing Books because it generates HTML and
supports HyperText well. It also creates very good PDFs which Acrobat
Reader likes.

> By the way, Tzafrir's comment about DocBook conversion programs not
> supporting Hebrew is surprising, enlightening, and disturbing.  Is
> there any chance that the situation can be remedied in the near
> future?

Indeed, Norman Walsh told me on the IRC that DocBook does not do anything
particular with BiDi text. Since RTF, HTML and LaTeX all have different
BiDi schemes it is not suffice. Until someone hacks the DocBook tools to
support this nicely, it will not work very well. I don't know if the core
DocBook developers wish to do anything about it, but I can ask them (I'm a
member of the DocBook mailing list)


	Shlomi Fish

> Reuven
> _______________________________________________
> Perl mailing list
> Perl at

Shlomi Fish        shlomif at
Home Page:

He who re-invents the wheel, understands much better how a wheel works.

More information about the Perl mailing list