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.

I'm creating a beamer presentation. I want to make one frame that has a couple of images overlapped, like a stack of photos. Actually, I want something like this:

.-----.
| AAA |
| AAA |
'-----'

Then, the next slide shows:

.-----.
| AAA |
| AA.-----.
'---| BBB |
    | BBB |
    '-----'

And then, the next one shows:

.-----.
| AAA |
| AA.-----.
'.-----.B |
 | CCC |B |
 | CCC |--'
 '-----'

The idea is to control the position of each image and allow them to overlap. I have no idea about how to do this in beamer.

I think the best solution is to have all images inside the same frame, but put a \pause command between them.

share|improve this question
add comment

3 Answers 3

up vote 10 down vote accepted

A TikZ example:

\documentclass{beamer}
\usepackage{tikz}   
\begin{document}

\begin{frame}
\begin{center}
\begin{tikzpicture}
  \node (img1) {\includegraphics[height=3cm]{img1}};
  \pause
  \node (img2) at (img1.south east) {\includegraphics[height=3cm]{img2}};
  \pause
  \node (img3) at (img2.south west) [yshift=1cm] {\includegraphics[height=3cm]{img3}};
\end{tikzpicture}
\end{center}
\end{frame}

\end{document}

enter image description here

The second and third images are placed on a corner of the previous image, the third also shifted a little upward, the reason being that with the images I used there was some whitespace between them. You could of course place the images at specific coordinates, and not relative to each other like here.

share|improve this answer
    
I'm trying this, but adding \pause inside tikzpicture will prevent beamer from adding the slide footer. Any idea about how to fix it? –  Denilson Sá Nov 15 '11 at 16:15
    
Two solutions: use \uncover or \onslide - tex.stackexchange.com/questions/9094/… - tex.stackexchange.com/questions/21512/… –  Denilson Sá Nov 15 '11 at 16:23
    
All answers here are great, but I'm marking this one as accepted because that's the one I've actually used. –  Denilson Sá Nov 15 '11 at 16:45
add comment

Can be done with the simple LaTeX command \put without any additional package

\PassOptionsToPackage{demo}{graphicx}
\documentclass{beamer}
\def\Put(#1,#2)#3{\leavevmode\makebox(0,0){\put(#1,#2){#3}}}
\begin{document}

\begin{frame}
\includegraphics[height=3cm]{img1}\pause

\Put(10,50){\color{blue}\includegraphics[height=3cm]{img2}}\pause

\Put(100,30){\color{red}\includegraphics[height=3cm]{img3}}
\end{frame}

\end{document}

enter image description here

share|improve this answer
1  
Those coordinates (10,50) and (100,30) are measured in what unit? –  Denilson Sá Nov 15 '11 at 15:10
1  
in pt, but if you prefer other units then you can set it by for example: \unitlength=1cm. The values are always measured from the current point. In my example from the beginning of the line –  Herbert Nov 15 '11 at 15:19
add comment

You can place all three images at absolute positions using the textpos package (see also Absolute positioning in beamer). A further method would be to use TikZ to place the three images in own coordinate system inside a tikzpicture. Both pacakges should work very well with beamer. The animation can be added using \pause or another overlay macro of beamer.

share|improve this answer
add comment

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.