1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
|
<appendix label="A">
<docinfo>
<authorgroup>
<author>
<firstname>Thomas</firstname>
<surname>Lockhart</surname>
</author>
<author>
<firstname>Tom Ivar</firstname>
<surname>Helbekkmo</surname>
</author>
</authorgroup>
<date>1998-04-28</date>
</docinfo>
<title>Documentation</title>
<para>
<productname>Postgres</productname> documentation is written using the
<firstterm>Standard Generalized Markup Language</firstterm>
(<acronym>SGML</acronym>) <ulink url="http://www.ora.com/davenport/">
<productname>DocBook</productname></ulink> <firstterm>Document Type
Definition</firstterm> (<acronym>DTD</acronym>).</para>
<para>
Packaged documentation is available in both
<firstterm>HTML</firstterm> and <firstterm>Postscript</firstterm>
formats. These are available as part of the standard
<productname>Postgres</productname> installation. We discuss here
working with the documentation sources and generating documentation
packages.
<note>
<para>
This is the first release of new <productname>Postgres</productname>
documentation in three years. The content and environment are in flux
and still evolving.
</para>
</note></para>
<sect1>
<title>Introduction</title>
<para>
The purpose of <acronym>SGML</acronym> is to allow an author to
specify the structure and content of a document (e.g. using the
<productname>DocBook</productname> <acronym>DTD</acronym>), and to
have the document style define how that content is rendered into a
final form (e.g. using Norm Walsh's stylesheets).</para>
<para>
See <ulink
url="http://nis-www.lanl.gov/~rosalia/mydocs/docbook-intro.html">
Introduction to DocBook</ulink> for a nice "quickstart" summary of
DocBook features. <ulink
url="http://www.ora.com/homepages/dtdparse/docbook/3.0/"> DocBook
Elements</ulink> provides a powerful cross-reference for features of
<productname>DocBook</productname>.</para>
<para>
This documentation set is constructed using several tools, including
James Clark's <ulink url="http://www.jclark.com/jade/">
<productname>jade</productname></ulink> and Norm Walsh's <ulink
url="http://www.berkshire.net/~norm/docbook/dsssl">Modular DocBook
Stylesheets</ulink>.</para>
<para>
Currently, hardcopy is produced by importing <firstterm>Rich Text
Format</firstterm> (<acronym>RTF</acronym>) output from
<application>jade</application> to
<productname>ApplixWare</productname> for minor formatting fixups then
exporting as a Postscript file.</para>
<para>
<ulink url="http://sunsite.unc.edu/pub/packages/TeX/systems/unix/">
<productname>TeX</productname></ulink> is a supported format for
<application>jade</application> output, but was not used at this time
for several reasons, including the inability to make minor format
fixes before committing to hardcopy and generally inadequate table
support in the <productname>TeX</productname>
stylesheets.</para></sect1>
<sect1>
<title>Styles and Conventions</title>
<para>
<productname>DocBook</productname> has a rich set of tags and
constructs, and a suprisingly large percentage are directly and
obviously useful for well-formed documentation. The
<productname>Postgres</productname> documentation set has only
recently been adapted to <acronym>SGML</acronym>, and in the near
future several sections of the set will be selected and maintained as
prototypical examples of <productname>DocBook</productname> usage.
Also, a short summary of <productname>DocBook</productname> tags will
be included below.
</para>
<!--
<para>
<table tocentry="1">
<title>SGML Constructs</title>
<titleabbrev>SGML Constructs</titleabbrev>
<tgroup cols="2">
<thead>
<row>
<entry>SGML Tag</entry>
<entry>Usage</entry>
</row>
</thead>
<tbody>
<row>
<entry>Book</entry>
<entry>Delimits a Book element</entry>
</row>
<row>
<entry>Chapter</entry>
<entry>Delimits a Chapter element</entry>
</row>
<row>
<entry>Appendix</entry>
<entry>Delimits a Appendix element</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
-->
</sect1>
<sect1>
<title>Document Writing</title>
<sect2>
<title>Document Structure</title>
<para>
There are currently five separate documents written in DocBook. Each document
has a container source document which defines the DocBook environment and other
document source files. These primary source files are located in
<filename>doc/src/sgml/</filename>, along with many of the other source files
used for the documentation. The primary source files are:
<variablelist>
<varlistentry>
<term>postgres.sgml</term>
<listitem>
<para>
This is the integrated document, including all other documents.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>tutorial.sgml</term>
<listitem>
<para>
The introductory tutorial, with examples. Does not include programming topics,
and is intended to help get someone unfamiliar with <acronym>SQL</acronym> started.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>user.sgml</term>
<listitem>
<para>
The User's Guide. Includes information on data types and user-level interfaces.
This is the place to put information on "why".
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>reference.sgml</term>
<listitem>
<para>
The Reference Manual. Includes <productname>Postgres</productname> <acronym>SQL</acronym> syntax.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>programming.sgml</term>
<listitem>
<para>
The Programmer's Guide. Includes information on <productname>Postgres</productname>
extensibility and on the programming interfaces.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>admin.sgml</term>
<listitem>
<para>
The Administrator's Guide. Include installation and release notes.
</para>
</listitem>
</varlistentry>
</variablelist>
<sect2>
<title>Authoring Tools</title>
<para>
The current <acronym>Postgres</acronym> documentation set is written using
a plain text editor (or emacs/psgml; see below) with the content marked up using
<acronym>SGML</acronym>.
<para>
<acronym>SGML</acronym> and <productname>DocBook</productname> do not suffer
from an oversupply of open-source authoring tools. The most common toolset is
the emacs/xemacs editing package with the psgml feature extension.
On some systems (e.g. RedHat Linux) these tools are provided in a typical full installation.
<sect3>
<title>emacs/psgml</title>
<para>
When using emacs/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's 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:
<programlisting>
<sgmltag>!doctype appendix PUBLIC "-//Davenport//DTD DocBook V3.0//EN"</sgmltag>
</programlisting>
This means that anything and everything that reads <acronym>SGML</acronym> will get it
right, and I can verify the document with "nsgmls -s docguide.sgml".
</sect3>
</sect2>
</sect1>
<sect1>
<title>Building Documentation</title>
<para>
GNU <application>make</application> is used to build documentation from the DocBook sources.
There are a few environment definitions which may need to be set or modified for your installation.
The <filename>Makefile</filename> looks for
<filename>doc/../src/Makefile</filename>
and (implicitly) for
<filename>doc/../src/Makefile.custom</filename>
to obtain environment information. On my system, the <filename>src/Makefile.custom</filename> looks like
<programlisting>
# Makefile.custom
# Thomas Lockhart 1998-03-01
POSTGRESDIR= /opt/postgres/current
CFLAGS+= -m486
YFLAGS+= -v
# documentation
HSTYLE= /home/tgl/SGML/db107.d/docbook/html
PSTYLE= /home/tgl/SGML/db107.d/docbook/print
</programlisting>
where HSTYLE and PSTYLE determine the path to <filename>docbook.dsl</filename> for <acronym>HTML</acronym>
and hardcopy (print) stylesheets, respectively. These stylesheet file names are for Norm Walsh's
Modular Style Sheets; if other stylesheets are used then one can define HDSL and PDSL as the full path
and file name for the stylesheet, as is done above for HSTYLE and PSTYLE.
On many systems, these stylesheets will be found in packages installed in
<filename>/usr/lib/sgml/</filename>,
<filename>/usr/share/lib/sgml/</filename>,
or
<filename>/usr/local/lib/sgml/</filename>.
<para>
<acronym>HTML</acronym> documentation packages can be generated from the <acronym>SGML</acronym> source by
typing
<programlisting>
% cd doc/src
% make tutorial.tar.gz
% make user.tar.gz
% make admin.tar.gz
% make programmer.tar.gz
% make postgres.tar.gz
% make install
</programlisting>
</para>
<para>
These packages can be installed from the main documentation directory
by typing
<programlisting>
% cd doc
% make install
</programlisting>
</para></sect1>
<sect1>
<title>Hardcopy Generation for v6.3</title>
<para>
The hardcopy Postscript documentation is generated by converting the
<acronym>SGML</acronym> source code to <acronym>RTF</acronym>, then
importing into Applixware. After a little cleanup (see the following
section) the output is "printed" to a postscript file.</para>
<para>
Some figures were redrawn to avoid having bitmap
<acronym>GIF</acronym> files in the hardcopy documentation. One
figure, of the system catalogs, was sufficiently complex that there
was not time to redraw it. It was converted to fit using the
following commands:
<programlisting>
% convert -v -geometry 400x400'>' figure03.gif con.gif
% convert -v -crop 400x380 con.gif connections.gif
</programlisting></para>
<sect2>
<title><acronym>RTF</acronym> Cleanup Procedure</title>
<para>
Several items must be addressed in generating Postscript
hardcopy:</para>
<procedure>
<title>Applixware <acronym>RTF</acronym> Cleanup</title>
<para>
Applixware does not seem to do a complete job of importing <acronym>RTF</acronym>
generated by jade/MSS. In particular, all text is given the
<quote>Header1</quote> style attribute label, although the text
formatting itself is acceptable. Also, the Table of Contents page
numbers do not refer to the section listed in the table, but rather
refer to the page of the ToC itself.</para>
<step performance="required">
<para>
Generate the <acronym>RTF</acronym> input by typing
<programlisting>
% cd doc/src/sgml
% make tutorial.rtf
</programlisting>
</para>
</step>
<step performance="required">
<para>
Open a new document in <productname>Applix Words</productname> and
then import the <acronym>RTF</acronym> file.
</para>
</step>
<step performance="required">
<para>
Print out the existing Table of Contents, to mark up in the following
few steps.
</para>
</step>
<step performance="required">
<para>
Insert figures into the document. Center each figure on the page using
the centering margins button.</para>
<para>
Not all documents have figures. You can grep the <acronym>SGML</acronym> source files for
the string <quote>Graphic</quote> to identify those parts of the
documentation which may have figures. A few figures are replicated in
various parts of the documentation.
</para>
</step>
<step performance="required">
<para>
Work through the document, adjusting page breaks and table column
widths.
</para>
</step>
<step performance="required">
<para>
If a bibliography is present, Applix Words seems to mark all remaining
text after the first title as having an underlined attribute. Select
all remaining text, turn off underlining using the underlining button,
then explicitly underline each document and book title.
</para>
</step>
<step performance="required">
<para>
Work through the document, marking up the ToC hardcopy with the actual
page number of each ToC entry.
</para>
</step>
<step performance="required">
<para>
Replace the right-justified incorrect page numbers in the ToC with
correct values. This only takes a few minutes per document.
</para>
</step>
<step performance="required">
<para>
Save the document as native Applix Words format to allow easier last
minute editing later.
</para>
</step>
<step performance="required">
<para>
Export the document to a file in Postscript format.
</para>
</step>
<step performance="required">
<para>
Compress the Postscript file using <application>gzip</application>.
Place the compressed file into the <filename>doc</filename> directory.
</para>
</step>
</procedure>
</sect2>
</sect1>
<sect1>
<title>Toolsets</title>
<para>
We have documented experience with two installation methods for the
various tools that are needed to process the documentation. One is
installation from <acronym>RPM</acronym>s on
<productname>Linux</productname>, the other is a general installation
from original distributions of the individual tools. Both will be
described below.</para>
<para>
We understand that there are some other packaged distributions for
these tools. <productname>FreeBSD</productname> seems to have them
available. Please report package status to the docs mailing list and
we will include that information here.</para>
<sect2>
<title><acronym>RPM</acronym> installation on
<productname>Linux</productname></title>
<para>
Install <ulink url="ftp://ftp.cygnus.com/pub/home/rosalia/">
<acronym>RPM</acronym>s</ulink> for <productname>Jade</productname>
and related packages.
</para>
</sect2>
<sect2>
<title>Manual installation of tools</title>
<para>This is a brief run-through of the process of obtaining and
installing the software you'll need to edit DocBook source with Emacs
and process it with Norman Walsh's DSSSL style sheets to create <acronym>HTML</acronym>
and <acronym>RTF</acronym>.</para>
<sect3><title>Prerequisites</title>
<para>What you need:
<itemizedlist>
<listitem><para>A working installation of GCC 2.7.2</para></listitem>
<listitem><para>A working installation of Emacs 19.19 or later</para></listitem>
<listitem><para>An unzip program for UNIX to unpack things</para></listitem>
</itemizedlist>
</para>
<para>What you must fetch:
<itemizedlist>
<listitem>
<para><ulink url="ftp://ftp.jclark.com/pub/jade/jade1_1.zip">
James Clark's <productname>Jade</productname> version 1.1</ulink>
</para></listitem>
<listitem>
<para><ulink url="http://www.ora.com/davenport/docbook/current/docbk30.zip">
<productname>DocBook</productname> version 3.0</ulink>
</para></listitem>
<listitem>
<para><ulink url="http://nwalsh.com/docbook/dsssl/db107.zip">
Norman Walsh's <productname>Modular Stylesheets</productname>
version 1.07</ulink>
</para></listitem>
<listitem>
<para><ulink url="ftp://ftp.lysator.liu.se/pub/sgml/psgml-1.0.1.tar.gz">
Lennart Staflin's <productname>PSGML</productname> version 1.0.1</ulink>
</para></listitem>
</itemizedlist>
</para>
<para>Important URLs:
<itemizedlist>
<listitem><para><ulink url="http://www.jclark.com/jade/">
The <productname>Jade</productname> web page</ulink></para></listitem>
<listitem><para><ulink url="http://www.ora.com/davenport/">
The <productname>DocBook</productname> web page</ulink></para></listitem>
<listitem><para><ulink url="http://nwalsh.com/docbook/dsssl/">
The <productname>Modular Stylesheets</productname> web page</ulink>
</para></listitem>
<listitem><para>
<ulink url="http://www.lysator.liu.se/projects/about_psgml.html">
The <productname>PSGML</productname> web page</ulink></para></listitem>
<listitem><para><ulink url="http://www.infotek.no/sgmltool/guide.htm">
Steve Pepper's Whirlwind Guide</ulink></para></listitem>
<listitem><para><ulink url="http://www.sil.org/sgml/publicSW.html">
Robin Cover's database of <acronym>SGML</acronym> software</ulink></para></listitem>
</itemizedlist>
</para>
</sect3>
<sect3><title>Installing Jade</title>
<para>First, read the installation instructions at the above listed
URL.</para>
<para>Unzip the distribution kit in a suitable place. The command to do
this will be something like
<programlisting>
unzip -aU jade1_1.zip
</programlisting>
</para>
<para><productname>Jade</productname> is not built using
<productname>GNU Autoconf</productname>, so you'll need to edit a
<filename>Makefile</filename> 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 <productname>Jade</productname>
distribution, copy the file <filename>Makefile</filename> from the
main directory into it, edit it there, and then run
<command>make</command> there.</para>
<para>However, the <filename>Makefile</filename> does need to be
edited. There is a file called <filename>Makefile.jade</filename> in
the main directory, which is intended to be used with <command>make -f
Makefile.jade</command> when building <productname>Jade</productname>
(as opposed to just <productname>SP</productname>, the <acronym>SGML</acronym> parser kit
that <productname>Jade</productname> 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 <filename>Makefile.jade</filename>, so you'd have to
edit one of them anyway.</para>
<para>Go through the <filename>Makefile</filename>, 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:
<programlisting>
prefix = /usr/local
XDEFINES = -DSGML_CATALOG_FILES_DEFAULT=\"/usr/local/share/sgml/catalog\"
XLIBS = -lm
RANLIB = ranlib
srcdir = ..
XLIBDIRS = grove spgrove style
XPROGDIRS = jade
</programlisting>
Note the specification of where to find the default catalog of
<acronym>SGML</acronym> 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
<command>ranlib</command> command, leave them as they are in the
<filename>Makefile</filename>.
</para>
<para>Now type <command>make</command> to build Jade and the various
<productname>SP</productname> tools.</para>
<para>Once the software is built, <command>make install</command> will
do the obvious.</para>
</sect3>
<sect3><title>Installing the <productname>DocBook</productname>
<acronym>DTD</acronym> kit</title>
<para>You'll want to place the files that make up the
<productname>DocBook</productname> <acronym>DTD</acronym> kit in the
directory you built <productname>Jade</productname> to expect them in,
which, if you followed our suggestion above, is
<filename>/usr/local/share/sgml/</filename>. In addition to the
actual <productname>DocBook</productname> files, you'll need to have a
<filename>catalog</filename> 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 <acronym>ISO</acronym>
character set mappings, and probably one or more versions of
<acronym>HTML</acronym>.</para>
<para>One way to install the various <acronym>DTD</acronym> and
support files and set up the <filename>catalog</filename> file, is to
collect them all into the above mentioned directory, use a single file
named <filename>CATALOG</filename> to describe them all, and then
create the file <filename>catalog</filename> as a catalog pointer to
the former, by giving it the single line of content:
<programlisting>
CATALOG /usr/local/share/sgml/CATALOG
</programlisting>
The <filename>CATALOG</filename> file should then contain three types
of lines. The first is the (optional) <acronym>SGML</acronym>
declaration, thus:
<programlisting>
SGMLDECL docbook.dcl
</programlisting>
Next, the various references to <acronym>DTD</acronym> and entity
files must be resolved. For the <productname>DocBook</productname>
files, these lines look like this:
<programlisting>
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
</programlisting>
Of course, a file containing these comes with the
<productname>DocBook</productname> 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
<acronym>SGML</acronym> directory if you like, of course, and modify
the reference in the <filename>CATALOG</filename> file.
<productname>DocBook</productname> also references the
<acronym>ISO</acronym> 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:
<programlisting>
PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN" ISO/ISOlat1
</programlisting>
Note how the file name here contains a directory name, showing that
we've placed the <acronym>ISO</acronym> entity files in a subdirectory
named <filename>ISO</filename>. Again, proper catalog entries should
accompany the entity kit you fetch.
</para>
</sect3>
<sect3><title>Installing Norman Walsh's <acronym>DSSSL</acronym>
style sheets</title>
<para>First, read the installation instructions at the above listed
URL.</para>
<para>To install Norman's style sheets, simply unzip the distribution
kit in a suitable place. A good place to dot this would be
<filename>/usr/local/share</filename>, which places the kit in a
directory tree under <filename>/usr/local/share/docbook</filename>.
The command will be something like
<programlisting>
unzip -aU db107.zip
</programlisting>
</para>
<para>One way to test the installation is to build the
<acronym>HTML</acronym> and <acronym>RTF</acronym> forms of the
<productname>PostgreSQL</productname> manual. Go to the <acronym>SGML</acronym> source
directory, <filename>doc/src/sgml</filename>, and say
<programlisting>
jade -t sgml -d /usr/local/share/docbook/html/docbook.dsl -D ../graphics postgres.sgml
</programlisting>
to build the <acronym>HTML</acronym> files ("book1.htm" is the top level node), and
<programlisting>
jade -t rtf -d /usr/local/share/docbook/print/docbook.dsl -D ../graphics postgres.sgml
</programlisting>
to generate the <acronym>RTF</acronym> output, ready for importing
into your favorite word processing system and printing.</para>
</sect3>
<sect3><title>Installing <productname>PSGML</productname></title>
<para>First, read the installation instructions at the above listed
URL.</para>
<para>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
<filename>/usr/local/share/emacs/site-lisp/site-start.el</filename>
file to make <productname>Emacs</productname> properly load
<productname>PSGML</productname> when needed:
<programlisting>
(setq load-path
(cons "/usr/local/share/emacs/site-lisp/psgml" load-path))
(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t)
</programlisting>
If you want to use <productname>PSGML</productname> when editing
<acronym>HTML</acronym> too, also add this:
<programlisting>
(setq auto-mode-alist
(cons '("\\.s?html?\\'" . sgml-mode) auto-mode-alist))
</programlisting>
</para>
<para>There is one important thing to note with
<productname>PSGML</productname>: its author assumed that your main
<acronym>SGML</acronym> <acronym>DTD</acronym> directory would be
<filename>/usr/local/lib/sgml</filename>. If, as in the examples in
this chapter, you use <filename>/usr/local/share/sgml</filename>, you
have to compensate for this. You can set the
<filename>SGML_CATALOG_FILES</filename> environment variable, you can
customize your <productname>PSGML</productname> installation (its
manual tells you how), or you can even edit the source file
<filename>psgml.el</filename> before compiling and installing
<productname>PSGML</productname>, changing the hard-coded paths to
match your own default.</para>
</sect3>
<sect3><title>Optional: installing <productname>JadeTeX</productname></title>
<para>If you want to, you can also install
<productname>JadeTeX</productname> to use
<productname>TeX</productname> as a formatting backend for
<productname>Jade</productname>. Note that this is still quite
unpolished software, and will generate printed output that is inferior
to what you get from the <acronym>RTF</acronym> backend. Still, it
works all right, especially for simpler documents that don't use
tables, and as both <productname>JadeTeX</productname> and the style
sheets are under continuous improvement, it will certainly get better
over time.</para>
<para>To install and use <productname>JadeTeX</productname>, you will
need a working installation of <productname>TeX</productname> and
<productname>LaTeX2e</productname>, including the supported
<productname>tools</productname> and
<productname>graphics</productname> packages,
<productname>Babel</productname>, <productname><acronym>AMS</acronym>
fonts</productname> and <productname>AMS-LaTeX</productname>, the
<productname><acronym>PSNFSS</acronym></productname> extension and
companion kit of "the 35 fonts", the <productname>dvips</productname>
program for generating <productname>PostScript</productname>, the
macro packages <productname>fancyhdr</productname>,
<productname>hyperref</productname>,
<productname>minitoc</productname>, <productname>url</productname> and
<productname>ot2enc</productname>, and of course
<productname>JadeTeX</productname> itself. All of these can be found
on your friendly neighborhood <acronym>CTAN</acronym> site.</para>
<para><productname>JadeTeX</productname> does not at the time of
writing come with much of an installation guide, but there is a
<filename>makefile</filename> which shows what is needed. It also
includes a directory <filename>cooked</filename>, wherein you'll find
some of the macro packages it needs, but not all, and not complete --
at least last we looked.</para>
<para>Before building the <filename>jadetex.fmt</filename> format
file, you'll probably want to edit the
<filename>jadetex.ltx</filename> file, to change the configuration of
<productname>Babel</productname> to suit your locality. The line to
change looks something like
<programlisting>
\RequirePackage[german,french,english]{babel}[1997/01/23]
</programlisting>
and you should obviously list only the languages you actually need,
and have configured <productname>Babel</productname> for.</para>
<para>With <productname>JadeTeX</productname> working, you should be
able to generate and format <productname>TeX</productname> output for
the <productname>PostgreSQL</productname> manuals by giving the
commands (as above, in the <filename>doc/src/sgml</filename>
directory)
<programlisting>
jade -t tex -d /usr/local/share/docbook/print/docbook.dsl -D ../graphics postgres.sgml
jadetex postgres.tex
jadetex postgres.tex
dvips postgres.dvi
</programlisting>
Of course, when you do this, <productname>TeX</productname> 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
<productname>JadeTeX</productname> generates cross referencing
information. <productname>TeX</productname> can, of course, be
compiled with larger data structure sizes. The details of this will
vary according to your installation.
</para>
</sect3>
</sect2>
</sect1>
<sect1>
<title>Alternate Toolsets</title>
<para>
The current stable release of <productname>sgml-tools</productname> is
version 1.0.4. The v1.0 release includes some restructuring of the
directory tree to more easily support additional document styles,
possibly including <productname>DocBook</productname>. The only
version of <productname>sgml-tools</productname> evaluated for
<productname>Postgres</productname> was v0.99.0.
</para>
<sect2>
<title><productname>sgml-tools</productname></title>
<para>
Install
<productname>sgml-tools-0.99.0</productname>
</para>
<para>
Apply <ulink
url="http://alumni.caltech.edu/~lockhart/postgres/linuxdoc/sgml-tools-patches-0.99.0.tar.gz">
<productname>sgml-tools-patches</productname> </ulink> to the linuxdoc
styles. These patches fix small problems with table formatting and
with figure file names on conversion to postscript or html.
</para></sect2>
<sect2>
<title><productname>sgml2latex</productname></title>
<para>
The current stable release of <productname>sgml2latex</productname> is
version 1.4. I have misplaced the original reference for this package,
so will temporarily post it with this example.
</para>
<para>
Install <ulink
url="http://alumni.caltech.edu/~lockhart/postgres/linuxdoc/sgml2latex-format.1.4.tar.gz">
<productname>sgml2latex</productname> </ulink>.
</para></sect2>
<sect2>
<title><productname>latex</productname></title>
<para>
Get and install <productname>texmf</productname>,
<productname>teTeX</productname>, or another package providing full
tex/latex functionality.
</para>
<para>
Add the
<ulink
url="http://alumni.caltech.edu/~lockhart/postgres/linuxdoc/latex-styles-0.99.0.tar.gz">required styles</ulink>
linuxdoc-sgml.sty, linuxdoc-sgml-a4.sty isolatin.sty, qwertz.sty, and
null.sty to texmf/tex/latex/tools/ or the appropriate area.
<programlisting>
% cat latex-styles-0.99.0.tar.gz | (cd texmf/tex/latex/tools/; tar zxvf -)
</programlisting>
Run <productname>texhash</productname> to update the tex database.
</para></sect2></sect1>
</appendix>
|