1

In the good ol' days I drew figures with xfig and generated LaTeX source to directly include in my papers. But I now find powerpoint to be a faster drawing tool and sufficient for most of my needs. What's the best way to embed the resulting image in LaTex?

I current output to pdf, then include using the graphicx package. But the resulting scaling and positioning trial-and-error session is often extremely frustrating, and the documentation on the package is quite sparse and unhelpful. Is there a better way?

3 Answers 3

3

The best way, in my opinion, is to print your graphic from ppt/word/excel into a pdf. And with printing I mean using one of the free pdf-printers you can install. I know office2007 comes with a pdf save option, but I found that those pdfs behave strange, especially when it comes to crop the page.

After you extracted your graphic into a pdf, use the pdfcrop tool that should ship with your latex distribution. A simple command in the command promt:

pdfcrop filename.pdf

will remove all the empty white around the graphic. For windows you need to have a perl interpreter installed. In case you haven't, you get a error message. Possible interpreters are active perl and strawberry perl

1
  • Perfect. I had no idea this pdfcrop tool existed (and in fact, it is not included in my LaTeX: pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009), but I'm sure I can find it).
    – Fixee
    Feb 25, 2011 at 17:49
3

You won't find many friends of PowerPoint here; basically if that is your drawing program than the only method to get it into LaTeX documents is via an exported-and-included PDF.

But if you used xfig to generate LaTeX code (I'm guessing within the picture environment?) then you might appreciate tikz. It allows you to make (and thereby control) all your graphics with a TeX syntax. That or pstricks would probably be considered by most here to be "The LaTeX way" to do graphics.

2
  • @matthew-leingang is there any drawing interface to easily get figures in tikz or pstricks code?
    – Mortimer
    Feb 25, 2011 at 8:22
  • 2
    The only one I know of is Inkscape (think open source Adobe Illustrator) with the experimental inkscape2tikz plugin. Since Inkscape reads SVG this means you can use any program that exports SVG. Feb 25, 2011 at 10:17
1

On OSX, I can use PowerPoint, print to pdf and then crop in Preview.app and then there is no trouble with the positioning and all as the crop and margins are right.

However, I have now given up on PowerPoint to do that as it's really not easy when on Windows and Linux. I use OpenOffice Draw that has the same features and can export to EPS and PDF properly, you just have to select all your drawing and then check "selection" when exporting so that it doesn't export the whole page but computes the right bounding box.

A simple width=\textwidth is then enough to get it right.

You must log in to answer this question.

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