Graphics, Figures & Tables ⇒ Adjust trim margin for eps2pdf
-
- Posts: 9
- Joined: Mon Aug 03, 2015 9:13 am
Adjust trim margin for eps2pdf
I'm having trouble with the my eps figures and the trimming them when they're converted to pdf. For some reason the eps figures are cropped to tightly which removes some of my figures. The plots are saved from Matlab.
I have tried saving the eps files differently, which didn't work and this kind of makes sense because the source files always look good. The only related post I could find was this: http://latex-community.org/forum/viewto ... =45&t=9559. And they only describe a different compile method which doesn't work for me. There must be an option in epstopdf to change the crop margin to be a little larger, anyone?
I'm using the ieeetran template with the graphicx package with option pdftex.
- Attachments
-
- hyp1_T-eps-converted-to.pdf
- The resulting pdf file (bad)
- (6.56 KiB) Downloaded 200 times
-
- hyp1_T.eps
- The source file (good)
- (19.57 KiB) Downloaded 271 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Adjust trim margin for eps2pdf
first of all, you should get rid of option pdftex everywhere. It doesn't do any good.
Rename the figure to something else and try again, a decently updated TeX distribution should convert the image on the fly without you even noticing it.
-
- Posts: 9
- Joined: Mon Aug 03, 2015 9:13 am
Adjust trim margin for eps2pdf
Here's a code example of how to reproduce the problem:
Code: Select all
\documentclass[10pt,journal,compsoc]{IEEEtran}
\usepackage{graphicx}
\begin{document}
\begin{figure*}[h]
\centering
\includegraphics[width=0.45\textwidth]{hyp1_T}
\caption{test}
\end{figure*}
\end{document}
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Adjust trim margin for eps2pdf
-
- Posts: 9
- Joined: Mon Aug 03, 2015 9:13 am
Adjust trim margin for eps2pdf
Used your second advice though and tried saving directly as pdf, don't know why I never tried that. The plots are good then, just lots of whitespace around the plot. But found a tool to crop the pdf's from within matlab and together with the trim function in latex, the figures are perfect now.
Thanks alot!