QUB | Archaeology and Palaeoecology | The 14Chrono Centre
Borland Turbo C++ 3.0 on IBM-compatible PC
Free Software Foundation gcc under SunOS 4.1 UNIX on Sun4m
cc under IRIX 5.1 UNIX on IP22
cc under SCO Development System on IBM-compatible PC
Symantec THINK C on Macintosh
Linux 2.0.18 - 2.2.24
Mac Os X 10.1-10.3
The use of ANSI C rather than QuickBASIC (as versions of psimpoll before 2.00) produces a smaller executable file that runs faster and has source code that is portable.
The PostScript language provides a way to describe any piece of graphics or text in a text file (with ASCII coding) that can be read and interpreted on many printers (especially, but not exclusively, laser printers). Software packages now often include a PostScript driver which can either send output directly to the printer/plotter, or generate an ASCII file with the commands to generate the work on any output device with a PostScript interpreter. Since a driver is available in many packages, and the interpreter is available in many output devices, the ASCII file provides a useful way to link the two without both being present at the same site. As an ASCII file, a PostScript file can be easily moved by e-mail.
PostScript is probably most readily available, as standard, in the Apple LaserWriter printers, but can added to many other printers by purchase of an additional card. The Apple LaserWriter is an excellent laserprinter, and it can be connected to PC-compatibles through a COM port, but it may be necessary to tinker with the wiring to overcome the incompatibility of Apple and IBM (see, for example, Glover 1989, Fig. 5).
PostScript is a `simple interpretative programming language' (Adobe 1990, pp. 345-678), which describes the appearance of a page, whether text, graphics, or both. Adobe own the copyright in the operators and specification of PostScript, but allow anyone to use them, under certain conditions. A typical file will have a header, such as %!PS-Adobe-3.0, definition of sundry parameters for the page (e.g., font, character size), and definition of operators (to reduce repetition in the body of the page). %%, followed by a keyword, introduces a standard set of `document structuring conventions', which are usually comments. Campbell (1993) gives a brief introduction to some commonly used commands. Operands precede their operators, so (ABC) show prints ABC at the current location. showpage prints the current page and prepares for the next. For graphics, 20 40 lineto is one segment of a `path', from the location 0 0 to 20 40 in the current co-ordinates. Text and graphics alike can be moved around on the page, rotated, and scaled. PostScript files are ASCII, so they can be edited using an appropriate editor (e.g., EDIT in DOS 5, or `non-document' mode of WordStar), and I do this with text files to include special characters, but there is not too much that can be done with this kind of fiddling. More significant is the possibility of writing PostScript drivers in any programming language, and thus producing output from almost any software that can be printed on any output device with a PostScript interpreter.
Use of PostScript thus has considerable potential for improving the ready portability of pollen diagrams, whether for publication or as part of information exchange, and that is why psimpoll and pscomb produce their output as PostScript files.
The exact amount of space taken up by printed characters needs to be known in order to calculate the space needed for text in labels (e.g., zone labels). This is done with data from Adobe font metrics (AFM) files, using the versions included with WordStar 5, Sun UNIX, and via anonymous ftp from unix.hensa.ac.uk. These files also give the heights of characters, and this information is used for correctly locating certain accents.
Many accented characters are available as single characters in ISO Latin 1 encoding, but others need to be created by combining the unaccented character with the accent (e.g., the long Hungarian umlaut). Positioning the acccent accurately needs information on the width of the character and accent, height of the character, and the height of the base of the accent when printed normally. With these data, the character is printed, then the current position of the `pen' is `back-spaced' to the point where it should start drawing the accent centred over (or under) the character, raising the `pen' position if necessary so that the accent will not overprint the character, and finally the accent is drawn. Then the pen position updates to the location it had after drawing the character.
The different fonts in the two series are for different sizes (title size, basic, and subscript / superscript), and for roman style and oblique style.
psimpoll uses `Symbol' to obtain special characters, notably the circle-and-cross character in radiocarbon age columns, and also the Greek alphabet.
It is assumed, by default that the paper being used is A4, with length 297 mm, and width 210 mm (this can be changed in menu Ae. Locations on the page are measured in units of 0.01 mm, necessitating a scale factor in the PostScript file. The default usable area of the page is 240 mm long and 240 / square-root(2) = 169.7 mm high, centred on the page. The length can be changed in menu Ac. The height is adjusted automatically to maintain the same proportion, but can be changed itself (menu Ad). For US paper, with dimensions 11" × 8", the usable paper length should be given as 226 mm, and the usable height as 123 mm.
Within this usable area, psimpoll fills the space with `boxes', building up from left to right until the space is full (at a rate that depends on the scale factor from menu A). A `box' may be an axis, a descriptive column (e.g., sediment), or a plotted curve. Each box is preceded by a translation that shifts the origin along the page. The instructions for the image of each box are then given relative to this new origin. The default proportion of the width of the paper occupied by the diagram height is 75% of the usable area, or 127 mm. This figure can be modified in menu Ad. The location of captions is fixed relative to the diagram, so they will move closer in if the height of the diagram is reduced.
Within the program, all text is rotated 90° to bring it from the natural horizontal position of portrait orientation to the correct natural position for landscape orientation. Rotations specified in menu De (default 45°) are additional to this rotation, and control the angle of rotation from the horizontal position of landscape orientation.
The numbers in the PostScript output file giving locations on the page are thus in units of 0.01 mm. The first of each pair is the x-axis co-ordinate, increasing from the left edge of a page held in portrait location (i.e., in the direction of down the depth axis of the resulting diagram). The second number of each pair is the y-axis co-ordinate, increasing from the lower edge of a page held in portrait location (i.e., in the direction of along the resulting diagram). The co-ordinate origin shifts along the page, in the y-axis direction, for the plotting of each box.
Within the PostScript output file, boxes are demarcated by a series of comments that enable pscomb to break the file back into boxes and rebuild a new file by combining boxes from different files. The comment lines begin with `%', which means that the PostScript interpreter ignores them, and they are interpreted by pscomb as follows:
Archaeology and Palaeoecology | 42 Fitzwilliam St | Belfast BT9 6AX | Northern Ireland | tel +44 28 90 97 5136