Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

psfrag, dvips, and bounding box

10 views
Skip to first unread message

Torsten Rohlfing

unread,
Dec 12, 2002, 7:37:10 PM12/12/02
to

Hi --

it seems that quite a few people have been experiencing problems with
incorrect bounding boxes when generating eps files from figures modified
using psfrag. Unfortunately, no one so far seems to have been able to come
up with a solution. Actually, most people don't even seem to understand the
problem.

So for everybody out there who hasn't given up yet, here's how far I got.

First of all, let me mention that the problem comes from the fact that
psfrag typesets the LaTeX constructs that it fills into the original PS
file. It typesets them on the same page as the included PS figure. You can
see the result in xdvi for example, with an underlined heading saying,
"PSfrag replacements".

Well, guess what -- when you run dvips to generate an EPS from the result,
probably in order to include the final figure in another document, then
dvips will get confused by this extra information. In fact, the shift of
the bounding box that many people have observed comes from the fact that
it's computed INCLUDING this extra data.

Unfortunately, you can't just remove everything, since then there's nothing
that psfrag can substitute the placeholders in the original PS file with.
HOWEVER, there is no reason to waste as much space as the original psfrag
style does.

If you've had similar problems, and you're using psfrag version "1998/04/11
v3.04 PSfrag (MCG)", you may want to try the path that I attach to this
posting. It basically removes the heading of the replacement table and
typesets all replacements ON TOP OF EACH OTHER near the center of the
figure. I haven't been able to figure out how to put the replacements in
the EXACT center of the figure (which would be to logical and preferred
location), but maybe some other kind soul can do this final step.

Anyway, for me at least this solves the problems with wrong bounding boxes
for virtually all my figures. Obviously, there are exceptions, but at least
the modified style isn't GUARANTEED to screw up.

Cheers!
TR

--
Torsten Rohlfing, PhD Stanford University, Dept. of Neurosurgery
Postdoctoral Research Fellow Image Guidance Laboratories
300 Pasteur Drive, Room S-008
torsten....@stanford.edu Stanford, CA 94305-5327, USA
Phone: ++1 (650) 498-4145 Fax: ++1 (650) 724-4846

"Though this be madness, yet there is a method in't"

psfrag.diff
0 new messages