1

I would like to draw an arrow on top of a beamer frame based on the frame coordinates x and y. The idea is to use it as a pointer during a presentation, so that it should overlay text, figures and math alike.

If that is possible the idea is to build a command like:

\newcommand<>{\Arrow}[2]{
  \only#3{
    \DrawArrow{#1}{#2}
  }
}

So that it could be used in a frame just by: \Arrow{x}{y}

enter image description here

I looked around but couldn't find anything that I could adapt in order to do that.

Thank you!


Here is the final code I used based on BambOo code:

\usetikzlibrary{shapes.arrows}

\tikzset{
  use page relative coordinates/.style={
    shift={(current page.south west)},
    x={(current page.south east)},
    y={(current page.north west)}
  },
}

\newcommand<>{\Pointer}[2]{
  \onslide#3{
    \begin{tikzpicture}[remember picture,overlay,use page relative coordinates]
      \node (x) at (#1,#2) {};
      \draw[stealth-] (x) %
      node[overlay,single arrow,draw=none,fill=red!70,anchor=tip,rotate=60,opacity=0.75]%
      {\hspace{0.5cm}~};
    \end{tikzpicture}
  }
}
pgaluzio
  • 13
  • 3

1 Answers1

3

You could use a variation of the nice use bounding box relative coordinates based on the current page anchors.

See tikz manual section 17.13.2

\documentclass{beamer}
\usepackage{tikz}

\tikzset{
    use page relative coordinates/.style={
        shift={(current page.south west)},
        x={(current page.south east)},
        y={(current page.north west)}
    },
}

\begin{document}

\begin{frame}{title}{subtitle}

    \includegraphics[width=0.5\textwidth]{example-image-a}
    \begin{tikzpicture}[remember picture,overlay,use page relative coordinates]
        \node (x) at (0.6,0.5) {x};
        \draw[stealth-] (x) --++ (-45:0.2) node[fill=white,draw,at end] {OOOOOh here is an X !};
    \end{tikzpicture}
\end{frame}

\end{document}

enter image description here

BambOo
  • 8,801
  • 2
  • 20
  • 47