Graphics, Figures & TablesUncovering images in Beamer

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
hendrick
Posts: 8
Joined: Mon Sep 07, 2009 3:58 pm

Uncovering images in Beamer

Post by hendrick »

In a Beamer presentation, I want to use the transparency effects of \uncover to keep some items onscreen but direct attention away from them. Unfortunately some of the items are images. The Beamer manual says "The transparency effect will automatically apply to all colors, except for the colors in images. For images there is a workaround; see the documentation of the PGF package." I tried searching that documentation, but I couldn't find the relevant pages.

To complicate matters, the graphics I'm using are the face card images in the "poker" package, which forms the card using pstricks. (So I compile using latex-dvips-ps2pdf.) The images themselves are stored as EPS images. Thus when I simply use the \uncover command to control the King of diamonds, when "covered" the letter K and the diamond symbol are transparent as desired, but the picture of the king is full-strength.

Does anyone know how I can make an eps image, used in pstricks, transparent (i.e. translucent) in Beamer? Thanks for any help you can give!

Anders Hendrickson
Concordia College
Moorhead, MN

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Uncovering images in Beamer

Post by gmedina »

Please provide a minimal working example allowing us to reproduce the problem mentioned.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
hendrick
Posts: 8
Joined: Mon Sep 07, 2009 3:58 pm

Uncovering images in Beamer

Post by hendrick »

Here's a MWE:

Code: Select all

\documentclass[xcolor=pst,dvips]{beamer}
\usepackage{poker}
\mode<presentation>{\usetheme{Singapore}\setbeamercovered{transparent}}
\usepackage[english]{babel}

\begin{document}

\begin{frame}
  \crdtwos\pause
  \crdfourd\pause
  \crdKh
\end{frame}

\end{document}
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Uncovering images in Beamer

Post by gmedina »

You could try using the opacity option from PGF/TikZ:

Code: Select all

\documentclass{beamer}
\usepackage{poker}
\mode<presentation>{\usetheme{Singapore}}
\usepackage[english]{babel}
\usepackage{tikz}

\begin{document}

\begin{frame}
  \begin{tikzpicture}
    \uncover<1->{\node[opacity=1] at (0,0) {\crdtwos};
                 \node[opacity=0] at (1.5,0) {\crdfourd};
                 \node[opacity=0] at (3,0) {\crdKh};}
    \uncover<2->{\node[opacity=1] at (1.5,0) {\crdfourd};}
    \uncover<3->{\node[opacity=1] at (3,0) {\crdKh};}
  \end{tikzpicture}
\end{frame}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
hendrick
Posts: 8
Joined: Mon Sep 07, 2009 3:58 pm

Re: Uncovering images in Beamer

Post by hendrick »

Thank you very much! I used your suggestion, along with the node options [outer sep=0pt,inner sep=0pt] to eliminate extra padding, and my beamer presentation looked great. Thanks again!
Post Reply