I would like to end a path at the midpoint of another path. My inclination has been to try and end the path at an offset equal to half the node distance from d.north
, but any thing I seem to try will not compile. Here's what I have so far (the end goal being the 'No' path ending at 'HERE' )
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,calc}
\begin{document}
\pagestyle{empty}
% Define block styles
\tikzstyle{box} = [rectangle, draw]
\tikzstyle{line} = [draw, -latex']
\begin{tikzpicture}[node distance = 3cm, auto]
% Place nodes
\node [box] (a) {A};
\node [box, below of=a] (b) {B};
\node [box, below of=b] (c) {C};
\node [box, below of=c] (d) {D};
% Draw edges
\path [line] (a) -- (b);
\path [line] (b) -- (c);
\path [line] (c) -- node [midway, left] {HERE} (d);
\path [line] (a.east) --node [above] {No} +(1,0) |- (d.north);
\end{tikzpicture}
\end{document}
I've seen some things on path decorations, but I'm really unsure how to use them and not sure that I can end the path on them.
Best Answer
Your code already contains a solution (without
calc
library):midway
!