Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > os > by-pkgid > 4b194777eaf705e440bb2ce282d32772 > files > 618

GMT-doc-4.5.3-3.fc14.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>C.1 Making GMT Encapsulated PostScript Files</TITLE>
<META NAME="description" CONTENT="C.1 Making GMT Encapsulated PostScript Files">
<META NAME="keywords" CONTENT="GMT_Docs">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="GMT_Docs.css">

<LINK REL="next" HREF="node190.html">
<LINK REL="previous" HREF="node188.html">
<LINK REL="up" HREF="node188.html">
<LINK REL="next" HREF="node190.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html5341"
  HREF="node190.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html5335"
  HREF="node188.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html5329"
  HREF="node188.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html5337"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html5339"
  HREF="node256.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html5342"
  HREF="node190.html">C.2 Converting GMT PostScript</A>
<B> Up:</B> <A NAME="tex2html5336"
  HREF="node188.html">C. Including GMT graphics</A>
<B> Previous:</B> <A NAME="tex2html5330"
  HREF="node188.html">C. Including GMT graphics</A>
 &nbsp; <B>  <A NAME="tex2html5338"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html5340"
  HREF="node256.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION002010000000000000000"></A>
<A NAME="sec:eps"></A>
<BR>
C.1 Making <A NAME="tex2html1693"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> Encapsulated <I>PostScript</I> Files
</H1>
<A NAME="30167"></A>
<A NAME="30168"></A>
<A NAME="30169"></A>

<P>
<A NAME="tex2html1696"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> can produce both freeform <I>PostScript</I> files and the more restricted Encapsulated <I>PostScript</I> files (EPS).  The former is intended to be sent to a printer or <I>PostScript</I> previewer, while the latter is intended to be included in another document (but should also be able to print and preview).  You control what kind of <I>PostScript</I> that <A NAME="tex2html1697"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> produces by manipulating the <B>PAPER_MEDIA</B> parameter (see the <A NAME="tex2html1698"
  HREF="../man/gmtdefaults.html"><I><B>gmtdefaults</B></I></A><A NAME="30357"></A> man page for how this is accomplished).  Note that a freeform <I>PostScript</I> file may contain special operators (such as <TT>Setpagedevice</TT>) that is specific to printers (e.g., selection of paper tray). Some previewers (among them, Sun's <I>pageview</I><A NAME="30362"></A>) do not understand these valid instructions and may fail to image the file. Also, embedding freeform <I>PostScript</I> with such instructions in it into a larger document can create printing to fail. While you could choose another viewer (we recommend <I>ghostview</I><A NAME="30366"></A>) to view single plots prepared by <A NAME="tex2html1699"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A>, it is generally wiser anyhow to select EPS output when you are creating a plot intended for inclusion into a larger document. Some programs (and some publishers as well) do not allow the use of instructions like <TT>Setpagedevice</TT> as part of embedded graphics.

<P>
An EPS file that is to be placed into another document needs to have correct bounding box parameters.  These are found in the <I>PostScript</I> Document Comment %%BoundingBox.  Applications that generate EPS files should set these parameters correctly.  Because <A NAME="tex2html1700"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> makes the <I>PostScript</I> files on the fly, often with several overlays, it is not possible to do so accurately.  However, <A NAME="tex2html1701"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> does make an effort to ensure that the BoundingBox is large enough to contain the entire composite plot<A NAME="tex2html1694"
  HREF="footnode.html#foot30176"><SUP>C.1</SUP></A>. Therefore, if you need a ``tight'' BoundingBox you need to post-process your <I>PostScript</I> file.  There are several ways in which this can be accomplished.

<P>

<UL>
<LI>Programs such as Adobe <I>Illustrator</I><A NAME="30385"></A>, Aldus <I>Freehand</I><A NAME="30388"></A>, and Corel <I>Draw</I><A NAME="30391"></A> will allow you to edit the BoundingBox graphically.

<P>
</LI>
<LI>A command-line alternative is to use freely-available program <I>epstool</I><A NAME="30394"></A> from the makers of Aladdin <I>ghostscript</I><A NAME="30397"></A>.  Running
<PRE>
epstool -c -b myplot.ps
</PRE>should give a tight BoundingBox; <I>epstool</I><A NAME="30400"></A> assumes the plot is page size and not a huge poster.

<P>
</LI>
<LI>Another option is to use <I>ps2epsi</I><A NAME="30403"></A> which also comes with the <I>ghostscript</I><A NAME="30406"></A> package.  Running
<PRE>
ps2epsi myplot.ps myplot.eps
</PRE>should also do the trick. The downside is that this program adds an ``image'' of the plot in the preamble of the EPS file, thus increasing the file size significantly. This image is a rough rendering of your <I>PostScript</I> graphics that some programs will show on screen while you are editing your document. This image is basically a placeholder for the <I>PostScript</I> graphics that will actually be printed.

<P>
</LI>
<LI>The preferred option is to use the <A NAME="tex2html1702"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> utility <A NAME="tex2html1703"
  HREF="../man/ps2raster.html"><I><B>ps2raster</B></I></A><A NAME="30415"></A>. Its <B>-A</B> option will figure out the tightest BoundingBox, again using <I>ghostscript</I><A NAME="30420"></A> in the background. For example, running
<PRE>
ps2raster -A -Te myplot.ps
</PRE>will convert the <I>PostScript</I> file <U>myplot.ps</U> into an encapsulated <I>PostScript</I> file <U>myplot.eps</U> which is exactly cropped to the tightest possible BoundingBox.
</LI>
</UL>

<P>
If you do not want to modify your illustration but just include it in a text document: many word processors (such as Microsoft <I>Word</I><A NAME="30427"></A>, Corel <I>WordPerfect</I><A NAME="30430"></A>, and Apple <I>Pages</I><A NAME="30433"></A>) will let you include a <I>PostScript</I> file that you may place but not edit. Newer versions of those programs also allow you to include PDF versions of your graphics. Except for <I>Pages</I><A NAME="30437"></A>, 
you will not be able to view the figure on-screen, but it will print correctly.

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html5341"
  HREF="node190.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html5335"
  HREF="node188.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html5329"
  HREF="node188.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html5337"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html5339"
  HREF="node256.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html5342"
  HREF="node190.html">C.2 Converting GMT PostScript</A>
<B> Up:</B> <A NAME="tex2html5336"
  HREF="node188.html">C. Including GMT graphics</A>
<B> Previous:</B> <A NAME="tex2html5330"
  HREF="node188.html">C. Including GMT graphics</A>
 &nbsp; <B>  <A NAME="tex2html5338"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html5340"
  HREF="node256.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2010-07-14
</ADDRESS>
</BODY>
</HTML>