LaTeX forum ⇒ GeneralExporting clipped Figures Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
User avatar
cbustaam
Posts: 57
Joined: Mon Sep 01, 2008 10:17 pm

Exporting clipped Figures

Postby cbustaam » Sat Feb 16, 2013 9:21 am

Hey all,

I'm preparing an article which contains figures. As the figures have some blank spaces in all the four margins, I used the clipping option to get ride of such white space when compiling.

I'm wondering if there is a way to export the figure files just as LaTeX read it, i.e after clipping and in the scale used. Thoughts?

  1. \documentclass{article}
  2. \usepackage{graphicx}
  3.  
  4. \begin{document}
  5. \begin{figure}[!htb]
  6. \centering
  7. \includegraphics[bb=125bp 250bp 490bp 540bp,clip,scale=0.5]{myfigfile.pdf}
  8. \caption{My Figure}
  9. \end{figure}
  10. \end{document}
"Show me your .emacs and I'll tell you who you are." -- modified proverb

Tags:

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Sat Feb 16, 2013 9:58 am

cbustaam wrote:[…] As the figures have some blank spaces in all the four margins, I used the clipping option to get ride of such white space when compiling. […]

For PDF files it would be much smarter to use the pdfcrop Perl script and cut them to size before they are included into a document. This needs of course a Perl interpreter like Strawberry Perl (for Wind0ws) installed.


Remarks:

  • Suffixes (like .pdf here) for included graphics files can be dropped. The graphicx package will find the file even without file type specification as long as it is present in one of the accepted formats (JPG, PDF, PNG for PDFLaTeX).


Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

User avatar
cbustaam
Posts: 57
Joined: Mon Sep 01, 2008 10:17 pm

Postby cbustaam » Sat Feb 16, 2013 10:38 am

Thanks localghost. The pdfcrop script is just what I need. It worked perfect!
"Show me your .emacs and I'll tell you who you are." -- modified proverb


Return to “General”

Who is online

Users browsing this forum: No registered users and 5 guests