About
Shop
LaTeX
Software
Books
Gallery
News
Contact
Blog
Settings
Account
Latest news 2024-10-15: New blog post: Tales for Our Times Book Launch.


8.1 Overlays

Overlays allow you to uncover parts of a slide. For example, to uncover the items in the above itemize environment:

\begin{frame}
  \frametitle{Mind-Controlling Cookies}
  \framesubtitle{Recipe}

  \begin{block}{Ingredients}
    \begin{itemize}[<+->]
    \item Self-raising flour;
    \item Butter;
    \item Chocolate chips;
    \item Sugar obtained from secret genetically modified beet.
    \end{itemize}
  \end{block}
\end{frame}

This creates five slides. The first just has one item (Figure 8.5), the second has two items (Figure 8.6), etc.

Figure 8.5: Overlays (First Slide)
 
Image of a slide. The title and subtitle are on the top left of the page in a blue font. The title is in a larger font than the subtitle. The itemized list uses a blue right pointing triangle as the item marker. A sans-serif font is used. Block title is in a blue font.

Mind-Controlling Cookies

Recipe

Ingredients

  • Self-raising flour;
Small navigation links are on the bottom right hand side of the page.

End of Image.

Figure 8.6: Overlays (Second Slide)

 

Image of a slide. The title and subtitle are on the top left of the page in a blue font. The title is in a larger font than the subtitle. The itemized list uses a blue right pointing triangle as the item marker. A sans-serif font is used. Block title is in a blue font.

Mind-Controlling Cookies

Recipe

Ingredients

  • Self-raising flour;
  • Butter;
Small navigation links are on the bottom right hand side of the page.

End of Image.

This completely hides the text until it's uncovered. If you prefer to show the text faintly before it's uncovered, you can use:

\setbeamercovered{transparent}

This mixes 85% of the background colour with 15% of the text colour. Note that the effect varies according to the display device. Now the first slide of:

\begin{frame}
  \frametitle{Mind-Controlling Cookies}
  \framesubtitle{Recipe}

  \begin{block}{Ingredients}
    \begin{itemize}[<+->]
    \item Self-raising flour;
    \item Butter;
    \item Chocolate chips;
    \item Sugar obtained from secret genetically modified beet.
    \end{itemize}
  \end{block}
\end{frame}

faintly shows the second item onwards (see Figure 8.7).

Figure 8.7: Overlays (transparent option)
 
Image of a slide. The title and subtitle are on the top left of the page in a blue font. The title is in a larger font than the subtitle. The itemized list uses a blue right pointing triangle as the item marker. A sans-serif font is used. Block title is in a blue font. The second, third and fourth list items and their markers are faint.

Mind-Controlling Cookies

Recipe

Ingredients

  • Self-raising flour;
  • Butter;
  • Chocolate chips;
  • Sugar obtained from secret genetically modified beet.
Small navigation links are on the bottom right hand side of the page.

End of Image.

Alternatively, you can specify the overlay information for each item.

Example:

\begin{frame}
  \frametitle{Mind-Controlling Cookies}
  \framesubtitle{Recipe}

  \begin{block}{Ingredients}
  \begin{itemize}
    \item<1->Self-raising flour;
    \item<2->Butter;
    \item<1->Chocolate chips;
    \item<2->Sugar obtained from secret genetically modified beet.
    \end{itemize}
  \end{block}
\end{frame}

This shows the first and third items on the first slide and all items on the second slide. You can similarly apply overlays to beamer environments, such as block, or to standard environments, such as enumerate:

\begin{frame}
  \frametitle{Mind-Controlling Cookies}
  \framesubtitle{Recipe}

  \begin{block}{Ingredients}
    \begin{enumerate}[<+->]
    \item Self-raising flour;
    \item Butter;
    \item Chocolate chips;
    \item Sugar obtained from secret genetically modified beet.
    \end{enumerate}
  \end{block}
\end{frame}

The general syntax of the overlay specification is <⟨start⟩-⟨end⟩>, where ⟨start⟩ is the starting index and ⟨end⟩ is the end index. Parts of the specification can be omitted. For example, <2-> means slide 2 onwards whereas <2> means only on slide 2. This specification can also be applied to some common commands, such as

\includegraphics<⟨overlay⟩>[options]{image file}

For full syntax, see the beamer manual [103].


This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-07-4).

© 2015 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs