0

I have a large image on a slide. I want to add 3 small images to this. All are given in jpeg. However, I want to pause the 3 small images that means first of all the audience only sees the background image, then I click and image 1 is added, next image 2 and then the last one. However, I need to have the added images positioned manually. So I want to overlay them, however I have to give the coordinates or somehow get them to the place where I want them to be (I already tried hspace and vspace with this solution and also with \pause, however it does not work).

My mwe example (figures needed):

\documentclass{beamer}
\usetheme{Goettingen}

\usepackage{appendixnumberbeamer}
\usepackage{tcolorbox}
\usepackage{german}
\usepackage{makecell}
\usepackage{mathtools} 
\usepackage{appendixnumberbeamer}
\pretocmd{\appendix}{\let\appendixorig\relax}{}{}
\usepackage{hyperref}

\renewcommand\theadalign{bc}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{\Gape[4pt]}
\renewcommand\cellgape{\Gape[4pt]}

\newcommand\Tstrut{\rule{0pt}{2.6ex}}

\setbeamertemplate{itemize/enumerate body begin}{\Large}
\setbeamertemplate{itemize/enumerate subbody begin}{\large}
\hypersetup{pdfpagemode=FullScreen}

\setbeamerfont{page number in head/foot}{size=\large}
\setbeamertemplate{footline}[frame number]

\tcbuselibrary{listings}
\newtcblisting{mygreencode}[1]{%
  boxsep=1pt,
  boxrule=2pt,
  arc=3mm, 
  auto outer arc,
  colframe=green!40!
  black,colback=green!5,
  listing options={language=C},
  listing only,
  #1
}


\newenvironment{specialframe}
{
    \begingroup
    \advance\textwidth2cm % see beamerthemeGoettingen.sty for the number
    \hsize\textwidth
    \columnwidth\textwidth
    \begin{frame}[plain]
}
{
    \end{frame}
    \endgroup
}


\makeatletter
\usepackage{xpatch}
\patchcmd\beamer@@tmpl@frametitle{sep=0.3cm}{sep=0.6cm}{}{}
\makeatother
\begin{document}


\frame{
\frametitle{Test}

\includegraphics[width=9cm]{Background}

\includegraphics[width=2cm]{Added1}
\includegraphics[width=2cm]{Added2}
\includegraphics[width=2cm]{Added3}

\end{document}

At the end it should look like this:

e1

But of course first of all only the large picture is shown. Then I click and the first blue box is added, then the other and so on (blue boxes are examples, I have jpeg files with certain figures). Slide counter should not change.

I tried for example something like this:

\includegraphics[width=9cm]{LargePicture}

\hspace{4cm}\vspace{-4cm}\only<2>{\includegraphics[width=2cm]{Added1}}
\hspace{-0.34em}\only<3>{\includegraphics[width=2cm]{Added2}}
\hspace{-0.17em}\only<4>{\includegraphics[width=2cm]{Added3}}

So I somehow need to manually place these in the right place. When I used vspace and hspace and tried it the problem also was that each time I modified one parameter to get one graphic in the right place this influenced the others. When I tried to build an environment around it with coordinates the pause function did not work anymore.

1 Answer 1

1

You code was not compiling correctly so I stripped it from what I believe what not necessary to provide the required output, but it should work all the same in your original code.

My proposal is based on Max's very nice answer to one of my previous questions, using TikZ.

Using the technique proposed, you can easily show an image then add some overlayed content (e.g. other images) using coordinates relative to the first picture. Overlay specifications can be provided to the TikZ code using the overlay-beamer-styles library.

\documentclass{beamer}
\usetheme{Goettingen}

% From https://tex.stackexchange.com/a/445311/141947
\usepackage{tikz}
\usetikzlibrary{overlay-beamer-styles}
\tikzset{
    use bounding box relative coordinates/.style={
        shift={(current bounding box.south west)},
        x={(current bounding box.south east)},
        y={(current bounding box.north west)}
    },
}

\begin{document}


\begin{frame}
  \frametitle{Test}


  \begin{tikzpicture}
    \node<1->[use as bounding box] {\includegraphics[width=9cm]{example-image-a}};
    \begin{scope}[use bounding box relative coordinates]
      \node<+-> at (0.25,0.25) {\includegraphics[width=2cm]{example-image-a}};
      \node<+-> at (0.5,0.75) {\includegraphics[width=2cm]{example-image-b}};
      \node<+-> at (0.75,0.25) {\includegraphics[width=2cm]{example-image-c}};
    \end{scope}
  \end{tikzpicture}
\end{frame}
\end{document}

enter image description here

3
  • Thanks! Almost perfect. However, the first additional picture, so in your case the first additional picture is the A (you use it as background and first additional one) is already on the screen. However, I want only the background picture to be on the screen visible. Then I click and a appears, then b, then c. How can I do this? (I tried to put the begin scope before the \node<1-> but I get an error.) May 21, 2020 at 20:22
  • So I have one background image and then 3 additional ones, A, B and C. And A should not appear immediately with the background picture. It should appear after the first click. May 21, 2020 at 20:37
  • 1
    @StatTistician just use <+-> also for the firs node
    – BambOo
    May 21, 2020 at 21:31

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.