2

With \setbeamercovered{transparent} covered parts of a slide are displayed transparently. If there is a (small) picture among the text, it is shown as it is. Beamer has only this picture, so it shows this picture. My question: How can I give a gray version of the picture to beamer such that in covered parts of a slide, this gray version is used?

ewi
  • 43
  • http://tex.stackexchange.com/a/300332/36296 – samcarter_is_at_topanswers.xyz Apr 22 '16 at 15:43
  • Thank you, I did not find that! It solves the problem for the moment. But I would like to 'teach' beamer a second (gray) version of my picture such that it uses this gray version whenever this picture is covered. – ewi Apr 23 '16 at 10:02
  • Do you have a gray version of you image? Than you can use overlays, e.g. \includegraphics<1>{grayfilename} and \includegraphics<2>{normalfilename} – samcarter_is_at_topanswers.xyz Apr 23 '16 at 10:06
  • Yes, I can make a gray version of it. But since I use it for the end of a proof it appears many times on my slides. So I am looking for a possibility to define the gray and the black version once and for all and make beamer use the right one, as it does with the fonts and the item bullets. There are also some graphics which appear only on one slide but even for them I would like to have a solution that needs no update if I change the pauses. – ewi Apr 23 '16 at 10:45

1 Answers1

3

Overlays are the easiest way to replace an image. But you will have to find the right luminosity values yourself, when producing the gray scale version of your image.

\documentclass{beamer}
\usetheme{Warsaw}
\setbeamercovered{transparent}
\setbeamertemplate{navigation symbols}{}
\usepackage{beamerthemeshadow}
\usepackage{tikz}

\begin{document}

    \begin{frame}
        \begin{block}{Theorem}
            Theorem Text Here
        \end{block}

        \vfill \pause 

        \begin{example} 
            \centering
            \includegraphics<-.>[height=0.4\textwidth]{example-image}
            \includegraphics<.(1)->[height=0.4\textwidth]{example-grid-100x100bp}
        \end{example}

        \vfill \pause

        \begin{block}{Corollary}
            Corollary text here
        \end{block}        

    \end{frame}

\end{document}

enter image description here


EDIT

And as not asked in the question, this works exactly the same for q.e.d. symbols

\documentclass{beamer}
\usetheme{Warsaw}
\setbeamercovered{transparent}
\setbeamertemplate{navigation symbols}{}
\usepackage{beamerthemeshadow}
\usepackage{tikz}

\setbeamertemplate{qed symbol}{%
    \includegraphics<-.>[width=0.5cm,height=0.5cm]{example-image}
    \includegraphics<.(1)->[width=0.5cm,height=0.5cm]{example-grid-100x100bp}
}

\begin{document}

    \begin{frame}

        \begin{proof}
            \begin{itemize}
                \item First item.
                \item Second item.
                \item Third item.
            \end{itemize}
        \end{proof}     
        \vfill \pause 

        \begin{proof}
            \begin{itemize}
                \item First item.
                \pause
                \item Second item.
                \pause
            \end{itemize}
        \end{proof}

        \vfill \pause

        \begin{block}{Corollary}
            Corollary text here
        \end{block}        

    \end{frame}

\end{document}

enter image description here

  • This is what you already suggested. But imagine the following situation:An environment proof ends with a small picture (which is part of its definition) which should be gray if the proof is not yet finished. Some proofs are displayed without overlays and then the image should be displayed in black. – ewi Apr 23 '16 at 14:14
  • If you use the handout option in the beamer class, like \documentclass[compress, handout]{beamer}, the first image (the one supposed to be hidden) is used, and not the second. How can I fix that? – robertspierre Dec 18 '17 at 17:42
  • @raffamaiden can you please ask a new question? – samcarter_is_at_topanswers.xyz Dec 18 '17 at 17:55