1. Nice tip!

2. Rachel Ziebell

3. meepo

Thank you. My life is truly better because of this.

• Thanks for the comment. Happy to help. Tom.

4. Hamlet

If your image is PostScript, the Ghostview (gv) program present in most X (UNIX) systems will report the same type of coordinate used by “trim” (“big point”?) as you move the mouse around the image.
That is an alternative to trial-and-error method.

• Thanks for the tip! Cheers, Tom.

• M.A. Khan

You can convert your .pdf file to .ps or .eps using Adobe Acrobat Pro. Then you get the coordinates of .eps or .ps file using Ghostview (as Hamlet wrote). Same coordinates can be used to insert .pdf file BUT then use bb instead of trim,e.g.,

\includegraphics[bb= 112 240 484 540, clip, width=7.2cm]{file.pdf}

5. Allan

MakeFile Problem

I am having problems with compiling eps Images, I don’t know whether it is a problem with my make file or. When even I am compiling a document with eps images, it takes like 4minutes struggling to compile them, how can I overcome that? Is it the makefile problem? If it is can some one help me with a working example. Or could u help me with a template with a makefile and a sample image included, I just dont know whether eps is becoming obsolete but it is taking ages to be compiled.

• Hi Allan,

Thanks for your comment. Without seeing any code, I suggest you try to convert your eps-image to pdf. Every Linux/UNIX distribution and Mac OS X will have that command (eps2pdf or similar). The image quality will be the same. If loading the pdf instead doesn’t resolve your problem, please provide a minimal working examples that I can run on my computer.

Thanks, Tom.

6. Nga Nga

Thank you so much. You save my life.

7. Jim Gomi

When tuning the clip parameters, it is helpful to enclose the image in a framebox:

\fbox{ \includegraphics{...} }

then you can immediately see where the borders of the clipped image are.

• tom

Cool, thanks!

8. Ranga

Thanks a lot Tom…

9. Good tip. One problem though is that the ‘clip’ option interferes with the synctex algorithms to synchronize source and preview windows when the document is split into different files using \input or \include. Synctex is used by TexShop and TexWorks, and probably other tex guis. This is certainly a bug in synctex but… do you have any experience on this?

• tom

I’m not sure you find this useful. But one idea might be to ‘clip’ the figure in a separate tex file of class standalone and then load the pdf. To automate processing of both documents, use latexmk.

\documentclass{standalone}
\usepackage{graphicx}
\begin{document}
\includegraphics[trim=50 50 50 50,clip]{path/to/figure}
\end{document}
10. Thank you. This is very helpful. I am glad that this is the number one Google result, as it should be! 🙂