7

I am trying to include a figure into LaTeX from a paper originally created using MS Word. I have already converted all the text/equations into LaTeX but I can't figure out how to get the figures over without re-drawing them using LaTeX code (which I do not want to do). The image is a plain box (like a tabular) one row by 7 columns with numbers inside each cell. Then I inserted arrows of varying length above and below the box (several short ones and one much longer).

I am trying to use the graphicx package with the \includegraphics command.

I copied the figure (box and arrows) from my original article into a blank Word doc. The figure only takes up the first 4 or 5 lines of the blank document. I then selected/highlighted the image and printed the selection using 'PDFCreator'. This allowed me to save the image as a .eps file. I then copied and pasted the eps file into the folder where all my .tex files are saved.

When I compile the document using pdftexify there is a blank space where the image should be. In the console I get the following message when I compile the document:

[27] <Fig3-eps-converted-to.pdf, id =105, 391.4625pt x 74.2774pt>
<use Fig3-eps-converted-to.pdf>
Overfull \hbox 1.46153pt too wide) in paragraph at lines 511--516
[]

My code looks like this:

\documentclass[12pt]{article}

\usepackage{graphicx}
\usepackage{epstopdf}
\begin{document}

%Text

\includegraphics{fig3.eps}

%text

\end{document}

I have read the sections on graphics in 'LaTeX: A Document Preparation System' and 'The Not So Short Introduction to LaTeX2e' but I still can't figure this out. Should I maybe use a PNG image since it is a pretty basic figure? Any advice on how to properly transfer images from a word doc to .eps format and/or how to get those .eps files into LaTeX properly would be a huge help.

9
  • There is probably something wrong with the eps file. Try opening it in a viewer; what do you see? Aug 19, 2013 at 20:07
  • When I double click the desired eps file it opens Ghostscript or my GSView. The image is a full page with the figure at the top 1/6 of the page.
    – Erick P
    Aug 19, 2013 at 20:12
  • 1
    You can (probably) save a figure from Word as a pdf, then crop it with pdfcrop before inserting it in your LaTeX document. Aug 19, 2013 at 20:12
  • In GSView, there should be an menu option to choose the size of the viewing window. It may be set to A4 or Letter by default. Try changing this to BBox. How much white space is left around the image? Aug 19, 2013 at 20:20
  • There is no BBox option in the dropdown 'media' menu. I tried to type BBox in the 'user defined' media. I typed BBox into the width and height options but that did not get my figure into the Bounding box. THe bounding box is slightly below my figure in GSView and I don't know how to move the bounding box or my figure.
    – Erick P
    Aug 19, 2013 at 20:56

1 Answer 1

7

This problem is almost certainly caused by an incorrect bounding box in the eps file. One way to fix this is to rename your file to 'Fig3.ps' and in the terminal do

ps2eps --ignoreBB Fig3.ps

Alternatively, you can fix the bounding box yourself. Open the eps file in your favourite text editor. The second line will be something like

%%BoundingBox: A B C D

where A, B, C and D are numbers. In order, these set the left, lower, right and upper edges of the image. Changing these numbers will adjust the bounding box. For example, increasing A crops the left side. Set the numbers in the third line (HiResBoundingBox) to the same values, save the file and refresh it in your viewer to see the effect. A bit of trial and error usually does the trick.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .