Beamer Presentations: Difference between revisions
| Line 26: | Line 26: | ||
\end{frame} |
\end{frame} |
||
= Slides with |
= Slides with Columns = |
||
In article mode we can usually get two columns by using the twocolumn package or environment. In a slide we need to have more control over the layout. |
In article mode we can usually get two columns by using the twocolumn package or environment. In a slide we need to have more control over the layout. |
||
Revision as of 07:11, 17 December 2009
Beamer is a LaTeX package to make slide presentations similar to those made by PowerPoint but with all the power of LaTeX typesetting, equations, and graphics.
Beamer workflow is similar to that of a LaTeX article, pdflatex -> preview -> edit -> pdflatex.
Slides with Tables
Adding tables to slides is no different that for other LaTeX documents (see tutorial). The only difference is that we want to have extra control over the table format and size.
For example we may (or may not) want to add light alternating colors to the rows in a table to make it easier for the eye follow them; this is achieved with \rowcolors command.
\documentclass[
...
xcolor=table]{beamer}
...
\begin{frame}
\begin{center}
\rowcolors{1}{blue!20}{blue!5}
\begin{tabular}{|l|c|}
\hline
J.\ S.\ Bach & 1685--1750 \\
W.\ A.\ Mozart & 1756--1791 \\
L.\ Beethoven & 1770--1827 \\
\hline
\end{tabular}
\end{center}
\end{frame}
Slides with Columns
In article mode we can usually get two columns by using the twocolumn package or environment. In a slide we need to have more control over the layout.
A frame (slide) with two columns is obtained by doing
\begin{frame}
\frametitle{Two Column Output}
\begin{columns}[c]
\column{1.5in}
First column \\
First column
\column{1.5in}
Second column with a graphics \\
\framebox{\includegraphics[width=1.5in]{p2005}}
\end{columns}
\end{frame}
This is the most direct way, although you need to calculate the width of the column and break the columns explicitly (text doesn't flow from one column to the other).
An alternative is to use the multicol package, which allows text to flow and calculates column widths by dividing the available width in equal parts.
\usepackage{multicol}
\setlength{columnsep}{0pt} %white space btwn cols, optional
\setlength{\columnseprule}{0.2mm} %add line btwn cols, optional
...
\begin{frame}
\begin{multicols}{2}
First column\\
First column
\columnbreak %force column break (optional)
Second column\\
Second column
\end{multicols}
\end{frame}
The drawback is that we loose control over the exact column width (for example if we want different widths).