+ url="http://www.lysator.liu.se/projects/about_psgml.html">PSGML
+ web site for downloads, installation instructions, and
+ detailed documentation.
- What you must fetch:
-
-
-
- (version 1.1 in file jade1_1.zip was
- current at the time of writing)
-
-
-
-
-
-
-
Norman Walsh's Modular Stylesheets
- (version 1.19 was originally used to produce these documents)
-
-
-
-
Lennart Staflin's PSGML
- (version 1.0.1 in psgml-1.0.1.tar.gz was
- available at the time of writing)
-
-
-
+ There is one important thing to note with
+
PSGML: its author assumed that your
+ main
SGML DTD directory
+ would be /usr/local/lib/sgml. If, as in the
+ examples in this chapter, you use
+ /usr/local/share/sgml, you have to
+ compensate for this, either by setting
+ SGML_CATALOG_FILES environment variable, or you
+ can customize your
PSGML installation
+ (its manual tells you how).
- Important URLs:
-
-
-
-
-
-
-
-
-
-
The Modular Stylesheets web page
-
-
-
-
-
-
- Pepper's Whirlwind Guide
-
-
-
- Robin Cover's database of
SGML
- software
-
-
-
-
-
-
-
-
Installing Jade
-
-
Installing Jade
-
-
- Read the installation instructions at the above listed
- URL.
-
-
-
-
- Unzip the distribution kit in a suitable place. The command to do
- this will be something like
-unzip -aU jade1_1.zip
-
-
-
-
-
-
Jade is not built using
-
GNU autoconf, so you'll need to edit a
- Makefile yourself. Since James Clark has been
- good enough to prepare his kit for it, it is a good idea to make a
- build directory (named for your machine architecture, perhaps) under
- the main directory of the
Jade
- distribution, copy the file Makefile from the
- main directory into it, edit it there, and then run
- make there.
-
-
- However, the Makefile does need to be
- edited. There is a file called Makefile.jade in
- the main directory, which is intended to be used with make -f
- Makefile.jade when building
Jade
- (as opposed to just
SP,
- that
Jade is built upon). We suggest that
- you don't do that, though, since there is more that you need to change
- than what is in Makefile.jade, so you'd have to
- edit one of them anyway.
-
-
- Go through the Makefile, reading James'
- instructions and editing as needed. There are various variables that
- need to be set. Here is a collected summary of the most important
- ones, with typical values:
-prefix = /usr/local
-XDEFINES = -DSGML_CATALOG_FILES_DEFAULT=\"/usr/local/share/sgml/catalog\"
-XLIBS = -lm
-RANLIB = ranlib
-srcdir = ..
-XLIBDIRS = grove spgrove style
-XPROGDIRS = jade
-
- Note the specification of where to find the default catalog of
-
SGML support files -- you may want to change that
- to something more suitable for your own installation. If your system
- doesn't need the above settings for the math library and the
- ranlib command, leave them as they are in the
- Makefile.
-
-
-
-
- Type make to build Jade and the various
-
-
-
- Once the software is built, make install will
- do the obvious.
-
-
-
-
-
-
-
Installing the DocBook DTD Kit
-
-
Installing the DocBook DTD Kit
-
-
- You'll want to place the files that make up the
- directory you built
Jade to expect them in,
- which, if you followed our suggestion above, is
- /usr/local/share/sgml/. In addition to the
- actual
DocBook files, you'll need to have a
- catalog file in place, for the mapping of
- document type specifications and external entity references to actual
- files in that directory. You'll also want the
ISO
- character set mappings, and probably one or more versions of
-
-
- One way to install the various
DTD and
- support files and set up the catalog file, is to
- collect them all into the above mentioned directory, use a single file
- named CATALOG to describe them all, and then
- create the file catalog as a catalog pointer to
- the former, by giving it the single line of content:
-CATALOG /usr/local/share/sgml/CATALOG
-
-
-
-
-
- The CATALOG file should then contain three types
- of lines. The first is the (optional)
SGML
- declaration, thus:
-SGMLDECL docbook.dcl
-
- Next, the various references to
DTD and entity
- files must be resolved. For the
DocBook
- files, these lines look like this:
-PUBLIC "-//Davenport//DTD DocBook V3.0//EN" docbook.dtd
-PUBLIC "-//USA-DOD//DTD Table Model 951010//EN" cals-tbl.dtd
-PUBLIC "-//Davenport//ELEMENTS DocBook Information Pool V3.0//EN" dbpool.mod
-PUBLIC "-//Davenport//ELEMENTS DocBook Document Hierarchy V3.0//EN" dbhier.mod
-PUBLIC "-//Davenport//ENTITIES DocBook Additional General Entities V3.0//EN" dbgenent.mod
-
-
-
-
-
- Of course, a file containing these comes with the
-
DocBook kit. Note that the last item on
- each of these lines is a file name, given here without a path. You
- can put the files in subdirectories of your main
-
SGML directory if you like, of course, and modify
- the reference in the CATALOG file.
-
DocBook also references the
-
ISO character set entities, so you need to fetch
- and install these (they are available from several sources, and are
- easily found by way of the URLs listed above), along with catalog
- entries for all of them, such as:
-PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN" ISO/ISOlat1
-
- Note how the file name here contains a directory name, showing that
- we've placed the
ISO entity files in a subdirectory
- named ISO. Again, proper catalog entries should
- accompany the entity kit you fetch.
-
-
-
-
-
-
-
-
Installing Norman Walsh's DSSSL Style Sheets
-
-
Installing Norman Walsh's DSSSL Style Sheets
-
-
- Read the installation instructions at the above listed
- URL.
-
-
-
-
- To install Norman's style sheets, simply unzip the distribution
- kit in a suitable place. A good place to dot this would be
- /usr/local/share, which places the kit in a
- directory tree under /usr/local/share/docbook.
- The command will be something like
-unzip -aU db119.zip
-
-
-
-
-
- One way to test the installation is to build the
-
HTML and
RTF forms of the
-
PostgreSQL User's Guide.
-
-
-
-
-
- To build the
HTML files,
- directory, doc/src/sgml, and say
-jade -t sgml -d /usr/local/share/docbook/html/docbook.dsl -D ../graphics postgres.sgml
-
-
-
- book1.htm is the top level node of the output..
-
-
-
-
- To generate the
RTF output, ready for importing
- into your favorite word processing system and printing, type:
-jade -t rtf -d /usr/local/share/docbook/print/docbook.dsl -D ../graphics postgres.sgml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Read the installation instructions at the above listed
- URL.
-
-
-
-
- Unpack the distribution file, run configure, make and make
- install to put the byte-compiled files and info library in place.
-
-
-
-
- Then add the following lines to your
- /usr/local/share/emacs/site-lisp/site-start.el
- file to make
Emacs properly load
-(setq load-path
- (cons "/usr/local/share/emacs/site-lisp/psgml" load-path))
-(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t)
-
-
-
-
-
- If you want to use
PSGML when editing
-
HTML too, also add this:
-(setq auto-mode-alist
- (cons '("\\.s?html?\\'" . sgml-mode) auto-mode-alist))
-
-
-
-
-
- There is one important thing to note with
-
PSGML: its author assumed that your main
-
SGML DTD directory would be
- /usr/local/lib/sgml. If, as in the examples in
- this chapter, you use /usr/local/share/sgml, you
- have to compensate for this.
-
-
-
-
- You can set the
- SGML_CATALOG_FILES environment variable.
-
-
-
-
- You can
- customize your
PSGML installation (its
- manual tells you how).
-
-
-
-
- You can even edit the source file
- psgml.el before compiling and installing
-
PSGML, changing the hard-coded paths to
- match your own default.
-
-
+ Put the following in your ~/.emacs
+ environment file (adjusting the path names to be appropriate for
+ your system):
- >
-
+; ********** for SGML mode (psgml)
-
-
+(setq sgml-omittag t)
+(setq sgml-shorttag t)
+(setq sgml-minimize-attributes nil)
+(setq sgml-always-quote-attributes t)
+(setq sgml-indent-step 1)
+(setq sgml-indent-data t)
+(setq sgml-parent-document nil)
+(setq sgml-default-dtd-file "./reference.ced")
+(setq sgml-exposed-tags nil)
+(setq sgml-catalog-files '("/usr/local/share/sgml/catalog"))
+(setq sgml-ecat-files nil)
-
+(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t )
+>
- If you want to, you can also install
-
TeX as a formatting backend for
-
Jade. Note that this is still quite
- unpolished software, and will generate printed output that is inferior
- to what you get from the
RTF backend. Still, it
- works all right, especially for simpler documents that don't use
- tables, and as both
JadeTeX and the style
- sheets are under continuous improvement, it will certainly get better
- over time.
+ and in the same file add an entry for
SGML
+ into the (existing) definition for
+ auto-mode-alist:
+(setq
+ auto-mode-alist
+ '(("\\.sgml$" . sgml-mode)
+ ))
+
- To install and use
JadeTeX, you will
- need a working installation of
TeX and
-
LaTeX2e, including the supported
- fonts and
AMS-LaTeX, the
- companion kit of "the 35 fonts", the
dvips
- program for generating
PostScript, the
- macro packages
fancyhdr,
-
JadeTeX itself. All of these can be found
- on your friendly neighborhood
CTAN site.
+ Currently, each
SGML source file has the
+ following block at the end of the file:
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:"./reference.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:("/usr/lib/sgml/catalog")
+sgml-local-ecat-files:nil
+End:
+-->
+
+ This will set up a number of editing mode parameters even if you
+ do not set up your ~/.emacs file, but it is
+ a bit unfortunate, since if you followed the installation
+ instructions above, then the catalog path will not match your
+ location. Hence you might need to turn off local variables:
+(setq inhibit-local-variables t)
+
-
JadeTeX does not at the time of
- writing come with much of an installation guide, but there is a
- makefile which shows what is needed. It also
- includes a directory cooked, wherein you'll find
- some of the macro packages it needs, but not all, and not complete --
- at least last we looked.
+ The
PostgreSQL distribution includes a
+ parsed DTD definitions file reference.ced.
+ You may find that when using PSGML, a comfortable way of working
+ with these separate files of book parts is to insert a proper
+ DOCTYPE declaration while you're editing them.
+ If you are working on this source, for instance, it is an
+ appendix chapter, so you would specify the document as an
+ appendix
instance of a DocBook document by making
+ the first line look like this:
+
+<!doctype appendix PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
+
+
+ This means that anything and everything that reads
+
SGML will get it right, and I can verify the
+ document with nsgmls -s docguide.sgml. (But
+ you need to take out that line before building the entire
+ documentation set.)
+
+
+
+
Other Emacs modes
- Before building the jadetex.fmt format
- file, you'll probably want to edit the
- jadetex.ltx file, to change the configuration of
-
Babel to suit your locality. The line to
- change looks something like
-\RequirePackage[german,french,english]{babel}[1997/01/23]
-
- and you should obviously list only the languages you actually need,
- and have configured
Babel for.
+
GNU Emacs ships with a different SGML
+ mode, which is not quite as powerful as
+
PSGML, but it's less confusing and
+ lighter weight. Also, it offers syntax highlighting (font lock),
+ which can be very helpful.
- With
JadeTeX working, you should be
- able to generate and format
TeX output for
- the
PostgreSQL manuals by giving the
- commands (as above, in the doc/src/sgml
- directory)
-jade -t tex -d /usr/local/share/docbook/print/docbook.dsl -D ../graphics postgres.sgml
-jadetex postgres.tex
-jadetex postgres.tex
-dvips postgres.dvi
-
-
- Of course, when you do this,
TeX will stop
- during the second run, and tell you that its capacity has been
- exceeded. This is, as far as we can tell, because of the way
-
JadeTeX generates cross referencing
- information.
TeX can, of course, be
- compiled with larger data structure sizes. The details of this will
- vary according to your installation.
+ Norm Walsh offers a major
+ url="http://nwalsh.com/emacs/docbookide/index.html">mode
+ specifically for DocBook which also has font-lock and a
+ number of features to reduce typing.
+
-
-
-
-
-
Alternate Toolsets
-
-
-
-
-
-