1

This question already has an answer here:

I am struggling with the positioning of a node above a tikz path. The path is curved and connects two nodes with "to". Here is a MVE:

\documentclass[a4paper,twoside,11pt]{book}
\usepackage{tikz}
\begin{document} 
\begin{tikzpicture}[scale=1,transform shape]
\draw[->,thick,out=0,in=180] (1,0) to (5,1) node[above,pos=0.5,sloped] {text};
\draw[->,thick] (1,3) -- (5,4) node[above,pos=0.5,sloped] {text};
\end{tikzpicture}
\end{document}

The node is above the line in the case with "--" but not with the "to". What I am missing here? I am pretty sure I had something similar working in the past...

marked as duplicate by Torbjørn T. tikz-pgf May 23 '18 at 16:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.