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 want to color different subformulas with overlays successively.

\frame{

   \onslide<1>{$$\textcolor{red}{a} \land (\textcolor{red}{b} \lor c)$$} 
   \onslide<2>{$$\textcolor{red}{a} \land (b \lor \textcolor{c})$$} 
}

Unfortunately the formula "jumps" down one line.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

I think it's supposed to be something like:

\documentclass{beamer}

\begin{document}

\def\ca#1{\temporal<1>{#1}{\textcolor{red}{#1}}{#1}}
\def\cb#1{\temporal<2>{#1}{\textcolor{red}{#1}}{#1}}

\frame{

   $$\textcolor{red}{a} \land (\ca{b} \lor \cb{c})$$ 
}


\end{document}
share|improve this answer

What is wrong with simply

\documentclass{beamer}

\begin{document}
\frame{
$$\textcolor{red}{a} \land (\textcolor<1>{red}{b} \lor \textcolor<2>{red}{c})$$ 
}
\end{document}

?

share|improve this answer

You can use the \alt overlay specification:

\documentclass{beamer}% http://ctan.org/pkg/beamer
\begin{document}
\begin{frame}
  \alt<2>{\[\textcolor{red}{a} \land (b \lor \textcolor{red}{c})\]} 
    {\[\textcolor{red}{a} \land (\textcolor{red}{b} \lor c)\]}
\end{frame}
\end{document}

You specify the alternate slide (containing the first mandatory argument), while the remaining slides will contain the second mandatory argument.

share|improve this answer

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.