[Tex/LaTex] The use of \pause in beamer is causing the unnecessary addition of headers

beamerpause

I'm trying to use Beamer to create a presentation however I've got a problem when trying to use \pause to create an overlay.

The following is the code I'm working with…

\documentclass{beamer}
\usepackage{lmodern}

\title[Gene Gain and Loss in the White Rust Pathogen]{Gene Gain and Loss during Evolution of Obligate Parasitism in the White Rust Pathogen of \textit{Arabidopsis thaliana}}
\subtitle[]{\scriptsize Eric Kemen, Anastasia Gardiner, Torsten Schultz-Larsen, Ariane C. Kemen, 
\\Alexi L. Balmuth,
Alexandre Robert-Seilaniantz, Kate Bailey, Eric Holub,\\ David J. Studholme, Dan MacLean,
Jonathan D. G. Jones}
\author[Ben]{Ben}
\date[30/01/2013]{30$^\text{th}$ January 2013}
\institute{Imperial College London}

\usetheme{Dresden}
\usecolortheme{beaver}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}
\frametitle{Study Background}

\section{Study Background}
\begin{itemize}
\item It has been proposed, but not shown, that obligate biotrophy results from:
\begin{enumerate}
\item Reduced selection for maintenance of biosynthetic pathways \pause
\item Gain of mechanisms to evade host recognition or suppress host defence \pause 
\end{enumerate}
\item Previous research on powdery mildew fungus \textit{Blumeria graminis} or downy mildew oomycete \textit{Hyaloperonospora arabidopsidis} reveals a close correlation between the parasitism and massive gene losses in primary and secondary metabolism
\end{itemize}
\end{frame}

\section{Study Methodology}
\begin{frame}
\frametitle{Study Methodology}

\end{frame}

\section{Study Results}
\begin{frame}
\frametitle{Study Results}

\end{frame}

\section{Author's Discussion}
\begin{frame}
\frametitle{Author's Discussion}

\end{frame}

\section{Conclusions}
\begin{frame}

\frametitle{Conclusions}
\framesubtitle{Implications, and Future Directions}
\end{frame}

\end{document}

After using the \pause commands in the "Study Background" slide I get the same section appended to the header of each slide for each pause.. more visually I mean this

Unnecessary addition of section headers

Any idea how to rectify this so there's just one section header as I suspect should be the case?

Best Answer

By putting the \section command inside the frame environment you are ensuring that it is executed for each overlay of that frame. The use of the \pause command then ensures that this is done more than once. So LaTeX thinks that you have three sections called "Study Background" because that particular \section command is executed three times.

It is possible to adapt a LaTeX command to be more "overlay aware" in the sense that it only has its desired effect once per frame - the usual use of this is with counters that need to be hold their value across each overlay. But in this case the simpler solution is the better one: simply move the \section command out of the frame environment (as you have with the later \section commands).

Related Question