Date: Tue, 21 Apr 1998 22:17:59 +0100 From: Nik Clayton <nik@nothing-going-on.demon.co.uk> To: "Justin T. Gibbs" <gibbs@plutotech.com> Cc: doc@FreeBSD.ORG Subject: Converting DocBook to HTML (Was .emacs stuff for PSGML) Message-ID: <19980421221759.61026@nothing-going-on.org> In-Reply-To: <199804190141.TAA02762@pluto.plutotech.com>; from Justin T. Gibbs on Sat, Apr 18, 1998 at 07:37:20PM -0600 References: <199804190141.TAA02762@pluto.plutotech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <URL:ftp://fallout.campusview.indiana.edu/pub/sgml/stylesheet-0.1.tar.gz> 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 <URL:http://www.nothing-going-on.demon.co.uk/FreeBSD/make-world/make-world.sgml> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980421221759.61026>