2

I have a beamer frame where I am drawing "focus" boxes over an image, each being sequentially revealed. However, I'd like to have a list under the image where each item would appear with the corresponding "focus" box. How would I achieve that?

My current tex file:

(....)
\begin{tikzpicture}
   \node (schematic) {\includegraphics[width=\textwidth]{imgs/framework_schematic.png}};
   \pause
   \draw[orange,line width=1pt,rounded corners] (-5.5,-2.3) rectangle (-3.2,1.2);
   \pause
   \draw[orange,line width=1pt,rounded corners] (-2.6,-2.6) rectangle (0.2,2.0);
   \pause
   \draw[orange,line width=1pt,rounded corners] (0.8,-1.8) rectangle (3.6,0.9);
\end{tikzpicture}
\begin{itemize}
   \pause
   \item \textbf{Box 1}: description 1;
   \pause
   \item \textbf{Box 2}: description 2;
   \pause
   \item \textbf{Box 3}: description 3;
\end{itemize}
(....)

doesn't work, instead goes through the boxes and only then through the items on the list.

1 Answer 1

3

You could simply manually instruct the itemize items on which overlays they should appear:

\documentclass{beamer}


\usepackage{tikz}
\begin{document}

\begin{frame}
(....)
\begin{tikzpicture}
   \node (schematic) {\includegraphics[width=.3\textwidth]{example-image}};
   \pause
   \draw[orange,line width=1pt,rounded corners] (-5.5,-2.3) rectangle (-3.2,1.2);
   \pause
   \draw[orange,line width=1pt,rounded corners] (-2.6,-2.6) rectangle (0.2,2.0);
   \pause
   \draw[orange,line width=1pt,rounded corners] (0.8,-1.8) rectangle (3.6,0.9);
\end{tikzpicture}
\begin{itemize}
%   \pause
   \item<2-> \textbf{Box 1}: description 1;
%   \pause
   \item<3-> \textbf{Box 2}: description 2;
%   \pause
   \item<4-> \textbf{Box 3}: description 3;
\end{itemize}
(....)

\end{frame} 

\end{document}
4
  • That's it! Simpler than what I expected. On a related note, is there a way to remove each of the "focus" boxes after the next one is drawn?
    – joaocandre
    Oct 19, 2017 at 13:52
  • @joaocandre Sure! By not using the crude \pause command, but using overlay instruction, e.g. \draw<3>[orange,line width=1pt,rounded corners] (-2.6,-2.6) rectangle (0.2,2.0); Note: to keep the image in the same place, you'll either have to use absolute coordinates or add a bounding box. (in case the boxes are larger then your image) Oct 19, 2017 at 13:56
  • Thanks! That's enough as the image doesn't change position. Can <X> be added to any latex command?
    – joaocandre
    Oct 19, 2017 at 13:59
  • @joaocandre No, only some commands are "overlay aware". Oct 19, 2017 at 14:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .