next up previous
Next: How to insert Latex Up: Windows Previous: Windows

Converting Windows graphics files (powerpoint, minitab graphs) to postscript for inclusion in Latex documents

  1. In newer versions of Powerpoint, you may be able to save directly as a ps file.
  2. One way that seems to work well is to print the graphic to a file rather than to the printer from within your Windows application. Start to print as you usually would, but instead of actually hitting 'print', click the box that says 'save to a file' and save as file.eps.

    1. move the file to a UNIX box.
    2. >dos2UNIX file.eps # this gets rid of the ^M characters in the dos file; I'm not sure if this step is needed
    3. run >ps2epsi file.eps file2.eps - this adds a bounding box and gets rid of some Windows garbage from the beginning of the eps file
    4. include file2.eps in your Latex document; make sure that Latex knows to only use the clipped part of the figure or you may get a bunch of whitespace in your document. To do this, syntax of the following sort should work should work:
  3. To extract a graphic from a Powerpoint file, I've had some success with the following recipe.

    1. save the graphic from within Powerpoint as a png file
    2. convert to a jpeg file using MS photoeditor
    3. insert in a Lyx or Latex file
    4. use pdflatex to produce the pdf output
  4. Theoretically, the following should work, but I've had problems with the clarity of the jpeg figure when moved to UNIX, and I've also had problems with the bounding box. But here's the approach anyway: Save the file as a jpeg file and then use pdflatex. One disadvantage of this method is that pdflatex does not handle postscript figures, so you can't mix jpeg and ps figures. But you can convert your ps figures to pdf or jpeg and include them that way using the \includegraphics command as below.

    1. Save the file as a jpeg file directly in the Windows app.
    2. Crop in Photoshop or some other Windows graphics package, or move to UNIX, and crop in xv
    3. In your Latex file,

      1. \usepackage[pdftex]{graphics} in your preamble
      2. \includegraphics{file.jpg} to include the figure
    4. compile your Latex file and convert directly to pdf using pdflatex: >pdflatex file.tex
  5. The following has worked for me in the past, but some of the graphics don't come out as well as they seem to with the above method. I believe the basic problem lies in creating a ps file (based on vector graphics) from a pixel-based file, such as bmp, jpeg, etc., but my knowledge in this area is scant. This conversion tends to result in a much less clear figure and in one that is very large.

    1. Make your powerpoint (or other) file.  You may want to make your line widths thicker than usual and make your text bold.
    2. save your powerpoint (or other) file as a .bmp file.  (jpeg, tiff, and gif seem to give splotchy images when converted to eps/ps; this happens when using the jpeg2ps utility as well).
    3. move to a Linux machine and do >convert file.bmp Then, to get a tight bounding box, do >ps2epsi file.epsi.  If the box is not quite as you want it, you can manually edit the bounding box line in the .epsi file, but ps2epsi usually does a nice job.
    4. include the figure in your LaTeX file

next up previous
Next: How to insert Latex Up: Windows Previous: Windows
Chris Paciorek 2012-01-21