I am trying to connect some nodes in tikz
but could not get some stuff right. Regarding the third path:
1-) How can I make it go to the left or from the top of "Third quantity" towards the center bottom of the specified term in the equation? Currently it is going up and arriving to the left.
2-) Is is possible to put "Second quantity" and "Third quantity" in the same line?
\documentclass{beamer} %
\usetheme{CambridgeUS}
\usepackage[latin1]{inputenc}
\usefonttheme{professionalfonts}
\usepackage{times}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{verbatim}
\usetikzlibrary{arrows,shapes}
\author{Author}
\title{Presentation title}
\begin{document}
\tikzstyle{every picture}+=[remember picture]
\everymath{\displaystyle}
\begin{frame}
\frametitle{Description}
\tikzstyle{na} = [baseline=-.5ex]
First quantity
\tikz[na] \node[coordinate] (n1) {};
\begin{equation*}
A = B +
\tikz[baseline]{
\node[fill=blue!20,anchor=base] (t1)
{$ 2C\times D$};
} +
\tikz[baseline]{
\node[fill=red!20, ellipse,anchor=base] (t2)
{$F\otimes G$};
} +
\tikz[baseline]{
\node[fill=green!20,anchor=base] (t3)
{$H$};
}
\end{equation*}
Second quantity
\tikz[na]\node [coordinate] (n2) {};
\begin{flushright}
\tikz[na]\node [coordinate] (n3) {};
Third quantity (check p.46)
\end{flushright}
\begin{tikzpicture}[overlay]
\path[->]<1-> (n1) edge [bend left] (t1);
\path[->]<1-> (n2) edge [bend right] (t2);
\path[->]<1-> (n3) edge [bend left](t3);
\end{tikzpicture}
\end{frame}
\end{document}
Best Answer
If I understand you correctly, for 1), use
out=90,in=270
instead ofbend left
for theedge
used to darw the line. For 2),remove theflushright
environment, and add an\hfill
between the node belonging toSecond..
andThird ..
.(I may have misunderstood what you meant about the first problem, please comment if you want something different.)
If you want the arrows to start in the middle of the words, there are a couple of options. One is to move the
\tikz\node...
between the words, as this is what defines the start point. In this case you may want to move it up a bit, so instead of using thena
style, add something likebaseline=-1.5ex
.The second option is to place the words themselves in a node, so instead of saying
Second quantity\tikz\node...
, use\tikz[na]\node(n2){Second quantity};
. You can then start the arrows inn2.south
(ornorth
). Both options are demonstrated in the code below.