15

I want to connect two "positions" of text with an upwards curved arrow. So far I have done this (trivially following the TikZ manual):

current state

\documentclass[a4paper,12pt]{book}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\begin{document}
How can I have from here \tikz[remember picture] \node[circle,fill=red!50] (n1) {}; a curved upwards arrow till here\tikz[remember picture] \node[fill=blue!50] (n2) {};?
\begin{tikzpicture}[remember picture,overlay]
\draw[->,very thick]  (n1) -- (n2);
\end{tikzpicture}
\end{document}

If by any chance you know how to add text above it, it would be nice.

28

Like this:

\documentclass[a4paper,12pt]{book}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\begin{document}
How can I have from here \tikz[remember picture] \node[circle,fill=red!50] (n1) {}; a curved upwards arrow till here\tikz[remember picture] \node[fill=blue!50] (n2) {};?
\begin{tikzpicture}[remember picture,overlay]
\draw[->,very thick]  (n1) to [out=45,in=135] (n2);
\end{tikzpicture}
\end{document}

enter image description here

And maybe a little bit like this:

\documentclass[a4paper,12pt]{book}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\begin{document}
How can I have from here \tikz[remember picture] \node[circle,fill=red!50] (n1) {}; a curved upwards arrow till here\tikz[remember picture] \node[fill=blue!50] (n2) {};?
\begin{tikzpicture}[remember picture,overlay]
\draw[->,very thick]  (n1) to [out=45,in=135] node[above] {some text here} (n2);
\end{tikzpicture}
\end{document}

enter image description here

And even fancier like this:

\documentclass[a4paper,12pt]{book}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,decorations.text}
\begin{document}
How can I have from here \tikz[remember picture] \node[circle,fill=red!50] (n1) {}; a curved upwards arrow till here\tikz[remember picture] \node[fill=blue!50] (n2) {};?
\begin{tikzpicture}[remember picture,overlay]
\def\myshift#1{\raisebox{1ex}}
\draw[->,very thick,postaction={decorate,decoration={text along path,text align=center,text={|\myshift|some bent text here}}}]  (n1) to [out=45,in=135] (n2);
\end{tikzpicture}
\end{document}

enter image description here

Last approach taken from this question here.

15

Another idea:

\documentclass[a4paper,12pt]{book}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\begin{document}
How can I have from here \tikz[remember picture] \node[circle,fill=red!50] (n1) {}; a curved upwards arrow till here \tikz[remember picture] \node[fill=blue!50] (n2) {};?
\begin{tikzpicture}[remember picture,overlay]
\draw[->,very thick]  (n1)  .. controls +(1,1) and +(-1,1) .. node[above] {text above}(n2);
\end{tikzpicture}
\end{document}

enter image description here

Use .. controls +(1,.5) and +(-1,.5) .. if you want it even flatter.

14

No bending but...

\documentclass[a4paper,12pt]{book}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,calc}
\begin{document}
How can I have from here \tikz[remember picture,baseline=-0.5ex] \node[circle,fill=red!50] (n1) {}; a curved upwards arrow till here \tikz[remember picture,baseline=-0.5ex] \node[fill=blue!50] (n2) {};?
\begin{tikzpicture}[remember picture,overlay]
\draw[->,very thick]  (n1) -- ++(0,2ex)coordinate (a) -- node[above]{some text here} ($(a-|n2)$) -- (n2);
\end{tikzpicture}
\end{document}

enter image description here

Add \footnotesize (or similar) to

node[above,font=\footnotesize]{some text here}

to get

enter image description here

  • 2
    I don't know... I spot two 90 degree bends. – LordStryker Nov 6 '14 at 12:58

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.