2

This is a MWE of my code:

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\mode<presentation> {
\usetheme{Frankfurt}
\usecolortheme{dolphin}
}

\begin{document}

\begin{frame}

\begin{columns}[c]

\column{.7\textwidth}
\only<1>{
  \begin{tikzpicture}
    \node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=0.9\textwidth]{fig.png}};
  \end{tikzpicture}
}
\only<2>{
  \begin{tikzpicture}
    \node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=0.9\textwidth]{fig.png}};
    \draw[green,thick,rounded corners] (4.8,5.2) ellipse (0.28 and 1.5);
    \draw[->, line width=2pt, -triangle 60] (6.3,5.2) -- (5.2,5.2);
  \end{tikzpicture}
}
\only<3>{
  \begin{tikzpicture}
    \node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=0.9\textwidth]{fig.png}};
    \draw[green,thick,rounded corners] (5.8,3) ellipse (0.28 and 1.5);
    \draw[->, line width=2pt, -triangle 60] (7.1,3) -- (6.1,3);
  \end{tikzpicture}
}

\column{.35\textwidth}
\vspace{-1.cm}
\setbeamercolor{normal text}{fg=gray,bg=}
\setbeamercolor{alerted text}{fg=black,bg=}
\usebeamercolor{normal text}
\begin{itemize}
\item \alert<+>{Some text goes here sdsdf sdfsdfsdfsdf.}\\[4ex]
\item \alert<+>{Some more text here sdfdsf.}\\[4ex]
\item \alert<+>{And some text here.}
\end{itemize}

\end{columns}

\end{frame}

\end{document}

This creates three slides with the same image:

enter image description here enter image description here enter image description here

It might not be noticeable when seen separate but the grey square does not maintain a fixed position within the slides. How do I get it to stop moving around?

Here's the grey square I use: enter image description here

3

As pointed out by Claudio, you should use \visible instead of \only if you don't want things to move around from one slide to the next:

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\mode<presentation> {
\usetheme{Frankfurt}
\usecolortheme{dolphin}
}


\begin{document}

\begin{frame}

\begin{columns}[c]

\column{.7\textwidth}
  \begin{tikzpicture}
    \node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=0.9\textwidth]{fig.png}};
    \visible<2>{
        \draw[green,thick,rounded corners] (4.8,5.2) ellipse (0.28 and 1.5);
        \draw[->, line width=2pt, -triangle 60] (6.3,5.2) -- (5.2,5.2);
    }
    \visible<3>{
        \draw[green,thick,rounded corners] (5.8,3) ellipse (0.28 and 1.5);
        \draw[->, line width=2pt, -triangle 60] (7.1,3) -- (6.1,3);
    }
  \end{tikzpicture}


\column{.35\textwidth}
\vspace{-1.cm}
\setbeamercolor{normal text}{fg=gray,bg=}
\setbeamercolor{alerted text}{fg=black,bg=}
\usebeamercolor{normal text}
\begin{itemize}
\item \alert<+>{Some text goes here sdsdf sdfsdfsdfsdf.}\\[4ex]
\item \alert<+>{Some more text here sdfdsf.}\\[4ex]
\item \alert<+>{And some text here.}
\end{itemize}

\end{columns}

\end{frame}

\end{document}

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.