Reset slide counter after \pause in Latex Beamer

\begin{itemize}
\item text1
\pause\item text2
\pause\item text3
\end{itemize}

\begin{figure}

\includegraphics<1>[width=\textwidth]{pics/graphic1.jpg}

\includegraphics<2-3>[width=\textwidth]{pics/graphic2.jpg}

\end{figure}


I want to make images appear one after the other along with the text that describes them. I've tried these:

But none seems to work. I came to suspect that the \pause is the problem. Latex seems to start counting the slides on which to let the images appear after the pauses, as if the code after the \pause is still affected by it, even though the itemize environment is closed. Is there a way to reset the counter? I am aware that putting the images before the itemize environment helps, but I would like to know how to make my slides exactly the way I want them.

migrated from stackoverflow.comNov 5 '13 at 23:37

This question came from our site for professional and enthusiast programmers.

if \pause causes problems, the solution is simple: Don't use \pause! Instead you can let the itemize environment do the uncovering for you.

\documentclass{beamer}

\begin{document}
\begin{frame}
\begin{itemize}[<+->]
\item text1
\item text2
\item text3
\end{itemize}

\begin{figure}
\includegraphics<1>[width=.2\textwidth]{example-image-a}
\includegraphics<2-3>[width=.2\textwidth]{example-image-b}
\end{figure}
\end{frame}
\end{document}