# tikz ´draw ... to ...´ combined with ´node´ along path

I have found a strange behavior in TikZ. When using the \draw ... to ... syntax and trying to place nodes along the line with the node[...]{...} syntax, the nodes do not turn up at the expected location.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw(0,0) to[out=60,in=120] (1,0) node[midway]{x};
\end{tikzpicture}
\end{document}


How is this done properly?

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

\begin{document}
\begin{tikzpicture}[auto]
\draw(0,0) to[out=60,in=120] node {x}  (1,0);
\end{tikzpicture}
\end{document}


Instead nodes you can use here quotes:

\documentclass[tikz, border=3mm]{standalone}
\usetikzlibrary{quotes}

\begin{document}
\begin{tikzpicture}
\draw(0,0) to [out=60,in=120, "x"] (1,0);
\end{tikzpicture}
\end{document}


Result is the same as before.

• Is there any way to avoid stating above and have the node directly on the arrow? Jul 19 '17 at 15:56
• Yes, for tikzpiczure use option auto. See edit of my answer. Jul 19 '17 at 15:57