0

I have a slide that has some items and then underneath I have a figure, which is define as tikzpicture, while I want to point some arrows from items to the figure. The problem is that now both the figure and the items start from the center of the slide, and basically the figure is on top of the items. Any ideas how to solve this?

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning,tikzmark}

\begin{document}

\begin{frame}{Test}
\begin{itemize}
\item Item 1 \tikzmark{a}
\item Item 2 \tikzmark{b}
\item Item 3 \tikzmark{c}
\item Item 4
\end{itemize}
\centering
\begin{tikzpicture}[remember picture,overlay]
    \node {\includegraphics[width=0.8\textwidth]{my-picture}};
    \foreach \i/\j in {(0.5,0.66)/a} \draw [cyan,->] ({pic cs:\j}) -- \i;
\end{tikzpicture}
\end{frame}

\end{document}

The resulting layout should look like this sketch:

enter image description here

4
  • did you try the columns or tabular environment? Jan 7, 2017 at 12:25
  • 1
    You may insert at (...,...) after \node indicating some appropiate coordinates in order to shift the picture.
    – CarLaTeX
    Jan 7, 2017 at 12:25
  • Can you draw a sketch how your slide should look like? Jan 7, 2017 at 12:30
  • Are you looking for \begin{frame}[t]{Test}? Jan 7, 2017 at 12:36

3 Answers 3

1
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning,tikzmark}

\begin{document}

\begin{frame}[t]{Test}
\begin{itemize}
\item Item 1 \tikzmark{a}
\item Item 2 \tikzmark{b}
\item Item 3 \tikzmark{c}
\item Item 4
\end{itemize}

\centering
\begin{tikzpicture}[remember picture,overlay, yshift=-2cm]
    \node {\includegraphics[width=0.5\textwidth]{example-image}};
    \foreach \i/\j in {(0.5,0.66)/a} \draw [cyan,->] ({pic cs:\j}) -- \i;
\end{tikzpicture}
\end{frame}

\end{document}

enter image description here

1

Using tabular environment will solve this:

\documentclass{beamer}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{positioning,tikzmark}

\begin{document}

\begin{frame}{Test - column}
    \begin{columns}[t]
        \begin{column}{.4\textwidth}
            \begin{itemize}
                \item Item 1 \tikzmark{a}
                \item Item 2 \tikzmark{b}
                \item Item 3 \tikzmark{c}
                \item Item 4
            \end{itemize}

        \end{column}
        \begin{column}{.6\textwidth}
            \centering
            \begin{tikzpicture}[remember picture,overlay]
            \node {\includegraphics[width=0.8\textwidth]{example-image}};
            \foreach \i/\j in {(0.5,0.66)/a} \draw [cyan,->] ({pic cs:\j}) -- \i;
            \end{tikzpicture}
        \end{column}
    \end{columns}
\end{frame}

\begin{frame}{Test - tabular}
    \begin{tabular}{lc}
        \parbox{.4\textwidth}{
            \begin{itemize}
                \item Item 1 \tikzmark{a}
                \item Item 2 \tikzmark{b}
                \item Item 3 \tikzmark{c}
                \item Item 4
            \end{itemize}

        }
        \parbox{.6\textwidth}{
            \centering
            \begin{tikzpicture}[remember picture,overlay]
            \node {\includegraphics[width=0.8\textwidth]{example-image}};
            \foreach \i/\j in {(0.5,0.66)/a} \draw [cyan,->] ({pic cs:\j}) -- \i;
            \end{tikzpicture}
        }
    \end{tabular}
\end{frame}
\end{document}

enter image description here

1
  • This won't work for me, cause items are long sentences, I need the image to be below the items.
    – typos
    Jan 7, 2017 at 12:40
0

Solved the problem by using [t] and at(...,...).

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning,tikzmark}

\begin{document}

\begin{frame}[t]{Test}
\begin{itemize}
\item Item 1 \tikzmark{a}
\item Item 2 \tikzmark{b}
\item Item 3 \tikzmark{c}
\item Item 4
\end{itemize}
\centering
\begin{tikzpicture}[remember picture,overlay]
    \node at(1.5,-2) {\includegraphics[width=0.8\textwidth]{my-picture}};
    \foreach \i/\j in {(0.5,0.66)/a} \draw [cyan,->] ({pic cs:\j}) -- \i;
\end{tikzpicture}
\end{frame}

\end{document}

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