2

I am working for homework for my students but I don't know how to make the following curved arrows. Any help is appreciate!

enter image description here

I usually work with the following instructions:

\newcommand\source[1]{%
    \tikz[remember picture,baseline,inner sep=0pt] {%
        \node [name=source,anchor=base]{$#1$};
    }%
    \setcounter{target}{0}
}
\newcounter{target}
\newcommand\target[1]{%
    \tikz[remember picture,baseline,inner sep=0pt] {%
        \node [name=target-\thetarget,anchor=base]{$#1$};
    }%
    \stepcounter{target}%
}
\newcommand\drawarrows{
    \tikz[remember picture, overlay, bend left=45, -latex] {
        \foreach \i [evaluate=\i as \n using int(\i-1)] in {1,...,\thetarget} {
            \draw (source.north) to (target-\n.north);
        }
    }
}

But I don't know how to change the direction and position to get the image shown.

1

Instead of your definitions I would rather try to use tikzmark TikZ library:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}

\begin{document}
    \[
\frac{x+1}{\tikzmarknode{A}{2}} + \frac{x+1}{\tikzmarknode{B}{3}} \times \tikzmarknode{C}{6}
%
\begin{tikzpicture}[overlay, remember picture,
                    shorten <=1pt, shorten >=1pt, looseness=1.2, 
                    >=latex]
\draw[->] (C.south) to [out=240, in=315] (A.south);
\draw[->] (C.south) to [out=240, in=315] (B.south);
\end{tikzpicture}
\vspace{3ex}
    \]
\end{document}

After two compilation the result is:

enter image description here

Addedndum: Arrows heds can be improved by us of packages arrows.meta and bending. About them see TikZ & PGF manual, subsection 16.3.8 Bending and Flexing, page 202:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,    % new
                bending,        % new
                tikzmark}
\usepackage{lipsum}

\begin{document}
    \[
\frac{x+1}{\tikzmarknode{A}{2}} + \frac{x+1}{\tikzmarknode{B}{3}} \times \tikzmarknode{C}{6}
%
\begin{tikzpicture}[overlay, remember picture,
                    shorten <=1pt, shorten >=1pt, looseness=1.1,
                    >={Stealth[bend]}  % changed
                    ]
\draw[->] (C.south) to [out=255, in=315] (A.south);
\draw[->] (C.south) to [out=255, in=315] (B.south);
\end{tikzpicture}
\vspace{3ex} % space needed for tikzpicture
    \]
\lipsum[1]
\end{document}

enter image description here

0

Another solution with pstricks:

\documentclass{article}
\usepackage{pst-node}

\begin{document}

    \[ \frac{x+1}{\pnode[0.5ex, 0]{2}2} + \frac{x+1}{\pnode[0.5ex, 0]{3}3} \times \pnode[1.2ex, 0]{6}{6}    %
\psset{linewidth=0.5pt, arrows=->, arrowinset=0.12, angleA =-120, nodesep=1.5pt}
\nccurve[angleB=-65]{6}{2} \nccurve[angleB=-60]{6}{3}
    \]

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.