Latex2PPT

    Produced by Jeff Edmonds, coded by Ji-Young Oh, and funded by NSERC.

    Included are macros to help latex people produce equations like $e^{\alpha}$ within the text of PowerPoint slides. They do not create equations like the Micro Soft Equation Editor would produce or equations that require more than one text box. They only work on single lines of text.
    These macros were produced to help me produce slides for my algorithms notes.
     

  • Other methods:
    • Latex2PPT is a web sight providing instructions and code for cutting entire block from latex slides and inserting them into PowerPoint slides.
    • The program capture.exe allows you to make gif of anything appearing on your screen. I like using it to cut equations out of my .ps files produced by latex.
    • I tried using latex2html to produce gifs of equations, but I could not get it to work.
  • Installing:
    • Method 1: Save the file latex2ppt.bas in your directory.  Click on Tools/Macros/VisualBasicEditor. Click on File/Import. Find the file latex2ppt.bas. Click Open. Click the top x to close the VisualBasicEditor.
    • Method 2: Save the file latex2ppt.ppt in your directory.  It is a blank power point presentation, except that it has the macros installed. Load this file. Left click the command line. Click on customize. Under Categories click macros. Drag latex2ppt and place it within the Format drop down menu. Drag Eqn onto the command line. Close the customize box. Close the file latex2ppt.ppt. Close and reopen powerpoint. Later when you click on these control buttons, the macros will be executed from the latex2ppt.ppt file.
  • Main Macros:
    • latex2ppt:
      • Open a new PowerPoint presentation. Make a blank page.  Drop your latex text into a PowerPoint text box (not a title box). Then run the latex2ppt macro.
      • Warning. Do not run this on an existing PowerPoint presentation, because it will likely change things that you do not want changed.
      • This macros calls the macros lineFormatting and Equ.
    • Eqn:
      • Type in a latex type equation $e^{\alpha}$. Then run the Eqn macro. These macros should not cause problems for if run multiple times in preexisting PowerPoint presentations.
      • This macros calls the submacros convertSymbols, mathColor,  and superscript_subscript.
      • The macro lineFormatting is not included  because unlike these other macros, lineFormatting should only get executed once.
      • Warning: All of the macros act on ALL text boxes within ALL pages of your document.
  • Sub Macros:
    • convertSymbols:
      • Replaces latex commands like "\alpha" and "\sum" with a single symbol. The current list of symbols handled is symbols. You can add more symbols if you like. See generateSymbols below to learn what symbols are available. Then edit the beginning of the macros file. 
      • Bug in PPT: Tying more text within a string of characters in the symbols font creates more symbols in the symbols font.  Ideally, PPT should know that I never want to type in the symbols font.  My best solution to date is as follows. Click on customize. Under Categories click Format. Drag "Font:" with white box onto the command line. Close the customize box.  When you want to tying "times new roman" into the middle of a string of symbol font, do the following.  Type a blank in the middle of the string symbol fonts. Click on the down arrow of the button you just installed. Click on "times new roman", which for me is at the top. Then keep typing.
    • mathColor
      • Replace "$text$" with "text" in the default "Accent" color (default blue).
      • To change the "Accent" color, open "Format/Slide Color Scheme/Custom", click "Accent" and "Change Color".
    • superscript_subscript
      • This macro converts the strings "^c", "^{text}", "_c", and "_{text}" into superscripts and subscript as appropriate.
      • There is not super super script in PowerPoint. Hence, the macro given "2^{2^{n}}" handles the outer bracket and ignores the inner bracket. Running the macro a second time will remove the inner brackets, but of course the characters had already been converted to superscript.
    • lineFormatting:
      • Remove line breaks:
        • Emacs automatically adds line breaks within a paragraph. Latex ignores them. PowerPoint treats these line breaks as paragraph separators and automatically wraps when the line is too long. This macro removes these line brakes.
      • Itemize:
        • The macros replace "\item", "\i", "\item[text]", and "\i[text]" with line breaks in PowerPoint.
      • Page breaks.
        • Latex uses a blank line to start a new paragraph. Likely not more than a paragraph will fit on a PowerPoint slide. This macro convert blank lines into page breaks. The text is put in the text box. The title box is left blank.
        •  The macro also replaces "\\", "\newline", "\break", and "\newpage" with page breaks in PowerPoint.
      • Titles:
        • The macro puts the text within "\chapter{text}", "\section{text}", "\subsection{text}", and "\subsubsection{text}" into the title box of a PowerPoint page.
    • generateSymbols:
      • This macro is used to find other characters to be used in the macro  convertSymbols.
      • Open a blank PowerPoint presentation. Create an empty page. Execute this macro. Let it run for a minute. Select the entire text box and change the font to symbol font or your favorite font.
      • Find a character that you want. Note its ASCII number.
      • In the Visual Basic Editor, go to the very beginning of the macros file. Add you new command to the list.
  • Todo:
    • I have been doing fraction as 1/2 where the 1 is superscript and the 2 is subscript. There might be some kind of macro for this.
    • If one was VERY bold, one might want to produce tables. But this would be harder.
    • I would like to type a latex equation into box and have the gif automatically produced