The beamer manual says:
You can easily add your own actions: An action specification like ⟨action⟩@⟨slide numbers⟩ simply inserts an environment called ⟨action⟩
envaround the\itemor parameter of\actionwith<⟨slide numbers⟩>as overlay specification. Thus, by defining a new overlay-specification-aware environment named ⟨my action name⟩env, you can add your own action:\newenvironment{checkenv}{\only{\setbeamertemplate{itemize item}{X}}}{}You can then write
\item<beamer:check@2> Text.This will change the itemization symbol before
Text.toXon slide 2 inbeamermode. The definition ofcheckenvused the fact that\onlyalso accepts an overlay-specification given after its argument.
I'd like an action like \alert which instead colors its input gray. So I tried:
\documentclass{beamer}
\newenvironment<>{grayenv}{%
\color#1{gray}}{}
\begin{document}
\begin{frame}
Text is \begin{grayenv}<2-> grayed out\end{grayenv}.
\end{frame}
\begin{frame}
Who's \action<alert@+| gray@+(1)>{gray} now? \action<+(1)->{And now?}
\end{frame}
\begin{frame}
Who's \action<alert@+| grayenv@+(1)>{gray} now? \action<+(1)->{And now?}
\end{frame}
\end{document}
The first frame has the expected output: "grayed out" is grayed out on slide 2. The second frame has "Who's ¡all:¿gray now?" (bold is red), followed by no coloring on the next two slides. The third frame has "gray now?" (not "gray" as desired) grayed out on slide 2.
The only working examples of custom action I have seen are written as checkenv is: not as an overlay-aware environment, but a regular environment that ends its begin code with an \only{...} (see also this longer example).
Is there anyway to pass the overlay specification to the custom environment?
envthing was about then. – Matthew Leingang Dec 07 '10 at 01:21