# Making pause in a diagram

\documentclass{beamer}
\usepackage{tikz-cd}
\begin{document}
$\begin{tikzcd}[sep=huge] \mathcal{H} \arrow[d,"W_A" swap] \arrow[r,"T"]& \mathcal{H} \arrow[d,"W_A"] \\ \mathbf{R}(A^{1/2}) \arrow[r,"\widetilde{T}" swap] & \mathbf{R}(A^{1/2}) \end{tikzcd}$

\end{document}


I want in the first time to show ? in the place of $W_A$ and after pressing enter $W_A$ will appear.

• Just to let you know that there is a clear motivation behind the overlay-beamer-styles library: it allows you to prevent jumps, which in general happen if you use \only. – user121799 Aug 7 '19 at 15:48

Here is a solution for the left one. It can be done in the same way for the right one.

\documentclass{beamer}
\usepackage{tikz-cd}

\begin{document}
\begin{frame}[fragile]{frametitle}{subtitle}%
$\begin{tikzcd}%[sep=huge] \mathcal{H} \only<1>{\arrow[d,"?" swap]}\only<2->{\arrow[d,"W_A" swap]} \arrow[r,"T"]& \mathcal{H} \arrow[d,"W_A"] \\ \mathbf{R}(A^{1/2}) \arrow[r,"\widetilde{T}"] & \mathbf{R}(A^{1/2}) \end{tikzcd}$
\end{frame}
\end{document}


I would use overlay-beamer-styles for that.

\documentclass{beamer}
\usepackage{tikz-cd}
\usetikzlibrary{overlay-beamer-styles}
\begin{document}
\begin{frame}[t,fragile]
\frametitle{A commutative diagram}
$\begin{tikzcd}[sep=huge] \mathcal{H} \arrow[d,"?"{swap,visible on=<1>},"W_A" {swap,visible on=<2>}] \arrow[r,"T"]& \mathcal{H} \arrow[d,"?"{visible on=<1>},"W_A" {visible on=<2>}] \\ \mathbf{R}(A^{1/2}) \arrow[r,"\widetilde{T}" swap] & \mathbf{R}(A^{1/2}) \end{tikzcd}$
\end{frame}
\end{document}


The overlay-beamer-styles library has several advantages, one of them being that it avoids jumps. To see this consider an example with \only:

\documentclass{beamer}
\usepackage{tikz-cd}
\begin{document}
\begin{frame}[t,fragile]
\frametitle{A commutative diagram}
$\begin{tikzcd}[sep=huge] \mathcal{H} \arrow[d,"W_A" swap] \only<1>{\arrow[r]} \only<2->{\arrow[r,"T"]}& \mathcal{H} \arrow[d,"W_A"] \\ \mathbf{R}(A^{1/2}) \arrow[r,"\widetilde{T}" swap] & \mathbf{R}(A^{1/2}) \end{tikzcd}$
\end{frame}
\end{document}


On the other hand, the analogous construction with overlay-beamer-styles does not jump.

\documentclass{beamer}
\usepackage{tikz-cd}
\usetikzlibrary{overlay-beamer-styles}
\begin{document}
\begin{frame}[t,fragile]
\frametitle{A commutative diagram}
$\begin{tikzcd}[sep=huge] \mathcal{H} \arrow[d,"W_A" swap] \arrow[r,"T" {visible on=<2->}]& \mathcal{H} \arrow[d,"W_A"] \\ \mathbf{R}(A^{1/2}) \arrow[r,"\widetilde{T}" swap] & \mathbf{R}(A^{1/2}) \end{tikzcd}$
\end{frame}
\end{document}


It it true that in the special case of your example this is not an issue, but in general it is.

• Can anyone give "making pause" version for this plain TikZ picture in beamer? \begin{tikzpicture} \path (0,0) node (L1) {$\mathcal{H}$} +(0:4) node (R1) {$\mathcal{H}$} ++(-90:2) node (L2) {$\mathbf{R}(A^{1/2})$} +(0:4) node (R2) {$\mathbf{R}(A^{1/2})$}; \draw[->] (L1)--(R1) node[midway,above]{$T$}; \draw[->] (L2)--(R2) node[midway,below]{$\widetilde{T}$}; \draw[->] (L1)--(L2) node[midway,left,red]{?};\pause \draw[->] (R1)--(R2) node[midway,right,red]{?};\pause \end{tikzpicture}  – Black Mild Aug 18 '19 at 9:43