2

This code

\documentclass{beamer}
\usepackage{graphicx}
\begin{document}
\begin{frame}
  The initial image\\
  \includegraphics[width=0.6\paperwidth]{example-image-a}
\end{frame}
\begin{frame}
  The same image\\
  after some changes have been made\\
  \includegraphics[width=0.6\paperwidth]{example-image-b}
\end{frame}
\end{document}

produces the output

enter image description here

I would like the image to sit in one place as the text changes on each slide. How to achieve it?

  • 1
    Look into overlayarea, chapter "9.5 Dynamically Changing Text or Images" of the beamer user guide. – user36296 Jan 28 '18 at 11:48
2

In the special case when both your images have the same dimensions, you can simply exchange them:

\documentclass{beamer}

\begin{document}

\begin{frame}
  \alt<1>{The initial image}{The same image}

  \visible<2->{after some changes have been made}

  \includegraphics<1>[width=0.6\paperwidth]{example-image-a}%
  \includegraphics<2->[width=0.6\paperwidth]{example-image-b}
\end{frame}
\end{document}

Off-topic:

  • you don't need to load graphicx with beamer, beamer already provides this functionality
  • better use an empty line to indicate a new paragraph

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.