Next: PostScript graphics files Up: Document Preparation with Previous: Ghostview

Generating graphics

itself is a document preparation package overlaid on the typesetting package. While it is possible to produce diagrams and pictures of acceptable appearance using alone, the basic picture environment is difficult to learn, limited in scope, long-winded and, in general, extremely counter-intuitive. Its use is not recommended, except perhaps for very simple `boxes-and-lines' drawings.

In principle, however, the PostScript page description language used to drive output devices is capable of individually controlling every single possible pixel which might appear on a printed page (a page of 300dpi A4 LaserWriter output is made up of about 8000000 pixels). Hence, any sufficiently well-behaved PostScript `program' can be added to output in such a way as to make the added text part of the document. All that is required is to tell where on the page the extra PostScript text will draw whatever it is to draw and how large a box should be left to draw it, and can be persuaded to fit the rest of the document around it. Graphics production methods used alongside are then directed to generate drawings starting at the PostScript `origin' page position, and when incorporated in the document appear at whatever `current point' the source specifies.

Several methods of generating graphics are available locally for users:

As mentioned above. Extensions, such as `epic' and `eepic' are available, which can ease some repetitive tasks, and clearly, this method is the most portable available;
A MacDraw-like program available on X workstations which, along with conversion programs such as fig2dev and the `graphics management' TransFig package, provides the cleanest -Postscript combination available;
Another drawing program available in some parts of the Department (at the whim of whatever C++ compiler happens to be available!) that generates its own Postscript. Experience suggests that this can be persuaded into incorporation with a little tweaking;
A graph production program, capable of generating PostScript or HPGL. PostScript from xgraph can be incorporated into with very little modification;
Window dump files generated by the xwd program running on Sun or Hewlett-Packard workstations under the X Window system, converted to PostScript by xpr. Again, a little `hacking' of the Postcript will be required.

handles picture output for itself entirely internally, and its use will be discussed no further here; consult [Lamport86] for more details. The bulk of the remainder of this section concerns itself with `hints and tips' for getting around some of the more common problems associated with the other methods mentioned above.

Next: PostScript graphics files Up: Document Preparation with Previous: Ghostview