1

I want to call attention to elements in different equations using arrows. The box with the information can be placed in different position, so I am using textblock from textpos. I am using tikz for the arrows with the positions of the arrows identified. However, the arrows do not go from the text in the text block to the term in the respective equation as expected, as shown below in the MWE. How can I place the arrows correctly?

\documentclass[t]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usetheme{Boadilla}
\usecolortheme{default}
\usepackage[absolute,overlay]{textpos}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{hyperref}

\begin{document}

\begin{frame}
    \frametitle{Two equations}
    \begin{itemize}
        \item This is the first equation
        \begin{equation*}
        a + \dfrac{a}{b} + \dfrac{b}{c} = 
        \tikz[baseline]{
            \node[anchor=base] (e1) {\fcolorbox{red}{white}{$\sqrt{\dfrac{b}{a+b+c}}$}};
        }
        \end{equation*}     
        \item This is the second equation
        \begin{equation*}
        a + \dfrac{a}{b} + \dfrac{b}{c} = 
        \tikz[baseline]{
            \node[anchor=base] (e2) {\fcolorbox{red}{white}{$\log\left({\dfrac{b}{a+b+c}}\right)$}};
        }
        \end{equation*}
    \end{itemize}

    \begin{textblock}{4}(12,3)%
        \begin{scriptsize}
        Term in 1st equation
        \tikz \node (b1) {};
        \end{scriptsize}%
    \end{textblock}

    \begin{textblock}{3.5}(4,12)%
        \begin{scriptsize}
        Term in 2nd equation
        \tikz \node (b2) {};
        \end{scriptsize}%
    \end{textblock}
    
\begin{tikzpicture}
    \draw [->] (b1) -- (e1);
    \draw [->] (b2) -- (e2);
\end{tikzpicture}
        
\end{frame}

\end{document}

Output

1 Answer 1

1

enter image description here

\documentclass[t]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usetheme{Boadilla}
\usecolortheme{default}
\usepackage[absolute,overlay]{textpos}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{hyperref}

\begin{document}

\begin{frame}
    \frametitle{Two equations}
    \begin{itemize}
        \item This is the first equation
        \begin{equation*}
        a + \dfrac{a}{b} + \dfrac{b}{c} = 
        \tikz[baseline, remember picture]{
            \node[anchor= base] (e1) {\fcolorbox{red}{white}{$\sqrt{\dfrac{b}{a+b+c}}$}};
        }
        \end{equation*}     
        \item This is the second equation
        \begin{equation*}
        a + \dfrac{a}{b} + \dfrac{b}{c} = 
        \tikz[baseline, remember picture]{
            \node[anchor=base] (e2) {\fcolorbox{red}{white}{$\log\left({\dfrac{b}{a+b+c}}\right)$}};
        }
        \end{equation*}
    \end{itemize}

    \begin{textblock}{4}(12,3)%
        \begin{scriptsize}
        \tikz[remember picture]{ \node (b1) {Term in 1st equation};}
        \end{scriptsize}%
    \end{textblock}

    \begin{textblock}{3.5}(4,12)%
        \begin{scriptsize}
        \tikz[remember picture]{ \node (b2) { Term in 2nd equation};}
        \end{scriptsize}%
    \end{textblock}
    
\begin{tikzpicture}[remember picture, overlay]
    \draw [->] (b1.south) -- (e1);
    \draw [->] (b2.east) -- (e2);
\end{tikzpicture}
        
\end{frame}

\end{document}
1
  • That is great! Thank you
    – Andre
    Jun 28, 2021 at 9:45

You must log in to answer this question.

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