How do I crop an .eps file for use in LaTeX when using macOS?
I tried the instructions here: What is a good workflow for importing and cropping EPS images? and it didn't work.
Specifically,
I began with an .eps file generated by TGIF (call it
image_v1.eps)I opened
image_v1.epsin Preview.appI Used Preview to crop the image and saved the cropped image in
image_v2.pdf. Now, because cropping an image in Preview.app just hides the cropped material as opposed to removing it,I ran
pdfcrop --clip image_v2.pdf image_v3.pdfThen I ran
pdf2ps image_v3.pdf image_v3.epsFinally, I included it in my LaTeX document using
\fbox{\includegraphics[width=3in]{image_v3.eps}}
The result is that the entire original .eps file is displayed, but the fbox only appears around cropped portion of the image.
- Adding a
trimparameter toincludegraphicschanges thefbox, but the "extra" portion of the image is still displayed. - Similarly, editing the .eps file and changing the bounding box information changes the size of the
fboxbut the "extra" portion of the image is still displayed.
Any idea what I'm doing wrong? Should I be using a different tool at any point above?
To be clear: Adding clip=true to the includegraphics command does hide the unwanted portion of the image. However, I want to edit the .eps file so it only contains the image I want to display. I'd rather not resort to "tricking" LaTeX into displaying only part of the image.
bbandclipoptions to include the eps file. – Sigur Nov 12 '21 at 23:46pdftops -eps image_v3.pdf image_v3.epsif you haveppdftopsinstalled (notetonot2) or simply edit the%%BoundingBox in the file– David Carlisle Nov 13 '21 at 08:04-epsflag; but my installed version of that tool doesn't recognize that switch. – Zack Nov 13 '21 at 13:40