Converting Microsoft Word Images to EPS Embedded in LaTeX

The most common way of inserting images into a LaTeX document uses so called EPS, or Encapsulated PostScript, files. Most of graphics editors allows for exporting graphics data in EPS format. Unfortunately, this is not the case of Microsoft Word. This article will show how we can create EPS files out of Microsoft Word drawings, diagrams, or graphs.

Word-to-LaTeX converter provides an easy and very comfortable way of exporting drawings, images, diagrams, or any other graphics data from a Word document to EPS format. Unlike other tools, Word-to-LaTeX sets the correct Bounding Box (i.e., the box which contains all graphics data and no unnecessary white space) which is very important for embedding EPS files in LaTeX documents.

I will use Word-to-LaTeX to convert the following image composed of multiple text boxes and automatic shapes. You can download the source MS Word document.

Image Composed of Text Boxes and Automatic Shapes

First, we have to group all parts of the image into only one image. Hold down the Ctrl key  and click one part after another. Afterwards, right click any of the selected parts and click Grouping → Group. If you do not manage to select all parts at once, you may group the parts gradually by grouping two parts into one and then group the result with another part.

Group Objects into One

We are ready to run Word-to-LaTeX now. Press Word-to-LaTeX Convert button on the Microsoft Word toolbar and when the main window appears, just make sure Image format is set to EPS. Press Convert button and wait a few seconds.

Word-to-LaTeX Tab in MS Word

Running Word-to-LaTeX Conversion

You will find img-1.eps and a .tex file in the same directory as the original Word document. To preview EPS images, you can use Evince viewer, Ghostview, or transform the .tex file into any of DVI, PS, PDF formats.

This command will embed img-1.eps into a LaTeX document.

\includegraphics[width=337pt]{img-1.eps}

If you need to create a PDF file out the LaTeX document directly using pdflatex (without DVI as an intermediary format), make sure you have these commands in the document preamble. It will ensure EPS files will be converted to PDF on-the-fly.

\usepackage{graphicx}
\usepackage{epstopdf}

Word-to-LaTeX also allows to convert more complex images, multiple images within one document, bitmap images (e.g., photos or scanned images), and many more.

Comments are closed.