# Pause in beamer itemize environment with figures and then text

I am preparing for a presentation in beamer. Please see the following code, Ideally, I want "This is the first text line" to appear first, and then the figure to appear, and then "This is the second text line" to appear, followed by "This is the third text line". I want them to appear in a sequential order. There is a little animation in the figure with some animation. The current code gives me a strange order of appearing. All of the text lines and the figure will appear at the same time. Then after the animation in the figure is done, the second and third text lines will disappear and then starts to appear, as controlled by the \pause function. Could you help? Thanks a lot.

\documentclass{beamer}
\usefonttheme{professionalfonts}
\usefonttheme{serif}
\definecolor{blue}{rgb}{0.1,0.3,0.8}
\usepackage{amssymb,amsmath,amsfonts,amsthm,mathrsfs}
\usepackage{version}
\usepackage{array}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\setbeamertemplate{caption}[numbered]
\usepackage{ragged2e}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{tikz}
\usetikzlibrary{calc,trees,positioning,arrows,chains,shapes}
\usetikzlibrary{arrows,shapes}
\tikzstyle arrowstyle=[scale=1]
\tikzstyle directed=[postaction={decorate,decoration={markings,
mark=at position 0.6 with {\arrow[arrowstyle]{stealth}}}}]
\usepackage{enumerate}
\usepackage{comment}
\usepackage{bbm}
\usepackage{subfigure}
\usepackage{hyperref}
\usepackage{pgfplots}
\setbeamertemplate{theorems}[numbered]
\usecolortheme[named=blue]{structure}
\usetheme{default}
\setbeamertemplate{footline}[page number]
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,positioning}
\usetikzlibrary{decorations.markings}
\tikzstyle arrowstyle=[scale=1]
\tikzstyle directed=[postaction={decorate,decoration={markings,
mark=at position 0.6 with {\arrow[arrowstyle]{stealth}}}}]
\newtheorem{proposition}[theorem]{Proposition}
\begin{document}

\begin{frame}
\frametitle{\large{New Approach}}
\small
\item This is the first text line
\pause
\tikzstyle{lb} = [rectangle, draw, fill=blue!20, text width=11em, text centered, rounded corners, minimum height=2.5em]
\tikzstyle{mb} = [rectangle, draw, fill=blue!20, text width=8em, text centered, rounded corners, minimum height=2.5em]
\tikzstyle{sb} = [rectangle, draw, fill=blue!20, text width=6em, text centered, rounded corners, minimum height=2.5em]
\tikzstyle{tb} = [rectangle, draw, fill=blue!20, text width=5em, text centered, rounded corners, minimum height=2.5em]
\bigskip
\bigskip
\begin{figure}
\begin{center}
\vspace*{-0.2in}
\tiny{
\begin{tikzpicture}[node distance=4.2cm, auto,>=latex', thick]
\node [tb] (latent) {$F_{X_o\underline X}$};
\node [mb, right= 2.5cm of latent] (policy) {\tiny{Seller's Expected Profit    $\text{E}[\pi_S(r)]$}};
\node [mb, below right= 1.2cm and 0.3 cm of latent] (OB) {Bids Data (Bids Distributions)};\pause
\path[->] (latent) edge[->] (policy);\pause
\path[->, draw, red, left=1cm of OB] (OB) -- +(-1.2,0) -| node[near start] {} (latent);\pause
\path[->, draw, green, right=1cm of OB] (OB) -- +(1.2,0) -| node[near start] {} (policy);\pause
\end{tikzpicture}
}
\end{center}
\end{figure}
\item \pause This is the second text line
\item \pause This is the third text line
\end{itemize}
\end{frame}
\end{document}


With

\item<7-> This is the second text line
\item<8> This is the third text line


this explicitly tells on which slides the second and third line should be visible.

\documentclass{beamer}
\usefonttheme{professionalfonts}
\usefonttheme{serif}
\definecolor{blue}{rgb}{0.1,0.3,0.8}
\usepackage{amssymb,amsmath,amsfonts,amsthm,mathrsfs}
\usepackage{version}
\usepackage{array}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\setbeamertemplate{caption}[numbered]
\usepackage{ragged2e}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{tikz}
\usetikzlibrary{calc,trees,positioning,arrows,chains,shapes}
\usetikzlibrary{arrows,shapes}
\tikzstyle arrowstyle=[scale=1]
\tikzstyle directed=[postaction={decorate,decoration={markings,
mark=at position 0.6 with {\arrow[arrowstyle]{stealth}}}}]
\usepackage{enumerate}
\usepackage{comment}
\usepackage{bbm}
\usepackage{subfigure}
\usepackage{hyperref}
\usepackage{pgfplots}
\setbeamertemplate{theorems}[numbered]
\usecolortheme[named=blue]{structure}
\usetheme{default}
\setbeamertemplate{footline}[page number]
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,positioning}
\usetikzlibrary{decorations.markings}
\tikzstyle arrowstyle=[scale=1]
\tikzstyle directed=[postaction={decorate,decoration={markings,
mark=at position 0.6 with {\arrow[arrowstyle]{stealth}}}}]
\newtheorem{proposition}[theorem]{Proposition}
\begin{document}

\begin{frame}
\frametitle{\large{New Approach}}
\small
\item This is the first text line
\pause
\tikzstyle{lb} = [rectangle, draw, fill=blue!20, text width=11em, text centered, rounded corners, minimum height=2.5em]
\tikzstyle{mb} = [rectangle, draw, fill=blue!20, text width=8em, text centered, rounded corners, minimum height=2.5em]
\tikzstyle{sb} = [rectangle, draw, fill=blue!20, text width=6em, text centered, rounded corners, minimum height=2.5em]
\tikzstyle{tb} = [rectangle, draw, fill=blue!20, text width=5em, text centered, rounded corners, minimum height=2.5em]
\bigskip
\bigskip
\begin{figure}
\begin{center}
\vspace*{-0.2in}
\tiny{
\begin{tikzpicture}[node distance=4.2cm, auto,>=latex', thick]
\node [tb] (latent) {$F_{X_o\underline X}$};
\node [mb, right= 2.5cm of latent] (policy) {\tiny{Seller's Expected Profit    $\text{E}[\pi_S(r)]$}};
\node [mb, below right= 1.2cm and 0.3 cm of latent] (OB) {Bids Data (Bids Distributions)};\pause
\path[->] (latent) edge[->] (policy);\pause
\path[->, draw, red, left=1cm of OB] (OB) -- +(-1.2,0) -| node[near start] {} (latent);\pause
\path[->, draw, green, right=1cm of OB] (OB) -- +(1.2,0) -| node[near start] {} (policy);\pause
\end{tikzpicture}
}
\end{center}
\end{figure}
\item<7-> This is the second text line
\item<8> This is the third text line
\end{itemize}
\end{frame}
\end{document}


• Thanks a lot, this is exactly the order I want. But why is it "7-" instead of "7"? Jan 11 '16 at 5:41
• The 7- tells that it should be displayed starting from 7th until the end. You can try with 7 and see, that the second line vanished on the last slide. Jan 11 '16 at 9:25