On Wed, Jan 03, 2001 at 05:59:32PM -0800, kmself@ix.netcom.com wrote: > - What tools to you use to produce output? I've been using sgmltools, > but am told jade is the preferred (or at least more powerful) route.
The scripts in sgmltools simply call jade. /usr/bin/sgmltools, from sgmltools-2, is one such script. I use a Makefile to call jade as described in Stephane's estimable HowTo. Then in Emacs, which with psgml is the only way to do SGML that I know of, I can call make without leaving the editor. Here's a typical Makefile: html: newsite.sgml jade -t sgml -d newsite.dsl newsite.sgml txt: newsite.sgml jade -t sgml -V nochunks -d newsite.dsl newsite.sgml > dump.html lynx -force_html -dump dump.html > newsite.txt (I know, the dependencies aren't right, but what the heck.) > Also under the impression that one or more of sgmltools or > sgmltools-light is no longer current. I'm not sure either, but that package is no longer central to my DocBook work. I think sgmltools-2 is current. > - How do you specify your customized environment? How would I get > DocBook to point to *my* customized stylesheets rather than the > defaults? You sort of don't. Your custom driver file will point to the correct DocBook stylesheet. Here's a driver file I use, adapted from an old sgmltools driver. <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl> ]> <style-sheet> <style-specification id="html" use="docbook"> <style-specification-body> ;; ;; This is the standard HTML stylesheet, which deviates only a little bit ;; from the plain version. ;; (define %html-ext% ".html") (define %root-filename% "index") (define %body-attr% ;; http://www.htmlgoodies.com/colors.html ;; What attributes should be hung off of BODY? (list ;; (list "BGCOLOR" "#FFF8DC") (list "BGCOLOR" "#FFFFF0") (list "TEXT" "#000000"))) ;; turn this off! (define %shade-verbatim% #f) (define %use-id-as-filename% #t) (define %graphic-default-extension% "gif") ;; rem'd out by me: (define use-output-dir ;; If an output-dir is specified, should it be used? #t) (define %output-dir% ;; The directory to which HTML files should be written "newsite") (define %admon-graphics% #t) ;; added by me for snort: ;; (define %generate-article-toc% #t) ;; do we need this here? ;; (define $generate-chapter-toc$ ;; Should a Chapter Table of Contents be produced? ;; (lambda () ;; (or (not nochunks) ;; (node-list=? (current-node) (sgml-root-element))))) (define nochunks ;; Suppress chunking of output pages #f) (define %gentext-nav-use-tables% ;; Use tables to build the navigation headers and footers? #t) (define %spacing-paras% ;; Block-element spacing hack #t) (define %gentext-nav-tblwidth% ;; If using tables for navigation, how wide should the tables be? "80%") (define %stylesheet% "Oldstyle.css") (define %stylesheet-type% "text/css") </style-specification-body> </style-specification> <external-specification id="docbook" document="docbook.dsl"> </style-sheet> The next to last line above points the process at the DocBook stylesheets. It depends on the catalog to find its way to the actual file. > - How about specifying multiple hardcopy output formats? You can create different sections in your driver file, and then in the Makefile have different make targets call those different sections using, for instance, mydriver.dsl#print1, mydriver.dsl#print2, etc. where the sections are denoted like <style-specification id="print1" use="print"> blah blah blah </style-specification> and then at the bottom the correct external specification <external-specification id="docbook" document="docbook.dsl"> </style-sheet> > I've been going through docbook docs up to my eyeballs, found the > Debian SGML/XML HOWTO, which is very useful but not well advertised, at: > > http://people.debian.org/~bortz//SGML-HOWTO/ This is the one thing that more than ANYTHING else got me over my initial learning curve hump with DocBook! > While it does describe customization, it doesn't describe how to > organize such customizations across a project or multiple projects. I'd > be interested in ideas on that. For my money the use of Makefiles and custom driver files, along with whatever directory structure makes sense for you, is the best way to go. I tend to keep a given project and its Makefile and driver file in one directory, along with the html output in a subdir under that same dir. This also keeps track of psgml's saved parsed DTD's. (Don't do printing here.) There is a lot of info in the docbook stylesheet docs but you kind of have to eke it out. Norm gives an example of the driver file in his DocBook book which is available online (somewhere). The docbook-apps list is a good place to get an answer, often from Norm himself. Also debian-sgml. -- Bob Bernstein at Esmond, Rhode Island, USA