In academia, LaTeX is a popular alternative to PowerPoint for presentations. In this how-to, I’ll introduce you by example to the beamer class for creating presentation in LaTex. Using LaTex for this purpose has many advantages:

  • Present great-looking equations.
  • If you use LaTeX for your papers, you can easily reuse your equations and tables.
  • A more “professionnal” overall look.
  • Avoid compatibility problems when using computers other than your own. While you don’t always know which PowerPoint version is going to be available (if any), you’re almost sure to find a PDF reader. Just to be on the safe side, you can carry with you a standalone PDF reader like Sumatra PDF portable.

However, using LaTeX has limitations such as the lack of a user-friendly graphical interface and the impossibility to add media elements such as videos and animations. Furthermore, you have to say goodbye all those great transitions (just kidding, I hate transitions).

Before we start, if you are new to LaTeX I suggest you first have a look at Getting Started with LaTex.

To introduce you to the use of the beamer class, I will go throught a sample presentation:

\documentclass{beamer}

\usetheme[secheader]{Boadilla}
\usecolortheme{seahorse}
\usepackage[latin1]{inputenc}

These commands tell the TeX engine that the document is going to be a beamer presentation. To see what other themes and colorthemes are available, check out the beamer class user guide [PDF].

\title{My Nice Presentation}
\author{Productive Scholar}
\date{March 12, 2008}
\institute[2008]{ECON 101}

\begin{document}

\frame{\titlepage}

Sets up the title frame. The author and the institute (here I put 2008, but it could be your university) appear on the bottom left corner of every frame.

\section[Outline]{}
\frame{\tableofcontents}

\section{Introduction}

\frame {
	\frametitle{First Frame}
	\begin{itemize}
		\item<1->One good argument
		\item<2->Another good argument, after one click
		\item<3->Last one, after another click
	\end{itemize}
}

The first two lines make the outline frame. The rest create a frame with three bullet points. This frame consists of three actual PDF pages. The first bullet point will appear on all three, the second one on the last two pages and the last one on the last page only. This way, when you “click” (advance one page), a new element appears. To control the page on which the item first appears, change the number in the \item<1-> tag.

\section{Next Section}

\subsection{First Sub Section}

\frame {
	\frametitle{Second Frame}
	This text will stay on all pages.
	\only<1>{
		\begin{itemize}
			\item<1->This will only appear on the first page
			\item<1->This is also only for the first page
		\end{itemize}
	}
	\only<2>{
		\begin{itemize}
			\item<2->This will only appear on the second page
		\item<2->This is also only for the second page
		\end{itemize}
      }
}

In this case the first two bullet point elements appear on the first page of the frame, and only on that one. The other two elements only appear on the second page. To limit a part of the frame to a specific page, put your LaTeX code inside brackets after a \only<#> tag, where # is the page number.

\subsection{Second Sub Section}

\frame {
	\frametitle{Last Frame}
	This is the last frame
}

\end{document}

One last frame and the document is complete.

This short example is only meant to get you started. To learn more advanced stuff, like creating hand-outs or designing your own themes, check out the beamer class user guide [PDF].

On Windows most people use Acrobat Reader for presentation, which is ok (except when an Auto-Update pops-up at the beginning of your prensentation). The free Foxit Reader is another alternative.

On Mac OS X my favorite PDF reader for presentations is Skim. It works great and even allows you to add nice (for those who like transitions) Keynote-like transitions to your presentations (it has to be the same transition for all frames though). I also use the free iRed Lite to control Skim with my Apple remote.

Please share your beamer tips and tricks in the comments!

Getting started with LaTeX

January 21, 2008
LaTeX

For my first how-to post on LaTeX, I’m going to do a little introduction to help you get set up and started. Moving to LaTeX from traditional word processors like Microsoft Words or OpenOffice.Org necessitates some efforts, but once you’ve succeeded, you get all those fancy-looking equations as a reward!

Getting the software you need

Whatever the platform you’re on, you need two pieces of software for LaTeX: a LaTeX engine and a text editor. LaTeX documents are basically text files that are “compiled” by the LaTeX engine to create dvi, postscript or PDF documents. While you can use almost any text editor to create your LaTeX documents, such as Notepad on Windows or TextEdit on Mac OS, some are optimized for LaTeX and can therefore make you life easier. You might also need a viewer for the output files. LaTeX engines usually produce files in one of three formats: DVI, PostScript or PDF. I recommend outputting in PDF as it usually is more convenient and chances are you already have a viewer. All of the software I list below are free (except for WinEdt).

Windows

First, you need MiKTeX, a LaTeX engine. Then you need to choose a text editor. My editor of choice is TeXnicCenter, but WinEdt (shareware) is also very popular.

You can also download the proTeXt distribution which includes MiKTeX, TeXnicCener and GSView (a PostScript viewer).

Mac OS X

To install to LaTex engine on Mac OS, you first need to download i-Installer and use it to install the gwTeX package. Then you need to install an editor. My favorite is TeXShop, and iTeXMac is another good alternative.

The is also a complete distribution called MacTeX that includes the LaTeX engine (TeX Live 2007), TeXShop and other useful software. The only downside is the size (+700MB).

Linux

On Linux, you need the LaTeX and TeX packages that contain the engine. There are many editors available but the one I used when I was on Linux was Kile and I liked it very much.

Your first LaTeX document

\documentclass{report}

\begin{document}

\title{Introduction}
\author{You}
\maketitle

\tableofcontents

\chapter{Introduction}

You first \LaTeX file! This is a math equation $\alpha=0.1$
embedded in the text.
For a full equation:
\begin{equation}
\phi = \sum_{i=1}^{N} \left[ \frac{a^2_i}{2} \right]
\end {equation}

\section{A section}

This is the text that appears in the section.

\subsection{A sub section}

This is the text that appears in the sub section.

\chapter{Conclusion}

This concluded you first \LaTeX file.

\end{document}

The first line indicates the type of document. In this case it is a report, but it could have been an article or a book. The next line indicates the beginning of the document. The next three lines create the title page, and the one after that creates the table of content. The rest is the body of the document. This example document is quite simple, but you can build on it to make your own and learn.

Where to go from here

LaTeX is not something you can master in one day. I my opinion, the best way to learn is to start small and build on that. Don’t know how to do that symbol, how to put 3 images over a single caption or how to put colors in your document? That’s not a problem, Google is there for that. As long as you know the basics, you’re going to be able to do almost anything by looking it up on Google.

There is one book I would strongly recommend (it saved me a lot of time when I wrote my master thesis):


The LaTeX Companion (Tools and Techniques for Computer Typesetting)

Frank Mittelbach. Addison-Wesley Professional 2004, Paperback, 1120 pages, $64.99

Most of the information in this book can be found using Google, but having it all in a structured book can be a real time saver, especially in the beginning.

I plan to write a series of articles on LaTeX to follow up on this one, so make sure to check back (or subscribe to my rss feed).