next up previous contents index
Next: D. Availability of GMT Up: GMT_Docs Previous: B.3 Sun raster files   Contents   Index


C. Making GMT Encapsulated PostScript Files

GMT can produce both freeform PostScript files and the more restricted Encapsulated PostScript files (EPS). The former is intended to be sent to a printer or PostScript previewer, while the latter is indended to be included in another document (but should also be able to print and preview). You control what kind of PostScript that GMT produces by manipulating the PAPER_MEDIA parameter (see the gmtdefaults man page for how this is accomplished). Note that a freeform PostScript file may contain special operators (such as Setpagedevice) that is specific to printers (e.g., selection of paper tray). Some previewers (among them, Sun's pageview) do not understand these valid instructions and may fail to image the file. If this is your situation you should choose another viewer (we recommend ghostview) or select EPS output instead.

However, there is much confusion over what an EPS file is and if other programs can read it. Much of this has to do with the claim by some software manufacturers that their programs can read and edit EPS files. We used to get much mail from people asking us to let GMT produce EPS files that can be read, e.g., by Adobe Illustrator. This was a limitation of early versions of Adobe Illustrator and similar programs, not GMT! Since then, Adobe Illustrator and other programs have improved their abilities to parse freeform PostScript such as that produced by GMT, but problems seem to occasionally reappear.

An EPS file that is to be placed into another application (such as a text document) need to have correct bounding-box parameters. These are found in the PostScript Document Comment %%BoundingBox. Applications that generate EPS files should set these parameters correctly. Because GMT makes the PostScript files on the fly, often with several overlays, it is not possible to do so accurately. However, GMT does make an effort to ensure that the boundingbox is large enough to contain the entire composite plotC.1. Therefore, if you need a ``tight'' boundingbox you need to post-process your PostScript file. There are several ways in which this can be accomplished.

If you do not want to modify the illustration but just include it in a text document: Many word processors (such as Microsoft Word and Corel WordPerfect) will let you include a PostScript file that you may place but not edit. You will not be able to view the figure on-screen, but it will print correctly. All illustrations in this GMT documentation were GMT-produced PostScript files that were converted to EPS files using ps2epsi and then included into a LATEX document.

These examples do not constitute endorsements of the products mentioned above; they only represent our limited experience with the problem. For other solutions and further help, please post messages to gmt-help@hawaii.edu.


next up previous contents index
Next: D. Availability of GMT Up: GMT_Docs Previous: B.3 Sun raster files   Contents   Index
Paul Wessel 2006-01-01