0

I have a frame with two parts. I show the first part (figures and bullet points) using \pause. Then I do something similar for the second part. I need that when the second part appears, everything that was in the first part is grayed out.

Ideally, I would like to gray out both text and image, but even just text would be better than nothing.

\documentclass{beamer}

\usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}

\begin{document} \begin{frame}{My Frame} Intro line

\pause

\begin{minipage}[t]{.49\textwidth}
  \begin{center}
  Pic goes here
  \end{center}
\end{minipage}\hfill
\begin{minipage}[b]{.49\textwidth}
\begin{itemize}
  \item Very important thing
  \pause
  \item Even more important thing
  \end{itemize}
\end{minipage}


\pause

% After this pause, the previous part should be grayed out.

Big sentence
\begin{itemize}
  \item Cool solution \pause
  \item Strong statement
\end{itemize}

\end{frame}

\end{document}

Simon
  • 517
  • 5
  • 22

1 Answers1

1

If you are fine with not graying out the image, you could simply add a \only<4->{\color{gray}} in your slide like this:

\documentclass{beamer}

\usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{xcolor} % this is needed as well

\begin{document} \begin{frame}{My Frame} \onslide<1->{ { \only<4->{ \color{gray} % see https://tex.stackexchange.com/a/236520/128658 for different nesting levels \setbeamercolor{itemize/enumerate body}{fg=gray} % see https://tex.stackexchange.com/a/388900/128658 for different nesting levels \setbeamercolor{itemize item}{fg=gray} }

        Intro line

        \onslide&lt;2-&gt;{
            \begin{columns}
                \begin{column}{.49\textwidth}
                    \begin{center}
                      Pic goes here
                    \end{center}
                \end{column}
                \begin{column}{.49\textwidth}
                    \begin{itemize}
                        \item Very important thing
                        \onslide&lt;3-&gt;{
                            \item Even more important thing
                        }
                    \end{itemize}
                \end{column}
            \end{columns}
        }
    }
}

\onslide&lt;4-&gt;{
    % After this pause, the previous part should be grayed out.

    Big sentence
    \begin{itemize}
      \item Cool solution \pause
      \item Strong statement
    \end{itemize}
}
\end{frame}

\end{document}

This way the color-directive (which only acts on the current scope (aka the brace-enclosed region) will only be present from the fourth slide-part onwards (thus after the third \pause).

EDIT: I suppose for graying out the image you could do a similar trick in order to tweak the alpha-value of the image on the fourth slide-part. For inspiration see e.g. Includegraphics: set image opacity

EDIT2: As it turns out pause does not seem to deal graciously with extra scopes on the slide (or I failed to use them properly). Thus I have replaced the \pause commands with explicit \onslide blocks. Furthermore beamer uses some special magic to figure out the font color of text in list environments. In order to change these, you'll have to change the respective color in the current beamer theme. In much the same way, the bullet points themselves can be colored as well.

And finally I replaced your minipage constructs with beamer's columns environment (which was made for the exact purpose you seem to be using minipages now).

Raven
  • 3,023
  • Thanks, but this makes only 'Intro line' and 'Pic goes here' gray. The bullet points become blue instead. – Simon Oct 18 '21 at 12:46
  • Ah yes this only changes the color of the text. It shouldn't affect the color of bullet points though... But if you find a way to change the bullet point color on-the-fly, you can just add that statement to the \onslide command – Raven Oct 18 '21 at 12:50
  • I can fix that by using \textbullet rather than itemize. But now the behavior is this:
    • fist there is 'intro line' already gray
    • then pic and bullets appear together, all gray, together with 'big sentence' and 'cool solution' (not gray)
    • then everything but intro line disappear
    • everything reappears again
    – Simon Oct 18 '21 at 13:10
  • Uhm... Okay now wait a second. I guess I have to try to compile this myself after all xD – Raven Oct 18 '21 at 13:22
  • @Simon Okay I figured it out. See my updated answer – Raven Oct 18 '21 at 13:40
  • This works, thanks! I'll wait to see if someone says how to gray out also the pic before accepting your answer. – Simon Oct 18 '21 at 14:20