Karakas Online

4.14. Use a CSS for DocBook

The following two definitions in the HTML stylesheets (see Section 4.2) specify the CSS that is to be used for HTML output:

(define %stylesheet%
  ;; Name of the stylesheet to use
(define %stylesheet-type%
  ;; The type of the stylesheet to use

Of course, you may decide that you don't need a CSS, in which case you should define %stylesheet% to “#f”. But this is only part of the story! You may discover that your HTML documents still need the ck-style.css, even if you set %stylesheet% to “#f”! This is because of the extra processing that the header, body and footer are subject to, as described in Chapter 8. You will have to change part2 too to reflect the right CSS.

Talking about a “right” CSS for DocBook, you may find out that there not so many out there available - see CSS for DocBook for a rare example. The problem is that the HTML produced by the tools presented here uses its own classes which don't seem to be widely used outside DocBook. Instead of inventing the wheel for the third time, just grab my ck-style.css and use it as is, or adapt it to your purposes. As the scripts currently use it, it has to be installed in the working directory, but you can certainly change that easily.

Last updated Mon Sep 24 01:19:25 CEST 2007 Permalink: http://www.karakas-online.de/mySGML/css.html All contents © 2002-2007 Chris Karakas