Getting Equations into Powerpoint

Rob MacLeod


1 Introduction

One of the most annoying weaknesses of Microsoft Powerpoint is making equations that look as good as we are used to in LATEX. This set of tips will provide at least a couple pathways for this process. There are many others and I welcome additional suggestions and support code. All the tools I mention here are either ubiquitous or have equivalents that are.

2 The Screen Grab and Paste Path

The basic idea here is to use LATEX to make the equations and then grab them from the screen and convert them to transparent gif files so that they float over whatever background is in the Powerpoint slide. Here are the steps, which work only on a Unix computer as long as all the utilities required are available.

  1. Make a LATEX document with your equations. Use all the standard parameters and do not worry about font size or any other special considerations other than to avoid making the margins too wide. Err on the side of using
    eqnarray
    to get a fairly short line length.
  2. Run LATEX on the file and then view the output using xdvi. I suggest using the -rv option in order to get white text on a dark background. This way, the equation will contrast well with the dark backgrounds on the Powerpoint slides (you do use a dark background on your Powerpoint slides, don't you?).
  3. In xdvi, adjust the zoom, or shrink factor to something in the range of 1-3. This will blow up the image of the equation and is the means by which you can balance resolution against image--and subsequently file--size in Powerpoint. You will just have to play with this so take one equation through the full process and see how it looks before doing more.
  4. Using some sort of screen capture program, for example Grab on the Macintosh or snapshot on an SGI, make an image file of the equation, with or without the equation number as you like. (Please send me pointers to other screen capture program on different platforms)
  5. Convert the image file to gif. There are numerous tools for this--the shareware program xv will also do the conversion very nicely; ImageMagik has command line conversion tools that are very handy for scripting; and GraphicConverter is a great program on the Mac for all sorts of image conversion and manipulation.
  6. We are not done yet! The last trick is to give the gif file a transparent background--not a necessity, but a nice trick. To achieve this, I use the program giftrans with the -t #000000 option in order to make all the black in the gif file transparent. I have written script that will accept multiple input files and generate a transparent gif from each:
    maketrans files.gif
    This script has an optional colour argument if the background colour is not black: -b background_colour. The output file is automatically modified to end in _t.gif.
  7. With this all complete, you should have one or more transparent gif files that you can move to your Mac or PC and insert (as graphics from file) into the Powerpoint presentation file. This will require some resizing of the image file so make sure to hold down the shift key when resizing to maintain the aspect ratio.

3 Using Equation Editor on the Mac

This path makes use of a nice utility available at evolve.lse.ac.uk/software/EquationEditor/ from J McKenzie Alexander, who deserves high praise for this gem. The steps are easy and give you that one more bit of justification you were looking for to buy a Mac in the first place.

  1. Download Equation Editor from here and let it make a volume on your Mac. Create a directory called EquationEditor or some such thing in Applications and drag the executable and the Readme files to the directory. Then drag the executable to your Dock.
  2. Launch Equation Editor and set the following preferences:
  3. Then in the main window, select a Pt size of 72--at least this is what I found makes nice looking slides.
  4. Start sticking LATEX code into the input window and watch the magic appear in the graphics window above it.
  5. Note: the ``Display'' option works find for simple math that you enter without and \begin{equation} while ``Text'' works better with \egnarray type things.
  6. When you have what you like in the graphics output window just drag and drop it into the Powerpoint window. Shrink it to fit and you will have very nice quality output.

There are some gotchas' and as yet unresolved problems:

4 Linux and Windows solution

Below is a solution from Scott Hoge, who is a LaTeX whiz and wanted to find a nice way to use a Linux or Windows computer for making equations.

Following the outline on Rob's page, one can generate the latex equations in a tex file, one equation per file. Then, run dvips with the -E option, to generate .eps output files. Then, use epstool www.cs.wisc.edu/ ghost/gsview/epstool.htm to add in a BMP or TIFF preview image to the eps file. Word/Powerpoint can the load the .eps file.

for example:

eq1.tex:

   \documentclass{article} 
   \pagestyle{empty} 
   \begin{document}  
   \[ A x =b \] 
   \end{document}
   latex eq1.tex
   dvips -E -o eq1.eps eq1.tex 
   epstool -t6p --gs-args "-dTextAlphaBits=4 -dGraphicsAlphaBits=4" --dpi 300  eq1.eps eq1_v2.eps
will produce an eps file with a tiff6p preview image at 300 dots-per-inch, with 4 bit of anti-aliasing. (This could be scripted into a nice little tool, me thinks.)

For Word usage, the cool thing is that the bit map is used on the screen preview, but the eps file is used when sent to a postscript printer (or ghostscript).

Apparently, epstool has been around since 1995, as part of the gsview package.

5 Some Extras

5.1 Where to find this stuff

If you are on an a CVRTI or SCI Institute SGI computer, to make sure you can find the scripts that automate this process, include in your path the directory ~macleod/bin, where ~macleod is /u/macleod at CVRTI and /home/macleod in SCI-land.

To use other colours in the equation, feel free to edit the colour table of the gif file, either with out without the transparency. My favorite program for this in Unix is xv, but GraphicConverter on the Mac will also do the trick, if not as easily.

If you are not on u Unix computer and need a program to capture the equations from the xdvi window, the public domain image program called xv will work (have you got the message yet about xv?). Look for the ``grab'' button in the lower right hand corner of the button menu of the main control window in xv.

5.2 The problem with printing

One weakness of this approach is that the equations, while they appear nice and white in Powerpoint, they will also come out white and invisible when printing Powerpoint slides for distribution. This is a ``feature'' of Powerpoint to make dark background light (white) when printing, even when color printing is selected. To get around this requires telling Powerpoint to print in color so that it leaves the background and all other colors alone. Set this somewhere in the printing process. Another similar solution is to save the slides as a PDF file--again in color--and then print that.

The other solution I know about is to make equations in black font on white background by starting xdvi without the -rv. Then perform all the other steps as above (with a change in background color parameter in the giftrans command) This means that each equation appears in the Powerpoint slide as black text on a white box, which in turn sits on the dark background of the slide. It is not as pretty, but it works and I use it for lecture slides that I intend to print for the students. In preparing these new gif files, you could still start from the same white-on-black image files and then reverse the colors. rgbto has an option (-i) for generating inverted images, i.e., with colors reversed.

5.3 MathType

There is another approach I should mention that makes use of the equation editor built into MS Office products. There is a commercial version of the program with more features that you can get from MathType. The catch here it that MathType for some reason supports any color for the math fonts as long it is black. To lighten the color in order to have it be visible on a dark background, one must perform a change in color on the equation once it is loaded back into the slide. For the Macintosh version, however, this will not work as one would like. Instead, there are some extra steps, described here by the MathType technical support folks as:

Powerpoint cannot recolor bitmaps or graphics that contain PostScript. Open MathType and choose Preferences>Other Preferences. Make sure that you are tuning graphics for ``Screen Display Only'', so that MathType creates them as PICTs without PostScript code. Powerpoint should then let you recolor them. To re-tune existing equations, double-click on them to open and choose File>Update.

Please note that equations tuned for screen display will not print out nicely. If you need to print out your slides, you should reopen all the equations and re-tune them for PostScript or Non-PostScript printers, depending on which kind of printer you have.

Now surely my solution with LATEX is easier than this, no?

5.4 Suggestions

If you have additional suggestions for this process or other programs to suggest for the conversions, please send me an email


Rob MacLeod
(macleod@cvrti.utah.edu)

About this document ...

Getting Equations into Powerpoint

This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.71)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split 3 -no_white -link 3 -no_navigation -no_math -html_version 3.2,math -show_section_numbers -local_icons equations-ppt

The translation was initiated by Rob Macleod on 2007-03-22


Rob Macleod 2007-03-22