[Tex/LaTex] Beamer: Uncovering lines in the align environment

alignbeamer

I have been referencing this question Uncover lines of an align environment with beamer, but I am having additional trouble that none of the comments or answers seem to

\begin{frame}
Let $i\neq j$. Choose $\{e_1,...e_i,...,e_j,...,e_n\} \subset \mathbb{C}^n$
to be set of pair-wise orthogonal unit vectors (i.e., $\langle e_k,e_l 
\rangle = \delta_{kl}$).  \pause Replace $e_j$ with $ze_i$, where $|z| = 1$, 
so that $\{e_1,...,e_i,...,ze_i,...,e_n\}$.  \pause Note that $B = I + B_0$. 
Hence,

\begin{align*} \onslide<3->\tau_{n} (CB) =&~ 0 \\ \onslide<4->\tau_n(CI) + 
\tau(CB_0) =&~ 0 \\ \onslide<5->a_{ij} \overline{z} + \overline{a}_{ij} z 
=&~ 0 \\ \onslide<6->Re(a_{ij} \overline{z}) =&~ 0 \end{align*}

\pause If $z = 1$, then $Re(a_{ij}) = 0$.

\pause If $z = -i$, then $Re(a_{ij} i) = -Im(a_{ij}) = 0$. Therefore, 
$a_{ij} = 0$. 
%So that are collection becomes
\end{frame}

…hmmm…the code didn't enter in nicely. Well, hopefully you can see the problem that I am unsure how to deal with. In the align environment, I have multiple occurrences of \onslide, and just outside of it I have multiple occurrences of \pause. What this results in is sequence of things appearing out of order. How do I fix this? I tried changing the arguments of each \onslide, but that didn't help any.

Best Answer

The main problem with your code is the syntax of the \onslide commands. You should be writing

\onslide<3->{....}

where ... is the material to which this declaration applies, e.g.

\onslide<3->{\tau_{n} (CB) &= 0 \\}

instead of \onslide<3->\tau_{n} (CB) &= 0 \\. That will fix up much of your problem with the display. Then the \pause after the alignment should be given the next slide number, in this case 7, by writing

\pause[7]

instead of just \pause. With these changes each element on your slide will be revealed in order.

\documentclass{beamer}

\begin{document}

\begin{frame}
  Let $i\neq j$. Choose
  $\{e_1,\dots,e_i,\dots,e_j,\dots,e_n\} \subset \mathbb{C}^n$ to be
  set of pair-wise orthogonal unit vectors (i.e.,
  $\langle e_k,e_l \rangle = \delta_{kl}$).
  \pause
  Replace $e_j$ with $ze_i$, where $|z| = 1$, so that
  $\{e_1,\dots,e_i,\dots,ze_i,\dots,e_n\}$.
  \pause
  Note that $B = I + B_0$.  Hence,

  \begin{align*}
    \onslide<3->{\tau_{n} (CB) &= 0 \\}
    \onslide<4->{\tau_n(CI) + \tau(CB_0) &= 0 \\}
    \onslide<5->{a_{ij} \overline{z} + \overline{a}_{ij} z &= 0 \\}
    \onslide<6->{Re(a_{ij} \overline{z}) &= 0}
  \end{align*}

  \pause[7]
  If $z = 1$, then $Re(a_{ij}) = 0$.

  \pause
  If $z = -i$, then $Re(a_{ij} i) = -Im(a_{ij}) = 0$.
  Therefore, $a_{ij} = 0$.
\end{frame}

\end{document}