From owner-freebsd-doc Tue Apr 21 15:05:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA07230 for freebsd-doc-outgoing; Tue, 21 Apr 1998 15:05:32 -0700 (PDT) (envelope-from owner-freebsd-doc@FreeBSD.ORG) Received: from nothing-going-on.demon.co.uk (nothing-going-on.demon.co.uk [193.237.89.66]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA07076 for ; Tue, 21 Apr 1998 22:04:49 GMT (envelope-from nik@nothing-going-on.demon.co.uk) Received: (from nik@localhost) by nothing-going-on.demon.co.uk (8.8.8/8.8.8) id WAA20381; Tue, 21 Apr 1998 22:17:59 +0100 (BST) (envelope-from nik) Message-ID: <19980421221759.61026@nothing-going-on.org> Date: Tue, 21 Apr 1998 22:17:59 +0100 From: Nik Clayton To: "Justin T. Gibbs" Cc: doc@FreeBSD.ORG Subject: Converting DocBook to HTML (Was .emacs stuff for PSGML) References: <199804190141.TAA02762@pluto.plutotech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <199804190141.TAA02762@pluto.plutotech.com>; from Justin T. Gibbs on Sat, Apr 18, 1998 at 07:37:20PM -0600 Organization: Nik at home, where there's nothing going on Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, Apr 18, 1998 at 07:37:20PM -0600, Justin T. Gibbs wrote: > I'm working on documentation for the CAM SCSI layer in SGML, and the > learning curve for using these tools is somewhat steep. I was wondering > if you might provide the PSGML section of your .emacs file to help me > along in getting a usable setup. Not a problem. Here's a bunch of other stuff as well. If you've got any more questions, can you send 'em via doc@freebsd.org? I have to curtail my typing at the moment due to RSI, and you might get a faster and/or more complete response from someone else before I can get to it. I've cc'd this reply on to -doc in the hope that some kind soul might archive it, clean it up and turn it into DocBook. Or, at the very least, this should help others. >From the ports, make sure you've got textproc/docbook textproc/jade editors/xemacs20 which should (via dependencies) pull in everything else you need as well. You also need John Fieber's DocBook stylesheet, which can be grabbed from Grab this, and extract the contents somewhere. You can also use Norm Walsh's stylesheet (textproc/dsssl-docbook-modular) but I haven't got any notes written up on how to use it yet, and it can be a bit daunting. You need something like this in your .cshrc (or .profile, or whatever) setenv SGML_ROOT /usr/local/share/sgml setenv SGML_CATALOG_FILES ${SGML_ROOT}/docbook/3.0/catalog setenv STML_CATALOG_FILES ${SGML_CATALOG_FILES}:${SGML_ROOT}/html/catalog setenv SGML_CATALOG_FILES ${SGML_CATALOG_FILES}:${SGML_ROOT}/iso8879/catalog setenv SGML_CATALOG_FILES ${SGML_CATALOG_FILES}:${SGML_ROOT}/jade/catalog setenv SGML_CATALOG_FILES ${SGML_CATALOG_FILES}:/usr/local/lib/xemacs-20.3/etc/sgml/CATALOG which sets SGML_CATALOG_FILES to something useful. A catalog file maps SGML DOCTYPE declarations to files in the filesystem. Once you've done this, create your SGML file. My .emacs has this in it: (add-hook 'sgml-mode-hook (function (lambda() (setq sgml-omittag nil) (setq sgml-indent-data t)))) which (with the above env vars) is all you need. Once you've written the SGML, you can convert it to HTML. A command line like jade -c /usr/local/share/sgml/docbook/3.0/catalog \ -c /usr/local/share/sgml/jade/catalog \ -d /path/to/docbook-html.dsl \ -t sgml \ filename.sgml Should do the trick. You don't need the -c flags if you've set the env vars (but it's good practice if you put this in Makefiles) and the -d parameter specifies the path to docbook-html.dsl from John's stylesheets. You'll then have an HTML file which you can use as normal. Try feeding through this process, and it should work with no problems (that file also gives you an (IMHO) reasonable sample of the more immediately useful DocBook elements). N -- Work: nik@iii.co.uk | FreeBSD + Perl + Apache Rest: nik@nothing-going-on.demon.co.uk | Remind me again why we need Play: nik@freebsd.org | Microsoft? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message