[Tex/LaTex] Beamer overlays and XYpic


Let's suppose we have some really really trivial XY-pic drawing:

\xymatrix {
  A & B \\
  C & D

What I want to achieve would be something like:

  1. Only B and D are visible on slide 1
  2. On slide 2, we get an arrow between B and D
  3. On slide 3, A appears and there's an arrow between D and A

I can get the nodes to appear using the Beamer \uncover command, but the arrows seem to happily ignore that.

Is there some way to get arrows only (from or until) certain overlay slides?

Best Answer

Now why didn't any of you commenters write an actual answer I could accept :)

But yes, \only works for arrows, so the following code

\xymatrix { \uncover<2->{A} & \only<3>{ \ar[l] } B }

works as expected, creating the following overlays:

A     B
A <-- B