[Tex/LaTex] How to dim block environments in beamer

beamerenvironments

One of my beamer slides looks like the following:

\documentclass{beamer}
\begin{document}
\begin{frame}{}

\begin{block}{Theorem}
Theorem 1.
\end{block}
\pause

\begin{block}{Theorem}
Theorem 2.
\end{block}
\pause

\begin{block}{Theorem}
Theorem 3.
\end{block}

\end{frame}
\end{document}

So as written, it shows Theorem 1 on the top of the page, then the theorem disappears, then it shows Theorem 2 in the middle of the page, then the theorem disappears, then it shows Theorem 3 on the bottom of the page.

What I would like it to do is show all three theorems on the page, but with the last two blocks dimmed out. When I change slides, I would like it to now dim the first theorem and brighten/emphasize the second block. Finally, I would like it to dim the second theorem and brighten the last theorem. How do I do this? If the question is unclear, I can clarify it. Help is appreciated! Thanks!

Best Answer

Is this what you want?

enter image description here

This is done by setting \setbeamercovered{transparent} in the preamble. Also, instead of using \pause, use <#> at the block environment to set the overlay:

\documentclass{beamer}
\setbeamercovered{transparent}

\begin{document}

\begin{frame}{}

\begin{block}<1>{Theorem}
Theorem 1.
\end{block}

\begin{block}<2>{Theorem}
Theorem 2.
\end{block}

\begin{block}<3>{Theorem}
Theorem 3.
\end{block}

\end{frame}
\end{document}