The hardcopy Postscript documentation is generated by converting the SGML source code to RTF, then importing into ApplixWare-4.4.1. After a little cleanup (see the following section) the output is "printed" to a postscript file.
INSTALL and HISTORY are updated for each release. For historical reasons, these files are in plain text, but are derived from the newer SGML sources.
Plain Text Generation
Both INSTALL and HISTORY are generated from existing SGML sources. They are extracted from the same intermediate RTF file.
Generate RTF by typing:
% cd doc/src/sgml % make installation.rtf
Import installation.rtf into Applix Words.
Set the page width and margins.
Adjust the page width in File.PageSetup to 10 inches.
Select all text. Adjust the right margin using the ruler to 9.5 inches. This will give a maximum column width of 79 characters, within the 80 columns upper limit goal.
Lop off the parts of the document which are not needed.
For INSTALL, remove all release notes from the end of the text, except for those from the current release. For HISTORY, remove all text up to the release notes, preserving and modifying the title and ToC.
Export the result as "ASCII Layout".
Using emacs or vi, clean up the tabular information in INSTALL. Remove the "mailto" URLs for the porting contributors to shrink the column heights.
Several areas are addressed while generating Postscript hardcopy, including RTF repair, ToC generation, and page break adjustments.
Applixware RTF Cleanup
jade, an integral part of the hardcopy procedure, omits specifying a default style for body text. In the past, this undiagnosed problem led to a long process of Table of Contents (ToC) generation. However, with great help from the ApplixWare folks the symptom was diagnosed and a workaround is available.
Generate the RTF input by typing (for example):
% cd doc/src/sgml % make tutorial.rtf
Repair the RTF file to correctly specify all styles, in particular the default style. The field can be added using vi or the following small sed procedure:
#!/bin/sh # fixrtf.sh # Utility to repair slight damage in RTF files generated by jade # Thomas Lockhart <lockhart@alumni.caltech.edu> # for i in $* ; do mv $i $i.orig cat $i.orig | sed 's#\\stylesheet#\\stylesheet{\\s0 Normal;}#' > $i done exitwhere the script is adding {\s0 Normal;} as the zero-th style in the document. According to ApplixWare, the RTF standard would prohibit adding an implicit zero-th style, though M$Word happens to handle this case.
Open a new document in Applix Words and then import the RTF file.
Generate a new ToC using ApplixWare.
Select the existing ToC lines, from the beginning of the first character on the first line to the last character of the last line.
Build a new ToC using Tools.BookBuilding.CreateToC. Select the first three levels of headers for inclusion in the ToC. This will replace the existing lines imported in the RTF with a native ApplixWare ToC.
Adjust the ToC formatting by using Format.Style, selecting each of the three ToC styles, and adjusting the indents for First and Left. Use the following values:
Table DG2-2. Indent Formatting for Table of Contents
Style | First Indent (inches) | Left Indent (inches) |
---|---|---|
TOC-Heading 1 | 0.6 | 0.6 |
TOC-Heading 2 | 1.0 | 1.0 |
TOC-Heading 3 | 1.4 | 1.4 |
Work through the document to:
Adjust page breaks.
Adjust table column widths.
Insert figures into the document. Center each figure on the page using the centering margins button on the ApplixWare toolbar.
Note: Not all documents have figures. You can grep the SGML source files for the string "graphic" to identify those parts of the documentation which may have figures. A few figures are replicated in various parts of the documentation.
Replace the right-justified page numbers in the Examples and Figures portions of the ToC with correct values. This only takes a few minutes per document.
If a bibliography is present, remove the short form reference title from each entry. The DocBook stylesheets from Norm Walsh seem to print these out, even though this is a subset of the information immediately following.
Save the document as native Applix Words format to allow easier last minute editing later.
"Print" the document to a file in Postscript format.
Compress the Postscript file using gzip. Place the compressed file into the doc directory.