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.

For making a small quiz in class I am working on a presentation in beamer.

I want to change the color of statements to red (wrong statement) or green (right statement) but only after my class answered the question.

I was searching the internet, but only found the color package, where you apparently can only change the text color before it appears.

Can someone point me into the right direction?

share|improve this question

1 Answer 1

up vote 13 down vote accepted

beamer provides an overlay specification with most of its macros/environments. It allows you to say (for example) ...\alert<2>{<stuff>}... so that <stuff> prints normally on slides other than number 2. \color itself is overlay aware in the form \color<2->{blue}{<stuff>} that would print <stuff> in blue from slide 2 onward. Alternatively, one can use something like ...{\only<2>{\color{blue}}<stuff>}... which prints <stuff> in blue only on slide 2.

Here's a short example

enter image description here

\documentclass{beamer}% http://ctan.org/pkg/beamer
\begin{document}
\begin{frame}
Some text {\only<2>{\color{blue}}and stuff}.
\end{frame}
\end{document}

Note that beamer already loads xcolor.

share|improve this answer
    
This is exactly what I need, with one little modification: I want the blue stuff be shown after, say, slide 2. –  mcwise Nov 1 '12 at 21:34
1  
I found it on the documentation page you linked, I will have to write \only<2-> and so on. Thanks! :) –  mcwise Nov 1 '12 at 21:36

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.