[Mac OS X TeX] Incorrect ps2epsi behavior?

Francesco Costanzo costanzo at lpcm.esm.psu.edu
Mon Dec 31 02:52:18 CET 2001



This message is being sent to bug-gs at aladdin.com and carbon-copied to the
Mac OS X TeX Mailing list:

Sometimes we (myself and Gray L. Gray, a colleague of mine) create
PostScript files consisting of a single page with a figure in it using
LaTeX. As you may already know, these PostScript files have the following
bounding box:

%%BoundingBox: 0 0 612 792

in other words, the bounding box of the entire page. In addition, these
files have no preview. We are interested in creating .eps and .pdf files
containing just the content of the page, say a figure with the appropriate
bounding box. To do this,

[1] we use  ps2epsi to create an .eps file with a bounding box and preview;
[2] we use epstopdf to create the corresponding .pdf file.

Here is the problem: we have found that the .epsi file created by ps2epsi
will often have a bounding box which is too small, thus clipping part of the
page content. For example, if we apply ps2epsi to one of our .ps files, we
get the following bbox:

%%BoundingBox: 111 435 378 666

If we run the following Ghostscript command:

gs -sDEVICE=bbox file.ps

on the same .ps file, we get:

%%BoundingBox: 110 434 379 667
%%HiResBoundingBox: 110.897997 434.627987 378.413988 666.377980

Notice that ps2epsi is simply rounding to the nearest integer, while gs
rounds to the nearest lower integer for the llx and lly and to the nearest
greater integer for urx and ury. Of course, if one uses epstopdf on the
resulting .epsi file, the bounding box from the .epsi file is used and
therefore clipping occurs in the resulting .pdf file.

We should mention that for this particular example, the use of the bounding
box as provided by gs would not cause the "clipping" described earlier. In
addition, ps2epsi does not include any HiRes bbox info. This is not a big
deal, but it would be nice to have the information as it can be used as an
option in running epstopdf.

Is there a reason for this behavior? Is there any way for us to fix ps2epsi
so that it behaves the way we want it to behave? If it is a bug is there
hope of a fix in a future release (possibly soon :-))?

-- 
Best Regards,
Francesco Costanzo
Associate Professor

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Address: Engineering  Science and  Mechanics  Department
         The Pennsylvania State University
         212 Earth and Engineering Sciences Bldg.
         University Park, PA 16802-1401
         USA
Phone:   (814)863-2030
Fax:     (814)863-7967
mailto:costanzo at engr.psu.edu
http://www.esm.psu.edu/HTMLs/Faculty/FCostanzo.html
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------





More information about the macostex-archives mailing list