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.

In my beamer presentation I would like to reference an item by pointing an arrow on it's number. However, I don't know how to make \item a TikZ node. Otherwise it works well.

enter image description here

\documentclass{beamer}

\usetheme{Copenhagen}

\usepackage{mathtools}
\usepackage{tikz}
\tikzstyle{every picture}+=[remember picture]

\setbeamertemplate{enumerate items}[square]

\begin{document}

\begin{frame}\frametitle{Title}

\begin{definition}
Let $z\in X^A(\gamma)$.
Then $a_{N-1}\dotsm a_0$ is nice if
\begin{enumerate}
\item $a_{N-1}\neq0$;

\item
\tikz[baseline]\node[anchor=base](t2){};
$z=a_{N-1}\gamma^{N-1}+\dots+a_1\gamma+a_0$;

\item whenever $b_{N-1}\dotsm b_0$ satistfies
\tikz\node[fill=blue,circle](t1){};
, then $b_{N-2}\neq0$.
\end{enumerate}
\end{definition}

\begin{tikzpicture}[overlay]
\path[blue,thick,->] (t1) edge [out=160 , in=340] (t2);
\end{tikzpicture}

\end{frame}

\end{document}
share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

Here is a solution using optional argument of \item:

\item[{\refstepcounter{enumi}%
    \usebeamertemplate{enumerate item}%
    \tikz[baseline]\coordinate(t2);}]%

enter image description here

\documentclass{beamer}

\usetheme{Copenhagen}

\usepackage{mathtools}
\usepackage{tikz}
\tikzstyle{every picture}+=[remember picture]

\setbeamertemplate{enumerate items}[square]

\begin{document}

\begin{frame}\frametitle{Title}

\begin{definition}
Let $z\in X^A(\gamma)$.
Then $a_{N-1}\dotsm a_0$ is nice if
\begin{enumerate}
\item $a_{N-1}\neq0$;

\item[{\refstepcounter{enumi}\usebeamertemplate{enumerate item}\tikz[baseline]\coordinate(t2);}]%
$z=a_{N-1}\gamma^{N-1}+\dots+a_1\gamma+a_0$;

\item whenever $b_{N-1}\dotsm b_0$ satistfies
\tikz\node[fill=blue,circle](t1){};
, then $b_{N-2}\neq0$.
\end{enumerate}
\end{definition}

\begin{tikzpicture}[overlay]
\path[blue,thick,->] (t1) edge [out=160 , in=340] (t2);
\end{tikzpicture}

\end{frame}

\end{document}
share|improve this answer
add comment

Similar to Paul Gaborit's answer by modifying the beamer template for the enumi level. The new template is square tikzmark. Also for testing purposes I've placed the remember picture option manually. And every item can be accessed via the node name

(enummark<item number>)

Here is the code...

\documentclass{beamer}
\usetheme{Copenhagen}
\usepackage{mathtools,lmodern}
\usepackage{tikz}


\defbeamertemplate{enumerate item}{square tikzmark}
{
\usebeamerfont*{item projected}%
\usebeamercolor[bg]{item projected}%
\tikz[remember picture,baseline]{
    \node[fill,
              anchor=base,
                    inner sep=0,
                    text width=2.25ex,
                    text height=1.85ex,
                    text depth=.4ex,
                    align=center]
                    (enummark\insertenumlabel) %Node name
                    {\color{fg}\insertenumlabel}; %Node content
        }
}%
[action]
{\setbeamerfont{item projected}{size=\scriptsize}}

\setbeamertemplate{enumerate items}[square tikzmark]


\begin{document}

\begin{frame}\frametitle{Title}

\begin{definition}
Let $z\in X^A(\gamma)$.
Then $a_{N-1}\dotsm a_0$ is nice if
\begin{enumerate}

\item $a_{N-1}\neq0$;

\item $z=a_{N-1}\gamma^{N-1}+\dots+a_1\gamma+a_0$;

\item whenever $b_{N-1}\dotsm b_0$ satistfies \tikz[remember picture]\node[fill=blue,circle](t1){};, then $b_{N-2}\neq0$.
\end{enumerate}
\end{definition}

\begin{tikzpicture}[overlay,remember picture]
\path[blue,thick,->] (t1) edge [out=160 , in=340] (enummark1);
\path[blue,thick,->] (t1) edge [out=160 , in=340] (enummark2);
\path[blue,thick,->] (t1) edge [out=160 , in=340] (enummark3);
\end{tikzpicture}

\end{frame}

\end{document}

enter image description here

share|improve this answer
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.