Scientific Presentations: Starting Point

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

26/10/2008 Keynote and LaTeX on Mac OS X

Jens Nöckel's
Homepage Scientific presentations
Computer
notes home Table of contents
Starting point
Other presentation tools
Objectives
Why use other tools for presentations?
Solutions
What other solutions are there?
Caveats

Starting point
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.

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 use LaTeX, you may find it easier to use dedicated equation editors. Here are some
choices:

Use the pre-installed Grapher in /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.

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 '08.

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 new 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:

The Keynote manual (PDF) is here.


The new bitmap transparency capability of Keynote '08 is shown on this page, which also discusses other bitmap
programs.

Objectives
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
http://www.uoregon.edu/~noeckel/… 1/6
26/10/2008 Keynote and LaTeX on Mac OS X
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.

For more information on how to handle specific types of media, such as movies or sound, in Keynote, there is a
separate page.

Putting LaTeX into Keyote is a piece of cake. Three different scenarios occur quite frequently:

1. You have only a PDF file without LaTeX source but want to use parts of it in Keynote
2. You have a LaTeX document and want to to pick out some equations or text to paste into Keynote
3. 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.

Solutions
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:

1. 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 does. 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 Keyboard. 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.

The screenshot from Keynote shows that the


rectangle is faithfully cropped; the result was
also scaled and rotated.
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.
2. 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 solutions:
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 case 1.
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.
A very nice LaTeX environment is iTeXMac but its previewer allows only page by page copying just like the
http://www.uoregon.edu/~noeckel/… 2/6
26/10/2008 Keynote and LaTeX on Mac OS X
to invoke Preview as an external previewer in the iTeXMac Preferences (the problem with this is that
automatic updating of the PDF display no longer works when recompiling a source). For the purposes of
copying into Keynote, I would therefore favor TeXShop.
3. For immediate editing of formulas "on the fly", there are three great little tools that can use any existing LaTeX
installation on your system:
LaTeX Equation Editor. This allows you to type LaTeX formulas one at a time and compile them with any
desired size or color, and then drag them into Keynote as a PDF object. It can't possibly get any easier to
compose free-form slides with mathematical content. I've used this for the longest time both on Panther
and Tiger. It differs from the next two programs in that it uses latex (+ ghostscript) instead of pdflatex
to create the formula. This actually works better in conjunction with Adobe Illustrator, but makes no
difference with Keynote.
Equation Service. This is technologically a bit fancier than the previous tool. In addition to the functionality
of LaTeX Equation Editor, this software can run as a "Service" under Mac OS X. This allows it to be invoked
from within other programs (like Keynote or even Apple's Mail.app), almost as if it were part of that
program. For example:
a. In Keynote, type an equation in the Notes window and select the "typeset to pasteboard service"
service from the "Services" Menu item. Pressing CMD-V then pastes the formula into the presentation.
b. In TextEdit, Pages, math input with Equation Service works as follows: having typed a formula like
\sin\alpha, you press shift-← to highlight the code and hit CMD-/ to to create a rescalable PDF object
containing the typeset formula (Equation Service must already be running for these things to work
properly from within an application). This object then flows with the text it is embedded in. When
exporting to HTML from Pages, a bitmap is automatically created in place of the PDF.
c. In Mail, you can type \frac{1}{2}, highlight that code and hit CMD-/ to to create a nice fraction
without ever leaving your email window. The graphic representation of each formula is a PDF
attachment.
A very versatile tool indeed (provided you know LaTeX, so please learn it or you'll be wasting the powers of
your Mac)!
LaTeXiT is the newest member of this group. It has all the features of the other two combined (i.e., it can
also be used as a Service), and more. You should still try these all out: what works best for me may not be
best for you... LaTeXiT is my personal favorite.
a. One big advantage of LaTeXiT is that it actually does inherit the text properties (e.g., color) of the
parent document if one invokes it from the Services menu as described above (for EquationService).
b. 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.
Warning:
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:
1. Make an equation in LaTeXiT and copy it into Keynote.
2. Revisit the Keynote slide at a later time and select that PDF equation again.
3. 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.
c. 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 LaTeX Equation Editor, Equation Service or 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
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.

1. 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
http://www.uoregon.edu/~noeckel/… 3/6
26/10/2008 Keynote and LaTeX on Mac OS X
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:
a. Either type your text together with the formulas in LaTeX - then you don't need Keynote's text fields.
b. 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 Helvetica.
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 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).
2. 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.
Solution:
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/K2LinkBackSuppo
. 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:
PowerPC processor
Intel processor
After installing this fix, I no longer have any problems with misplaced object positions after saving a file.
3. 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
a. 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.
b. 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. This and other alternatives are discussed on a separate
page.
c. 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
http://www.uoregon.edu/~noeckel/… 4/6
26/10/2008 Keynote and LaTeX on Mac OS X
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?

Abusing Keynote

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...

Exporting as 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.

Emulating Powerpoint

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 one runs natively
in Aqua, the others require an Xwindow server.
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:
1. Launch Firefox or Camino (haven't tried anything else; but obviously avoid Explorer).
2. Create a Google presentation.
3. 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.
4. 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.
5. In the presentation, you can position and rescale the image to your liking.
6. 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.

LaTeX-based presentations

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
http://www.uoregon.edu/~noeckel/… 5/6
26/10/2008 Keynote and LaTeX on Mac OS X
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.
Foiltex
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

[email protected]
Last modified: Wed Jul 2 08:43:02 PDT 2008

http://www.uoregon.edu/~noeckel/… 6/6

You might also like