0

This question already has an answer here:

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}
\usetheme{Madrid}

\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 Oct 6 '15 at 15:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

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

\documentclass{beamer}
\usetheme{Madrid}

\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}

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.