[Tex/LaTex] Why does Beamer create multiple slides, each updated with the next item, in an itemize environment

beameritemize

I'm making a presentation in Beamer, and upon adding a certain number of items in an itemize environment, Beamer creates multiple slides. Each successive slide has one more item added to it. For example,

\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Project Objective}
\begin{itemize}
\item This is the first item.
\begin{itemize}
\item Subitem1
\item Subitem2
\end{itemize}
\item This is the second item.
\begin{itemize}[<+->]
\item Subitem3
%\item Subitem4
\end{itemize}
\end{itemize}
\end{frame}
\end{document}

produces one slide: One slide with all items and subitems 1-3

However, uncommenting Subitem 4 produces two slides:Two slides with all items. The first includes subitems 1-3, the second includes subitems 1-4.

Adding subsequent subitems creates subsequent slides, each with another subitem added. Adding subsequent items does not create more slides; each new item appears on all slides, indented below where the last subitem should have been. What causes this?

Best Answer

You should read up on what is referred to as "overlay specification" within the beamer user guide. Here is an excerpt (taken from section 3.10 Using Overlay Specifications):

The overlay specifications are given in pointed brackets. The specification <1-> means “from slide 1 on.” [...] beamer automatically computes the number of slides needed for each frame. More generally, overlay specification are lists of numbers or number ranges where the start or ending of a range can be left open. For example -3,5-6,8- means “on all slides, except for slides 4 and 7.”

Note the different use of frame and slide. Each frame may have multiple slides associated with it. The overlay specification is designed to identify the number of slides for each frame. There are verbatim overlay specifications, like \only, \onslide and some "optional arguments" to macros like \item.

For itemize (lists in general, and other structures like frame), you can specify an incremental overlay specification <+-> that inserts the appropriate pause at possibly-sequential items, like lists. Read more about this in section 9.6.4 Incremental Specifications.