1

I'd like the environmnets align and align* in my beamer document to accept slide numbers. For instance, I'd like to be able to do something like this:

\documentclass{beamer}

\begin{document}

\begin{frame} \begin{align}<2-> a &= b & c &= d \end{align} \end{frame}

\end{document}

The desired behavior here would be for the content in my align* environment to appear from the second slide onward. I suspect this is possible because environments like definition and block work in precisely this way.

My guess is that something like the following syntax should work

\renewenvironment<>{align}{????}{????}
\renewenvironment<>{align*}{????}{????}

However, I can't quite figure out what to write to achieve my desired result.

I suppose one could generalize my question to ask if any built-in environment could be renewed to work in this way.

  • 1
    beamer offers \newenvironment<>{⟨environment name⟩}[⟨argument number⟩][⟨default optional value⟩]{⟨begin text⟩}{⟨end text⟩} in order to create overlay-aware environments. It should however be noted, "that the implementation of align does wicked things" (see beamer manual page 24) See also section "23.4 Uncovering Tagged Formulas Piecewise" of the beamer manual. – leandriis Jan 17 '21 at 09:53

1 Answers1

0

I suppose one could generalize my question to ask if any built-in environment could be renewed to work in this way.

In general you can use

\renewenvironment<>{center}
    {\begin{actionenv}#1\begin{originalcenter}}
    {\end{originalcenter}\end{actionenv}}

to make any well behaved environment overlay-aware


For the case of align*, it will be much better for your mental health to just wrap it into an onlyenv:

\documentclass{beamer}

\begin{document}

\begin{frame} \begin{onlyenv}<2-> \begin{align} a &= b & c &= d \end{align} \end{onlyenv} \end{frame}

\end{document}