Fazendo uma pausa em um diagrama

Fazendo uma pausa em um diagrama
\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}

Quero na primeira vez mostrar ?no lugar de $W_A$e depois de apertar enter $W_A$vai aparecer.

insira a descrição da imagem aqui

insira a descrição da imagem aqui

Responder1

Aqui está uma solução para o esquerdo. Isso pode ser feito da mesma maneira para o caminho certo.

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

insira a descrição da imagem aqui

insira a descrição da imagem aqui

Responder2

Eu usaria overlay-beamer-stylespara isso.

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

insira a descrição da imagem aqui

A overlay-beamer-stylesbiblioteca tem diversas vantagens, uma delas é evitar saltos. Para ver isso, considere um exemplo com \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}

insira a descrição da imagem aqui

Por outro lado, a construção análoga com overlay-beamer-stylesnão salta.

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

insira a descrição da imagem aqui

É verdade que no caso especial do seu exemplo isso não é um problema, mas em geral é.

informação relacionada