Convert PowerPoint Pictures for Use in LaTeX
What These Are About
I was once faced with a problem of trying to put the pictures
I drew for my presentation into a revision of my paper. After a lot
of trial and error, I found a fairly simple way to do it.
I also received suggestions from others.
may well be easier or better ways;
please contact me
if you know more.
The basic workflow is to export the PowerPoint slide as a pdf or
eps document, to crop it, and then to insert it into LaTeX.
Depending on how you work in LaTeX, cropping may not be necessary.
Step 1: Convert PowerPoint To PDF
The way to perform the conversion will vary depending on your OS and version of PowerPoint, but is generally straightforward. On a MAC, there is a PDF option on the Print dialogue box. On Windows, there's usually an option to convert to PDF from the File menu or from the print dialogue box (in some versions, it's called "Acrobat Distiller" printer). This plug-in from Microsoft may help if you don't have a method that works.
Step 2: Crop the PDF
Note that cropping is not necessary, because it can also be accomplished at the next step, but I find it easier to do visually, and hence use this step.
Open the pdf in Preview (on a Mac) or Adobe Acrobat (not just the viewer, but the actual Acrobat, on Windows). In Preview, under "Tools" menu, choose "Rectangular Selection" and then select the portion of the slide you want and choose "Crop" from the same menu. In Acrobat,
commands for deleting and cropping pages are under the "Document" menu.
Step 3: Insert into LaTeX
Use the \includegraphics command (comes in the graphicx package). If you omit the extension from the filename of the picture that you specify as argument to includegraphics, your document
will compile with both pdfLaTeX and LaTeX as long as you have both .pdf and .eps versions of the picture in the relevant directory.
If you need to crop your image, use the "trim" and "clip" options of includegraphics (thanks to Johannes Schwarz for this tip).
If You Need .eps
You might need it if you are using \psfig instead of \includegraphics, or you want to compile with LaTeX instead of pdfLaTeX.
Here are a few options.
This method assumes that you have Adobe Acrobat (not just the Reader, but the
actual Acrobat) installed on your machine. Open the .pdf of the Acrobat,
File->Save As, and select "Encapsulated PostScript (.eps)"
under the file type.
This method works on Windows. It has the advantage of not needing Adobe Acrobat, but does need
simple additional software.
It does not allow you to crop the image, however, so get it right
in PowerPoint first. Thanks to Jeremy Strayer for suggesting this to me.
- Download EMFtoEPS.
Don't be scared--installation constists of merely unzipping the
archive. Run it. Choose Edit->Preferences, and select
a postscript printer and a resolution you want. Note that the settings
of the resulting eps will be the same as of the printer--e.g.,
if you want color, choose a color printer. You may need to install
one on your Windows system (you don't have to buy the printer,
just install the driver and "pretend" it's attached to some port).
More info in the .txt file accompanying EMFtoEPS.
- In PowerPoint, choose File->Save As, and save your slide
as "Windows Metafile (.wmf)" type.
- In EMFtoEPS, choose File->Open to open your metafile slide,
and then Convert->Selected to convert. You'll get an .eps
file with the same name in the same directory as the .wfm metafile.
A variant on the previous method suggested by Vinesh Gada
- Download and install the free Metafile to EPS converter metafile2eps.exe from here.
- Group your picture in PPT, right click on the grouping and click on 'save as picture'.
- Save as EMF.
- Open the Metafile to EPS converter; load you file.
- Click on export EPS.
This method possibly requires GSView software. Thanks
to Markus Nilsson for suggesting this.
- Install the drivers for a Postscript printer (often denoted PS in
the end of the name of the printer) if you don't already
have one installed on your computer. (This can be done as follows:
Start -> Control Panel -> Printers -> Add printer.
Press next a couple of times until you reach the page where you can
choose between different manufacturers.
Choose a Postscript printer, e.g., Lexmark Optra S 1250 PS.)
- Isolate each figure in its own PowerPoint document.
- Print the figure, but check the box "Save to file", and under properties/advanded/Postscript options, select
Encapsulated postscript (EPS).
- Now you're almost done. The default setting for the boundary box
for your drawing has been set to fill the whole page. If you
want to edit this, use GSView.
Under the File menu, use PS to EPS without checking the
"Automatically calculate Bounding Box". Select your new
bounding box, and save the file as an EPS. Alternatively,
if you have access to Unix, you can use "ps2epsi inputFileName outputFileName"
on the command line to get it to fix the bounding box (thanks to
John Heidemann for the tip).
Open the .pdf of your picture in inkscape (free). Inkscape will allow you to open the figures, remove the page,
and save as an eps file if you wish or as a pdf file.
(Thanks Frank Perbet for this suggestion.)