TikZ figure using nodes and arrows

arrowsnodestikz-pgf

I am planning to draw the following figures.

enter image description here

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 the calc library and inner 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 node one.)

I simplified you code a bit and came up with this:

\documentclass[border=1mm, tikz]{standalone}

\usetikzlibrary{calc, shapes.misc}

\begin{document}

    \begin{tikzpicture}[digits/.style={inner xsep=0pt, inner ysep=2pt}]
    
    \node[digits] (one) at (0,0) {$68 \times 62$}; 
    \node[rounded rectangle, rounded rectangle right arc=none, draw] (two) at (3,0) {$6 \times 7$};
    \node[rounded rectangle, rounded rectangle left arc=none, draw] (three) at (4.25,0) {$8 \times 2$};

    \draw[thick] ([xshift={width("$6$")-1ex/2}]one.north west) to [bend left=45] node[above] (label above) {digits equal} ([xshift={width("$68 \times 6$")-1ex/2}]one.north west);

    \draw[thick] ([xshift={width("$68$")-1ex/2}]one.south west) to [bend right=45] node[below] (label below) {sum of digits $= 10$} ([xshift={width("$68 \times 62$")-1ex/2}]one.south west);

    \draw[->, thick, shorten >=2pt] (label above) to [bend left=45] node[above] {multiply} (two);
    
    \draw[->, thick, shorten >=2pt] (label below) to [bend right=45] node[below] {multiply} (three);
    
    \end{tikzpicture}
    
\end{document}

enter image description here