I would like to use a mark connection node
decoration on a line that also has an arrow tip. Unfortunately, using the decoration causes the arrow tip to point in the wrong direction (always straight up). For example:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}
\node (A) at (0, 0) {A} ;
\node (B) at (3, 0) {B} ;
\draw [->, decorate, decoration={
markings,
mark connection node=label,
mark=at position .5 with {
\node (label) {label};
},
}]
(A) -- (B)
;
\end{tikzpicture}
\end{document}
Notice the arrow tip, just to the left of node B, pointing up instead of to the right.
The Tikz documentation mentions that “the decoration usually destroys the path. However, this is no longer the case when the [mark connection node
] key is set.” If the path is not being destroyed, then why is the arrow tip oriented incorrectly? Is there any way to get arrow tips and mark connection node
to coexist on the same path?