4.1. Overriding the CSS Rules

There are several ways in which to override the default appearances I have set up.

  1. In your top directory (where you have your sitemap and outline), create your own shared directory. Any file that you place in there that has the same name as one of the defaults will be copied into your output area instead. Thus you can, if you wish, override the entire set of rules in docbook.css by providing your own file with the same name.

  2. Each DocBook output form also attempts to load, from the shared directory, a css file with the same name as that output form: page.css, pages.css, slides.css. You can provide any of these in your own shared directory.

  3. Each directory named in the sitemap can provide a file overrides.css that will be used by all documents in that directory. Thus you can provide a common set of rules for a small handful of related documents.

  4. Finally, each document documentName.dbk can be given, in its own directory, a file documentName.css to make document-specific changes.

Most documents won't use all of these mechanism. In order to avoid false error messages from link checkers, the actual code to load these files is inserted into web pages only if those files exist at the time that you build the document set. Keep in mind then, that if you decide to add a new .css file for the first time, you will need to rebuild all the affected documents before they start using it.