7.3. Using ldp.dsl

The LDP uses its own DSSSL file, which adds things like a white background and automatic generation of the table of contents you see at the beginning of HOWTOs. You can find the latest copy of the file at http://www.linuxdoc.org/authors/tools/ldp.dsl.

Once you have the file, you may need to do some editing of the first few lines based on the location of your DocBook DSSSL files. My example uses the Cygnus tool set.

Place the ldp.dsl file in /usr/lib/sgml/stylesheets and bring it up under your favorite text editor.You should see something like this:

<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % html "IGNORE">
<!ENTITY % print "IGNORE">
<!ENTITY docbook.dsl SYSTEM "docbook.dsl(1)" CDATA dsssl>
<!ENTITY % print "INCLUDE">
<!ENTITY docbook.dsl SYSTEM "docbook.dsl(2)" CDATA dsssl>
Change the first "docbook.dsl" to read /usr/lib/sgml/stylesheets/nwalsh-modular/html/docbook.dsl
Change the second "docbook.dsl" to read /usr/lib/sgml/stylesheets/nwalsh-modular/print/docbook.dsl

If you're using another DSSSL, point those two files to the location of the HTML and print DSSSL files. They're usually in directories called html and print.

With that complete, you can now generate HTML files:

bash$ mkdir HOWTO-HOWTO ; cd HOWTO-HOWTO
bash$  jade -t sgml -i html -d /usr/lib/sgml/stylesheets/ldp.dsl\#html ../HOWTO-HOWTO.sgml

The first command creates a new directory to put your files into. The second command (the jade one) generates individual HTML files for each section of your document. If you are going to something like RTF, you can do this:

bash$ jade -t rtf -d /usr/lib/sgml/stylesheets/ldp.dsl ../HOWTO-HOWTO.sgml