11

I am trying to label two curved paths connecting two nodes with labels placed at their centres using the node[midway] option. This is something that should be very simple but I have not been able to come up with something that works. Here is my MWE with my question as two comments:

\documentclass[crop,border=0]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[>=latex]
    \node [draw,rectangle] (Start) {Start};
    \node [draw,rectangle] (Finish) [right=2cm] {Finish};
    \draw [->,out=90,in=90,looseness=0.75] (Start.north) to (Finish.north);
    % I want to label this path using [midway,below] as {forward}
    \draw [->,out=-90,in=-90,looseness=0.75] (Finish.south) to (Start.south);
    % I want to label this path using [midway,above] as {reverse}
\end{tikzpicture}
\end{document}

Can someone please point me in the right direction.

I also appreciate comments to improve code elegance or simplicity.

Thank you.

percusse
  • 157,807
chandra
  • 3,084

1 Answers1

19

You must put the node direct after to

\documentclass[crop,border=0]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture} [>=latex]
    \node [draw,rectangle] (Start) {Start};
    \node [draw,rectangle] (Finish) [right=2cm] {Finish};
    \draw [->,out=90,in=90,looseness=0.75] (Start.north) to node[above]{above}  (Finish.north);
    \draw [->,out=-90,in=-90,looseness=0.75] (Finish.south) to node[below]{below} (Start.south)
      ;
\end{tikzpicture}
\end{document

enter image description here

percusse
  • 157,807
Marco Daniel
  • 95,681