0

Is it possible to use the \onslide command in beamer within the tikzcd environment? The following mwe gives an error.

\documentclass[]{beamer}

\usepackage{tikz-cd}

\begin{document}

\begin{frame}

\frametitle{Slide 1}

\[
\begin{tikzcd}
X
\arrow{r}{g}
\onslide<2->{\arrow[dashed,bend right]{rr}[swap]{\exists f\circ g}}
    \pgfmatrixnextcell 
Y\arrow{r}{f}
    \pgfmatrixnextcell 
Z
\end{tikzcd}
\]

\end{frame}

\end{document}
  • @dcmst I read through that post and still am not sure how to apply it to my situation. – Brian Fitzpatrick Oct 7 '14 at 20:06
  • you are right, sorry, I retracted the close vote. – Nico Vecchio Oct 7 '14 at 20:06
1

Use of onslide*<2-> should solve your problem. My trial also indicates that only<2-> would work too. Since onslide* is equivalent to only from beamer view point.

enter image description here enter image description here

Code

\documentclass[]{beamer}

\usepackage{tikz-cd}

\begin{document}

\begin{frame}

\frametitle{Slide 1}

\[
\begin{tikzcd}%[row sep=3em,column sep=4.5em]
X
\arrow{r}{g}
\onslide*<2->{\arrow[dashed,bend right]{rr}[swap]{\exists f\circ g}}
        \pgfmatrixnextcell 
Y\arrow{r}{f}
        \pgfmatrixnextcell 
Z
\end{tikzcd}
\]

\end{frame}
  • This is useful. I wanted the content on slide 1 to be in the same place on slide 2 so I added \onslide*<1>{\arrow[white,dashed,bend right]{rr}[swap]{\phantom{\exists f\circ g}}} Thanks! – Brian Fitzpatrick Oct 8 '14 at 16:22
  • Good workaround, indeed. – Jesse Oct 9 '14 at 2:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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