# Beamer pause and numbering [duplicate]

I'm trying beamer for the first time (but have some experience with LaTeX). I want to use \pause and number some problems, but the numbers increment when I don't want them to. There must be a simple way to fix this, but I haven't found it yet. Here is an example of code

\documentclass{beamer}

\newcounter{bar}
\newcommand{\pbctr}{%
\stepcounter{bar}%
\thebar}

\begin{document}

\begin{frame}{Some examples and problems}
\begin{block}{Problem \pbctr}
\begin{enumerate}
\item How many divisors does the number 2 have?
\pause
\item How many divisors does the number 4 have?
\pause
\item What is the smallest number with six divisors?
\end{enumerate}
\end{block}
\pause
\begin{block}{Problem \pbctr}
\begin{itemize}
\item Can I distribute evenly 30 apples amongst 5 children
\pause
\item Can I distribute evenly 33 apples amongst 6 children?
\end{itemize}
\end{block}
\end{frame}
\end{document}


Any help would be appreciated.

code


## marked as duplicate by Gonzalo Medina beamer StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Oct 6 '15 at 15:29

• What exactly is your problem (i.e., the desired output)? – Daniel Oct 6 '15 at 15:04

In short: do nothing and let beamer deal with your problems :)

\documentclass{beamer}

\setbeamertemplate{theorems}[numbered]

\begin{document}
\begin{frame}{Some examples and problems}
\begin{problem}
\begin{enumerate}
\item How many divisors does the number 2 have?
\pause
\item How many divisors does the number 4 have?
\pause
\item What is the smallest number with six divisors?
\end{enumerate}
\end{problem}
\pause
\begin{problem}
\begin{itemize}
\item Can I distribute evenly 30 apples amongst 5 children
\pause
\item Can I distribute evenly 33 apples amongst 6 children?
\end{itemize}
\end{problem}
\end{frame}
\end{document}