Karakas Online

4.2. Adapt the DocBook DSSSL stylesheets

There are a lot of changes that must be done in the DocBook DSSSL stylesheets. The best way to incorporate them is to keep copies of the following files in your working directory:

See Section 7.1.5 for an explanation of the changes that have been incorporated in the above files. Make sure that their location is correctly set in lyxtox:

  HTML_CHUNKS_DSL="lyxtox-html.dsl"
  HTML_NOCHUNKS_DSL="lyxtox-onehtml.dsl"
  PRINT_PDF_DSL="lyxtox-print-pdf.dsl"
  PRINT_PS_DSL="lyxtox-print-ps.dsl"
  PRINT_RTF_DSL="lyxtox-print-rtf.dsl"
  PRINT_TXT_DSL="lyxtox-print-txt.dsl"

Also, you must insert "PDF" in the notation.class of the /usr/share/sgml/docbook_4/dbnotn.mod file:

<!ENTITY % notation.class "BMP| CGM-CHAR | CGM-BINARY | CGM-CLEAR | DITROFF | DVI | EPS | EQN | FAX | GIF | GIF87a | GIF89a | JPG | JPEG | IGES | PCX | PDF | PIC | PNG | PS | SGML | TBL | TEX | TIFF | WMF | WPG | linespecific %local.notation.class;"> 

If you still use LyX v.1.1.x, you should change /usr/share/sgml/docbook_3/dbnotn.mod to include “PDF” in the list of accepted file extensions:

<!ENTITY % notation.class                 "BMP| CGM-CHAR | CGM-BINARY | CGM-CLEAR | DITROFF | DVI                 | EPS | EQN | FAX | GIF | GIF87a | GIF89a                  | JPG | JPEG | IGES | PCX                 | PIC | PS | SGML | TBL | TEX | TIFF | WMF | WPG | PDF | PNG                 | linespecific                 %local.notation.class;"> 

If you omit this change, you will get a 'value of attribute "FORMAT" cannot be "PDF"' error when trying to produce a PDF (due to a 'format=”PDF”' attribute in the code for images, see Section 7.2.2). This error is also discussed in Chapter 6.

Open each one of the DSSSL stylesheets that you copied in your working directory and check if the paths used there are correct. The affected files are:

Check whether the paths in the ENTITY declarations are correct for your system. For example, in lyxtox-html.dsl you must check whether the following ENTITY declarations are correct:

<!ENTITY refdblib SYSTEM "/usr/share/refdb/dsssl/lib/refdblib.dsl">
<!ENTITY refdbvar SYSTEM "/usr/share/refdb/dsssl/lib/refdbvar.dsl">

Practically, this amounts to checking the right path for refdblib.dsl and refdbvar.dsl in your system. Repeat this check for the other two files.

Note Stylesheet location and RefDB
 

Currently, if you use RefDB, the above stylesheets have to be in the current directory (i.e. where also lyxtox is in). This is because in this case the refdb-html.dsl and refdb-print.dsl will be used. They are automatically generated from the RefDB stylesheet (e.g. J.Biol.Chem.dsl) which, in turn, is also automatically generated by RefDB (see Section 7.1.10.2 for all the details). refdb-html.dsl and refdb-print.dsl will point to the above lyxtox-*.dsl stylesheets for further processing, but they don't do it through a catalog (at the moment). Thus the lyxtox-*.dsl files have to be in the same directory, unless you change the generating awkscr_refdb_html and awkscr_refdb_print scripts.

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