3

I have a question about changing the font color in enumerated lists. I have seen several questions with good answers about how to change bullet colors but I haven't seen one that works for my case.

I use beamer slides during lectures that have multiple choice questions on them. I show the slide. Students answer. Then I show the answer. I want to indicate the correct answer by changing the color of the incorrect options. My problem is that I cannot figure out a way to do this within the itemize or enumerate environments. At least not in a way that will change the color of the answer option (A, B, C, D etc.) at the same time as the text. I have developed a workaround to illustrate what I am trying to accomplish.

Thanks in advance for any help.

\documentclass[12pt,t]{beamer}
\definecolor{grey}{RGB}{169,169,169}
\newcommand{\fd}[1]{{\color{grey}{#1}}}  % fd just means "fade". There is no special meaning.

\begin{document}

\begin{frame}
    The wealthiest economies are those where people are:
    \vskip10pt

    \only<1>{
        A. generalists (do many things pretty well).     \\ \vskip5pt
        B. specialists (do one thing really well).
        }
    \only<2>{
    \fd{A. generalists.}                                 \\ \vskip5pt
        B. specialists.
        }
\end{frame}
\end{document}
1

This may be a solution. I combined the redundant text in one enumeration and added two new commands \falseanswer and correctanswer.

How to change Item Color I found here.

\documentclass[12pt,t]{beamer}
\definecolor{grey}{RGB}{169,169,169}
\newcommand{\fd}[1]{{\color{grey}{#1}}}  % fd just means "fade". There is no special meaning.

\newcommand{\itemcolor}[1]{% Update list item colour
    \renewcommand{\makelabel}[1]{\color{#1}\hfil ##1}
}
\newcommand{\falseanswer}[1]{
    \only<1>{\itemcolor{blue}\item #1}
    \only<2>{\itemcolor{grey}\item \fd{#1}}
}
\newcommand{\correctanswer}[1]{
    \itemcolor{blue}\item #1
}

\begin{document}    
    \begin{frame}
        The wealthiest economies are those where people are:
        \vskip 10pt
        \begin{enumerate}
            \falseanswer{generalists\only<1>{ (do many things pretty well)}.}
            \correctanswer{specialists\only<1>{ (do one thing really well)}.}
        \end{enumerate}
    \end{frame}
\end{document}

enter image description here

  • Wow. This looks like a perfect solution. Much better than what I was doing. Thank you very much for this. – JMac Jan 17 '17 at 14:37
1

enter image description here

\documentclass[12pt,t]{beamer}
\setbeamercovered{transparent}

\begin{document}    
    \begin{frame}
        The wealthiest economies are those where people are:

        \begin{enumerate}
          \item<+> generalists\only<.>{ (do many things pretty well)}.
          \item<.-+> specialists\only<.(-1)>{ (do one thing really well)}.
        \end{enumerate}
    \end{frame}
\end{document}

enter image description here

  • Well this is interesting. It seems so simple I almost don't believe it. I didn't see this in the beamer manual. Clearly I need to look again. – JMac Feb 1 '17 at 16:36
  • I've been looking at the manual about this solution. Not sure it's going to work for me. I'm having issues when I have more than two options. Even more though, I would rather not have to change the action options all the time. The first method I showed, flawed though it may be, lets me just use cor and fal for correct and false. It might just be unique to my workflow but it seems to be more efficient in my case. I'm still looking into some other options. \alt<2>{}{} or \item<1-| alert@2> look promising, but I still need to get the list color and letters right. – JMac Feb 1 '17 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.