This page is about putting maths into computer presentations.
Programs like Powerpoint offer a rich variety of features that can (if used judiciously) greatly enhance a presentation. But if you do real science, then there's a good chance that you'll need mathematical equations in your talks once in a while. And that's a need which is met very poorly by Powerpoint.
Apple's Keynote works nicely with
PDF, but has no
dedicated Math support. What this means in practice is that you
can get beautiful math display in Keynote, but unfortunately
it's not as easy as it should be for day-to-day use in science and
education. Because of this, I'm starting a separate page on a
different approach that I believe will very soon rival products such
as Keynote (and even PDF) as the medium of choice for equation-rich presentations: web-standards based slides.
Mathematics is commonly typeset using LaTeX, but (La)TeX doesn't come pre-installed with Mac OS X. Since the typesetting requirements for a computer presentation are different from those of a scientific paper, some of the suggestions on this page are also intended for people who don't want to install TeX. However, when I think about math content, I usually think about it as originating from some LaTeX process.
The good thing is that under Mac OS X Aqua, many applications can be made to support LaTeX indirectly via the PDF format. If you don't want to install LaTeX, you may find it easier to use dedicated equation editors. Here are some choices:
For instant results, use one of the online tools linked on our departmental web page: Equation Editor Google Gadget.
- The Java application GeoGebra has built-in LaTeX syntax parsing to let you annotate graphs. The equations are rendered as bitmaps with rather low resolution, but the program and its general approach are well-suited for middle- and high-school students. Annotated graphs can be copied to the clipboard and pasted into your presentation. If you're a teacher, definitely give this a try!
On a recent Mac, use the pre-installed
/Applications/Utilities/. It's free and can be used as an input device for math formulas, as this screenshot shows:
You can enter maths in a natural way similar to TeX; as the typed "infinity" shows, the syntax is sometimes different from TeX, but if you can't guess a keyword there's always the pallette at the bottom right. You can copy the Grapher equation as a PDF graphic by right-clicking on it and choosing the appropriate selection from the contextual menu that pops up. I'm saying some more about this on the Pages pages.
Another alternative is Mathematica as a typesetting tool. One advantage of Mathematica is that the structure of its expressions is more semantically organized than in LaTeX, so that export to other formats (such as MathML) is more straightforward. On this page, I will focus on LaTeX because if you only want to learn one input method, LaTeX is the one that will be most useful in general. If you want to be "multilingual" and don't mind using a commercial product, I'd strongly recommend taking a look at Mathematica's capablilites. Some hints on how to get formulas and graphics from Mathematica into other programs is found on a separate page.
What about hand-writing your equations and using that in your presentations? Of course that's what I do in lectures all the time (using a Wacom Pen Tablet since 2006). In a more formal presentation, it can still work quite well to paste your hand-written maths into a slide from a drawing program. But if you want nicely formatted equations, then hand writing is never an ideal starting point. There is hand-writing recognition software that can deal with math expressions, and in particular Windows 7 appears to have made remarkable progress in this arena (as opposed to the Mac where Inkwell has been stagnating). However, I find it awkward to frequently switch back and forth between keyboard and pen tablet; and unfortunately that's precisely what happens when the fine points of your equation get lost in translation.
Now back to the main topic: LaTeX in presentations.
If you don't know LaTeX but want to know more about it, you may want to look at my LaTeX page first.
At the bottom of this page I'll refer to some nice free tools that rely essentially on LaTeX and PDF alone to create presentations. This is OK for many occasions, and it's commendable to go with open-source software all the way. And for a LaTeX writer like me, that's still the fastest way to make a no-frills presentation. But in the end you'll probably have more fun if you give in to the temptations of commercial software. In fact, the open-source route can drive you to despair if your next presentation is your thesis defense and you can't get that Quicktime movie to work on the punchline slide (it's all doable, but with a bit more work, as I describe here).
The beauty of Mac OS X is that PDF is the native format in which things are displayed. This is also true for the commercial program I'm talking about here: Apple's Keynote. The most recent version is
'09, but I currently have
You get it as part of the iWork bundle which includes Pages, a nice word processor and layout program; for additional comments see the Pages pages. A newer member of the iWork suite is Numbers, a spreadsheet application. Since I use Mathematica for spreadheet-related tasks (and much more), I may use Numbers even less than Pages. For a user like me who doesn't have Microsoft Office, Numbers could be the most convenient tool to open those Excel files that people sometimes send around by email (faster to start up than NeoOffice).
Back to Keynote:
I've had some people ask me question about Keynote's features as compared to other presentation software, e.g. Powerpoint. This is not the kind of question I'm focusing on here, though. I'm pushing Keynote here for a very particular type of use, but don't want to tell anyone what to buy, in particular if their intended usage is very different from mine: in short, Keynote functions as a media integration platform, allowing you to put materials produced in various other applications into one package for full-screen presentations, possibly with some nice transition effects added.
To what extent you find Keynote useful or wanting depends on how much you rely on Keynote for actual content production. My general advice would be that content is best produced with other dedicated applications such as Mathematica, a LaTeX system, a graphics program etc. This is the way I use Keynote, and this page is about one aspect of this work flow: the use of LaTeX typesetting with Keynote.
Putting LaTeX into Keyote is a piece of cake. Three different scenarios occur quite frequently:
- You have only a PDF file without LaTeX source but want to use parts of it in Keynote
- You have a LaTeX document and want to to pick out some equations or text to paste into Keynote
- You're making a slide and want to type an
equation "on the fly" for use in Keynote
In Powerpoint and Keynote alike, one can always achieve these
tasks by going through the first case: create a PDF file, display it
in Acrobat Reader (now Adobe
Reader), and copy selected parts as bitmaps to paste into the
presentation software. To prevent the result from looking grainy, one
should first zoom in in the PDF viewer before selecting and
copying the desired part (using the graphics copy tool). In the
presentation software, you then scale down the pasted image. This
creates bitmaps with acceptable resolution but large file size.
In Keynote, you can do much better than this. How much
better, may depend on your OS version (Jaguar versus Panther). Let's
go through the above cases:
The main thing you need is a PDF viewer from which you can copy
as PDF, instead of just bitmap format. Adobe Reader does not
allow this, but the built-in Preview application
In Preview version 2.1.0 and above (comes with Tiger),
you can actually select arbitrary rectangles within the PDF
page and copy them. This,
together with its ability to display
postscript files as PDF, makes the new
version of Preview immensely useful. With the release
of Tiger, Preview is at version 3.0. Adobe Reader 7 and 8 have
comparable features, but in addition can launch plugins to display additional
multimedia content embedded in the file. For this reason, it is still useful to
have Adobe Reader installed (in particular if you want to do PDF presentations with Beamer, see below).
- How it ought to work:
Shown in the screen shot is an arbitrary area selected in an arbitrary
PDF document in the Preview Application (version 2.1.0). To do this,
make sure you first activate the Select Tool (press Command-3
or click on the box icon at the top right of the toolbar).
If you paste the result into Keynote, it will be in true PDF
format. In other words, copying a formula this way, you can
scale it, change its opacity, give it shadows, etc.
However, there's a glitch on Leopard:
If you've upgraded to OS X "Leopard", then you're in for an unpleasant surprise: The cropping isn't preserved when pasting into Keynote '08 - this bug is fixed in Keynote '09. For those who still use Keynote '08, I've come up with a work-around for this annoying bug on a separate page. It requires one additional mouse click after copying from Preview, to fix the format of the copied selection.
screenshot from Keynote shows that the rectangle is
faithfully cropped; the result was also scaled and
Although only the selected part of the original PDF page is displayed
in Keynote, the pasted object still contains some information about
the discarded parts, so in some cases (for small areas) it can still
be more memory-efficient to just copy rectangles as bitmap images (either by screenshot or out
of Adobe Reader). The background of a PDF paper often appears transparent in Keynote, meaning that you can choose your own background color by placing a suitably filled rectangle underneath the copied PDF.
In principle, one can also do such manipulations in an automated way. That's particluarly useful if you are copying lots of formulas from a paper but want all of them to appear with the same colored background. The key is that all your copied equations are actually stored in the file that's created when you save the Keynote presentation. For more details, see my remarks on how to change the background color on the LaTeX page.
To put LaTeX into Keynote (as PDF), you need a LaTeX compiler and a
Cocoa-based previewer for PDF (this rules out Xwindow programs like
gv, but also means you should avoid Adobe Reader). Here are some
- The path that always works for me starts by
compiling a document with PDFLaTeX and opening the
result in Preview ≥2.1, and then continuing as in
- Another path that you may choose is to use the
LaTeX environment TeXShop
from right here at the University of Oregon (or
through the porting system fink). The TexShop Previewer allows you to copy rectangles just as in Preview ≥2.1, and the pasted result in Keynote is a PDF object with all the great advantages like scalability etc.
For immediate editing of formulas "on the fly",
there is a great little tool that can use any existing
LaTeX installation on your system:
It's intended to let you type LaTeX source either in a text box or in another prgram (like Pages or TextEdit), and quickly get the typeset result in a variety of useful formats. LaTeXiT tries to inherit the text properties (e.g., color, baseline) of the parent document if one invokes it from the
Also worth mentioning is the fact that LaTeXiT is linkback aware. What this means can best be seen by experimenting with the Keynote Linkback Plugin written by King Chung Huang. The download location can be found on the main web site of the Linkback Project. After installing this plugin, Keynote 4 (or 3) shows a new menu item "Edit (or refresh) in LaTeXiT" in the
Edit menu, whenever you highlight an equation that has been dragged into Keynote from LaTeXiT. If this doesn't show up, make sure you log out and back in again. By using this function from within Keynote, you recover the LaTeX source code for an existing PDF equation in
LaTeXit; the modfied PDF will automatically replace the old version on the Keynote slide.
The linkback plugin may cause problems, and a fix is described below.
For most purposes, LinkBack no longer offers any advantages with Keynote, because LaTeXiT as of version 1.15.0 has the ability to recover the original LaTeX source from a PDF that you paste into it. I.e., you can do the following:
Make an equation in LaTeXiT and copy it into Keynote.
Revisit the Keynote slide at a later time and select that PDF equation again.
Copy the PDF and paste it into the LaTeXiT window. If this PDF was created in LaTeXiT, its original source code re-appears in the editor panel, ready to be modified and copied back to Keynote.
Pierre Chatelier, the author of LaTeXiT, also responded very quickly to my requests and comments. The latest addition in response to one of my requests is a keyboard shortcut allowing you to copy the PDF output of LaTeXiT to the Clipboard. LaTeXit is discussed under a different aspect on my Scientific Illustrations page: My contribution to LaTeXit is an algorithm that converts a typeset formula into an outlined (i.e., font-safe) PDF object that will look the same in any application, including Keynote or Adobe Illustrator (I also helped a little with the Pasteboard code).
In conclusion, Apple's Keynote 4 (or 3) comes close to realizing a free-form layout and presentation system in which LaTeX can be integrated almost seamlessly via tools like LaTeXiT. The main gap between the LaTeX and iWork worlds is that styles of the parent document (such as font size) are not inherited by the embedded LaTeX object, so one has to specify them separately on the LaTeX side (which is easy enough to do in the two utilities I mentioned). The LaTeXiT application actually does the best job so far of bridging this gap - at least for Pages, but not yet for Keynote. This is of course a limitation of Keynote, not of LaTeXiT. More on this in the following section.
Caveats, additional utilities
Keynote is a commercial product, and you may or may not feel that you get your money's worth. Keynote essentially serves as a canvas on which many different media styles (text, math, images and movies) can be integrated and presented, as well as exports in various useful formats (e.g., as movies, PDFs or HTML). The added value provided by these programs lies partly in their professional layout and design templates, but that may not be so important to everyone.
However, there are some drawbacks of Keynote. In general, one gets the feeling that Apple is continuing the philosophy of the one-button mouse (adored by some, despised by many) by making the user interface of Keynote really simple-looking. This simplicity sometimes comes at a price when you want to do more complex tasks. Below are some issues that I came across.
A remark about Services:
All the nice features of LaTeXiT Services work in Mail or Pages, but not with Keynote: you cannot use the typesetting service within a Keynote text field directly! It's not clear to me why this works in Pages but not in Keynote. The unfortunate consequence of this is that the LaTeX image generated by LaTeXiT (or any other application) does not flow with the regular text in a Keynote slide, and hence formulas have to be repositioned separately from the text if you change, e.g., the width or height of a text field.
There are two ways around this problem:
Either type your text together with the formulas in LaTeX - then you don't need Keynote's text fields.
Or type simple inline formulas within Keynote by using Unicode characters from a symbol palette. There are several ways to access suitable palettes:
Use Keynote's own symbol lists (under the
Edit menu) or consult the Character Palette after enabling the
International menu bar item.
Copy symbols from Mathematica. To make the Unicode symbols work smoothly, it's good to choose
Arial Unicode as the text font (if you have it), or stick with something standard like
Inline equations without two-dimensional formatting (such as fractions etc.) can also be copied from PDF files directly by using the text selection tool in Preview. The same is true, and increasingly more relevant, for MathML viewed in a browser. The result can be pasted into RTF-capable applications, such as TextEdit, Mail and also Keynote's text fields. This provides a way to get some special symbols into Keynote without using graphics objects. However, since some symbols such as ħ don't get copied properly, you may still have to resort to one of the other options above (or, with a dismissive gesture, claim you've set ħ ≡ 1).
Sven Kreiss and Kyle Cranmer recently created a bona fide Service that actually works inside Keynote (and other applications) and can convert LaTeX symbols to Unicode characters on the fly: UnicodeIt.
Problems with the Keynote Linkback Plugin
The Linkback Plugin I downloaded from the official web site caused a severe problem with the positioning of grouped objects in Keynote, which showed up only after re-opening a saved presentation.
After installing this fix, I no longer have any problems with misplaced object positions after saving a file.
This may have been fixed by the time you read this, but if it isn't, there are instructions for how to fix the problem in this email discussion thread. The culprit is inside the Keynote application bundle, at
Keynote.app/Contents/Resources/Animations/K2LinkBackSupport.sfxplugin/Contents/MacOS/K2LinkBackSupport. You should replace this file by a new version which I've archived here. Make sure to download the correct one for your specific processor architecture:
Problem: There are tools for making drawings within Keynote, but you may want more capabilities
Solution: Some suggestions for software that can fill this gap are
- Use Adobe Illustrator or a similar graphics application to get all the bells and whistles. This includes the ability to copy and paste directly from Illustrator to Keynote.
- As a bitmap drawing application, get Seashore, a free program that supports some essential features like gradients and transparency, and is Mac OS X native. If you need a more mature program, consider learning The Gimp (it's now a Mac OS X native application). This and other alternatives are discussed on a separate page.
If you can't make up your mind which program to use for graphics work, don't worry: no matter how you produce your graphics, there is always the screen capture function. Use either the Grab application or the keyboard shortcut keys listed in the OS X System Preferences, as shown here (for Panther):
The first of these options is an ancient trick from as far back as Mac OS 6 or 7. It creates a file on the Desktop called "Picture 1". The most convenient of these screen capture shortcuts is the last one. It lets you select areas by dragging cross-hairs; and there is a specialized but undocumented bonus feature: when the cross-hairs show up, try pressing the
SPACE bar! You suddenly get a "focus-follows-mouse" behavior that highlights any windows or icons you hover over. A mouse click then captures exactly the highlighted object, preserving its dimensions and even its opacity.
Copying selections to the clipboard produces bitmap images. But under Tiger, you have additional options that let you choose PDF format.
- Here are two ways to get PDF screen shots:
- If your preferred default setting is bitmap (
PNG is the factory setting), you can do PDF screenshots on a case-by-case basis from the Terminal: type
screencapture -i -c -t PDF after making sure that the screen area to be captured isn't obscured by the Terminal window. This will launch the screen-capture crosshairs which you drag over the desired rectangle to be copied. The PDF screenshot will be on the Clipboard and can be pasted to Keynote, Preview, GraphicConverter etc.
- If you want to make PDF format the default screen capture format, then type the following in the Terminal:
defaults write com.apple.screencapture type pdf. This can be undone by typing
defaults write com.apple.screencapture type png. Other permitted graphics formats are
It should be kept in mind that comparisons with Powerpoint (or even OpenOffice) are not really fair because Keynote relies fundamentally on scalable objects both for its fonts and graphics, and if you have worked with vector graphics you know that they are generally a bit harder to manipulate than bitmaps. But this fundamental difference is precisely what makes Keynote superior in the final analysis.
Other presentation tools
Of course I've used other software, and the Keynote solution put forward here is perhaps not to everyone's taste. I've made heavy use of Powerpoint, and played around with OpenOffice/NeoOfficeJ. But I can never get used to their equation editors.
Why use other tools for presentations?
There is one important reason why one may not want to use Keynote: the technological infrastructure at conferences and meetings is typically centered around Powerpoint and PDF. At some conferences the organizers, in an honest attempt to reduce technical delays during presentations, require you to upload your talks onto some Windows machine prior to the session. This usually means you need to convert from Keynote either to Powerpoint or PDF.
Keynote does not keep animations in the PDF it exports (although this is technically possible). So only Powerpoint remains. But if you've ever tried to transfer a presentation from Mac Powerpoint to PC Powerpoint, you know you can't trust the results unless you double-check every slide on a PC. Now add the extra step of starting from Keynote instead of Mac Powerpoint, and it's clear that there's reason to be worried.
What other solutions are there?
Before giving up on Keynote because of the above problems, it may be worth mentioning one other export format that could be the ultimate solution: Interactive Quicktime Movie. Although Quicktime is not guaranteed to be installed on all Windows machines, it is certainly available. Before exporting a presentation in this format, make sure that you set a slide size of at least 1024×768 in the Document Inspector menu of your Keynote presentation. Exporting as an "Interactive Slide Show" in "Full Quality, Large" format yields a Quicktime movie that can be opened in any Quicktime-enabled movie player. If that player has a full-screen mode, the result looks almost exactly like the original Keynote presentation, except that everything (including fonts) is now in bitmap format. In other words, you have reduced the visual quality of your presentation to Powerpoint level...
SWF (Flash) is also an option, but with a big presentation I ended up getting an error message asking me to remove some transition effects because the file became too complex. Quicktime didn't encounter this problem.
There are open-source presentation tools that position themselves as more or less direct competitors of Powerpoint.
- NoeOffice, OpenOffice and KDE's kPresenter are important representatives of this class. The first two run natively in Aqua, while kPresenter requires an Xwindow server (and KDE).
Another approach that is gaining momentum is through web-based technologies. Although this poses some security risks, one can make complete office applications by using either the built-in file handling capabilities of advanced web browsers, or by launching Java applets (e.g.) from within a browser. These applications can load and run very smoothly because the computational load is shared between the client (where the user interface runs) and the server. To see a model like this in action, check out Google's new presentation application. In combination with a LaTeX-to-image converter, this allows you to make presentations that are almost indistinguishable from Powerpoint.
Here is a possible workflow:
Launch Firefox or Camino (haven't tried anything else). For many reasons, avoid Internet Explorer).
Create a Google presentation.
Launch the Equation Editor Google Gadget I installed on our departmental physics web site. It will create an image of the entered equation, in real time. It may be necessary to scale up the image by pressing the + button in the Gadget.
Drag the equation image from its Firefox window into the Google presentation window. Make sure the drag destination area in your presentation is empty, otherwise it may not work.
In the presentation, you can position and rescale the image to your liking.
If you already have images on your hard drive (equations or otherwise), they can of course be uploaded with a standard file dialog.
So the current state of existing online tools allows an almost seamless integration of math into presentations, without installing (and paying for) a single piece of extra software.
- An alternative to Google Docs with a more "Mac-like" user interface is 280Slides, a web-based presentation editor with some nice themes and a Cocoa-flavored styling. However, to get images and other media into your presentation, you still have to go through standard upload dialogs. The shiny interface can't completely make up for the clunkiness of the client-server division inherent in web-based solutions, but the interaction with this program is still pleasantly simple.
If you don't want to stoop this low, a viable alternative is to do presentations purely in PDF using the full screen mode of Adobe Reader. This allows many transition effects and even animations, all built from a LaTeX source. If you consider Keynote to be mainly a media integration platform, then any PDF-based substitute has to address multimedia content. This is the topic of my page on LaTeX-generated PDF with movies.
A somewhat separate issue is the formatting and book-keeping that is specific to computer-presentations: e.g., the incremental building of pages, item-lists or formulas. Here are some links to packages that deal with these tasks:
- Beamer, a LaTeX class that needs no external programs and is available from fink. Incremental builds also work nicely with this package. With a choice of many pre-defined presentation themes, this has by now become one of the most popular PDF presentation tools.
- TeXPower is a bundle of styles and classes that allows a fair amount of low-level control over the resulting PDF document, including incremental builds of formulas, and animation. The PDF document is created simply by using latex or pdflatex. Slide transition effects are also supported, but I would recommend not to use them too much. Especially the "dissolve" transition on a Mac does not look very smooth.
- PPower4 is similar to TeXPower but requires additional post-prcessing steps.
- The above are packages that illustrate the possibilities. A more complete list of Presentation tools is found here. This page also includes HTML-based presentations.
- Some more discussion of LaTeX for presentations
Last modified: Tue Sep 18 13:49:00 PDT 2012