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.

How can I draw arrows between an item in an itemize environment and spots on a picture using tikz?

MWE:

\documentclass{beamer}
%\usepackage{beamerthemeshadow}
\setbeamercovered{transparent}

\begin{document}
\section{section}
\begin{frame}
 \frametitle{frame title}

 \begin{columns}
 \column{.4\textwidth}
    \begin{block}{block title}
          \begin{itemize}
        \item <1-> stone
        \item <2-> more stones
        \item <3-> water
      \end{itemize}
    \end{block}
  \column{.6\textwidth}
      \begin{figure}[h]
    \includegraphics[width=\textwidth]{25}%
    \caption{Landscape}
      \end{figure}
  \end{columns}

\end{frame}
\end{document}

I want to achieve something like this:

enter image description here

enter image description here

enter image description here

share|improve this question
1  
Some inspiration are presented here: meta.tex.stackexchange.com/questions/1220/… –  Marco Daniel Dec 21 '11 at 9:43
    
    
Thanks for inspiration Marco. I found a solution at: texample.net/tikz/examples/connecting-text-and-graphics –  schmendrich Dec 21 '11 at 12:18
1  
@schmendrich: Please type up a descriptive solution from your inspired source and post it as an answer - future readers may find your example useful. Self-answers are perfectly admissible, and a well-written answer may earn you additional reputation. –  Werner Dec 22 '11 at 8:23
add comment

1 Answer 1

The solution I found:

\documentclass{beamer}
\usepackage{beamerthemeshadow}
\setbeamercovered{transparent}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,backgrounds}

\begin{document}
\tikzstyle{every picture}+=[remember picture]
\tikzstyle{na} = [baseline=-.5ex]
\section{section}
\begin{frame}
 \frametitle{frame title}

 \begin{columns}
   \begin{column}{.4\textwidth}
    \begin{block}{block title}<1-5>
          \begin{itemize}
        \item <1-| alert@2> stone\,\tikz[na] \coordinate (Lstone);
        \item <1-| alert@3> more stones\,\tikz[na] \coordinate (Lmorestones);
        \item <1-| alert@4> water\,\tikz[na] \coordinate (Lwater);
      \end{itemize}
    \end{block}
     \end{column}
    \begin{column}{.6\textwidth}
      %\begin{figure}[h]
    \begin{tikzpicture} 
            \node [inner sep=0pt,above right]{
    \includegraphics[width=\textwidth]{25}%
    };
    \path (1.45,1.1) coordinate (stone);
    \path (3.45,1.1) coordinate (morestone);
    \path (3.5,2.6) coordinate (water);
    \end{tikzpicture}
     % \end{figure}
     \end{column}
  \end{columns}

  \begin{tikzpicture}[overlay]
        \draw<2> [thin, red,opacity=.8, fill=red,fill opacity=0.3](stone) circle (4pt);
        \path<2>[->,>=latex', red, shorten >=4pt, opacity=.6] (Lstone) edge [out=0, in=130] (stone);

        \draw<3> [thin, red,opacity=.8, fill=red,fill opacity=0.3](morestone) circle (4pt);
        \path<3>[->, >=latex', red, shorten >=4pt, opacity=.6] (Lmorestones) edge [out=0, in=150] (morestone);

        \draw<4> [thin, red,opacity=.8, fill=red,fill opacity=0.3](water) circle (4pt);
        \path<4>[->,>=latex',red, shorten >=4pt, opacity=.6] (Lwater) edge [out=0, in=200] (water);

\end{tikzpicture}

\end{frame}
\end{document}

There are some issues i have to play with, to become more elegant: Setting nodes in relation to the picture; at the moment I will have to re-coordinate the nodes if I change the picture size. And I don't like the "shorten solution" for the arrows because i have to change the value manually if I change the diameter of the circle.

share|improve this answer
    
Take a look at tex.stackexchange.com/questions/9559/… for a way of having relative coordinates on the image. –  Torbjørn T. Dec 22 '11 at 20:59
    
Thanks. It seems, that the scope environment is what I was looking for. –  schmendrich Dec 22 '11 at 21:11
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.