Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have several blocks in a slide:

\begin{block}{block 1}
  block 1
\end{block}
\begin{block}{block 2}
  block 2
\end{block}
\begin{block}{block 2}
  block 2
\end{block}

Does anyone know how to overlay them so as to show them block by block by left-clicking mouse?

share|improve this question
1  
\pause between blocks maybe? Or do want them on top of each other? Your question is not very specific to that regard. –  hakaze Aug 15 '12 at 13:56

1 Answer 1

up vote 6 down vote accepted

Three ways (depending on how you want them to appear, there might be other possibilities):

\documentclass{beamer}

\begin{document}
\begin{frame}
\onslide<+->{\begin{block}{block 1}
  block 1
\end{block}}
\onslide<+->{\begin{block}{block 2}
  block 2
\end{block}}
\onslide<+->{\begin{block}{block 3}
  block 3
\end{block}}
\end{frame}

\begin{frame}
\only<1>{\begin{block}{block 1}
  block 1
\end{block}}
\only<2>{\begin{block}{block 2}
  block 2
\end{block}}
\only<3>{\begin{block}{block 3}
  block 3
\end{block}}
\end{frame}

\begin{frame}
\begin{block}{block 1}
  block 1
\end{block}\pause
\begin{block}{block 2}
  block 2
\end{block}\pause
\begin{block}{block 3}
  block 3
\end{block}
\end{frame}

\end{document}
share|improve this answer
    
Thanks, what is the difference between the 1st and the 3rd solutions? –  SoftTimur Aug 15 '12 at 14:15
    
@SoftTimur \pause and \onslide behave differently when used inside environments (in my little example there will be no difference since the commands were not used inside environments). The beamer documentation contains the details. –  Gonzalo Medina Aug 15 '12 at 22:45
    
I found Solution 2 to be the best substitute for block transition animations. It has a lot of use cases while preparing slides. Thanks! –  Dexter Jul 31 '13 at 21:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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