I am planning to draw the following figures.
The arrows are drawn by hand, they should be rounded.
All I come up with the following MWE.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{fit,positioning,hobby}
\usetikzlibrary{decorations.text}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}
\node (one) at (0,0) {$68 \times 62$};
\node (two) at (5,0) {$6 \times 7$};
\node (three) at (7,0) {$8 \times 2$};
\draw [->,thick,postaction={decorate,decoration={raise=1ex,text along path,text align=center,text={|\footnotesize|{distance}{}}}}] (one) to [out=45,in=135] (two);
\draw [->,thick,postaction={decorate,decoration={raise=-1.5ex,text along path,text align=center,text={|\footnotesize|{text}{}}}}] (one) to [bend right=45] (three);
\end{tikzpicture}
\end{document}
I got stuck drawing arrow over arrow shown in the figure. How can I draw the figure. Can you suggest something?
Best Answer
You can use the
width=()
function of thecalc
library andinner xsep=0pt
to quite exactly position the arrows over or below the digits inside the left node. This is working because all the digits have the same width which is more or less 1ex.(More correct would, of course, be for example
[xshift={width("$68 \times 6$")-width("$6$")/2}.one north west]
, which means: shift to the right as far as$68 \times 6$
is wide minus half of the width of$6$
starting from the upper left corner of the nodeone
.)I simplified you code a bit and came up with this: