Graphics, Figures & TablesLaTeX ignores Bounding Box

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
hendrix
Posts: 2
Joined: Fri Jun 24, 2011 5:30 pm

LaTeX ignores Bounding Box

Post by hendrix »

Hello,

I am experiencing a problem with EPS figures created from within a .pptx Powerpoint file. Please see the attached MWE and scroll to Figure 1 in the PDF.

I create the EPS file by printing to a postscript printer. I then add the bounding box using GSView 4.9 and it appears to be positioned properly. When the figure is added to a latex document (independent of document class) there is a white padding around the figure that blocks text and makes image scaling difficult. Inspection of the EPS file in a text editor indicates that the bounding box command is correctly referencing the proper coordinates as verified by viewing the image in GSView and positioning the cursor on each corner.

Could someone please advise on the best way to remedy this problem?

Thanks!
Attachments
testFileA.zip
(119.25 KiB) Downloaded 137 times
Last edited by hendrix on Mon Jun 27, 2011 5:50 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Re: LaTeX ignores Bounding Box

Post by localghost »

If you are running a common TeX distribution in its current version (MiKTeX 2.9, TeX Live 2010), you can compile this directly with PDFLaTeX. The EPS file will be converted "on the fly" to PDF. This works flawlessly for me (except for some warnings about overfull boxes) and the text isn't covered any more. And by the way, think about another solution for creating EPS files. There many tools that are much more sophisticated than P0werp0int.


Best regards and welcome to the board
Thorsten
hendrix
Posts: 2
Joined: Fri Jun 24, 2011 5:30 pm

Re: LaTeX ignores Bounding Box

Post by hendrix »

Great solution, the on-the-fly conversion worked great.

Thank you!

Scott
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

LaTeX ignores Bounding Box

Post by kaiserkarl13 »

Sorry to post to a "solved" thread, but for those that don't have on-the-fly capable interpreters:

Code: Select all

$ eps2pdf testFileA.eps
$ pdflatex testFile.tex
You'll also have to leave off the .eps extension in the file name (part of the \includegraphics command), since PDFLaTeX doesn't know how to read EPS files. The default extensions are given by \DeclareGraphicsExtension, which defaults to .eps,.ps for LaTeX and .pdf,.png,.jpg for PDFLaTeX, iirc.

I recall solving this problem another way about five years back, but I don't remember what I did (unless it was "convert them all to PDF and use PDFLaTeX, which I almost certainly did at some point anyway).
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

LaTeX ignores Bounding Box

Post by localghost »

The epstopdf package would be another alternative for previous versions of the mentioned TeX distributions.
Post Reply