TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to connect two tikz nodes with a line which should not overlap the other nodes. It additionally should branch below the node and run into the top again. I also want to label the edge/line.

I wrote this code:


    rounded corners, 
    draw=black, very thick,
    text width=14em, 
    minimum height=3em, 
    text centered, 
    on chain},
  line/.style={draw, thick, <-},
  every join/.style={->, thick,shorten >=1pt},
  [node distance=.6cm,
  start chain=going below,]
     \node[punktchain, join] (intro) {Introduction};
     \node[punktchain, join] (initRun)      {InitialRun};
     \node[punktchain, join] (nthRun)      {nTh Run};
     \node[punktchain, join] (conc) {Conclusion};
  \path[line] (nthRun.north east) -- ++(1,0) |- node{Iteration} (nthRun.south east);

This leads into the following result (left), what I want is on the right (red color not intended, just for clarification)

Current status Should status

How can this be done using tikz?

share|improve this question
Does the following work: Replace the line style with redline/.style={draw,ultra thick, red,->,>=latex} and replace the path with \draw[redline] (nthRun.south) |- ++(0,-.3) -| ($(nthRun.east) +(5mm,0)$) node[right]{Iteration}|- ($(nthRun.20) +(0,.3)$) -- (nthRun.20) ; ? – percusse Jan 2 '12 at 19:13
@percusse: Thanks for the solution, it works well for my given example, but if you add more text, so the nTh Run node gets higher, your code does not work. – theomega Jan 2 '12 at 20:02
up vote 11 down vote accepted
  [node distance=.6cm,
  start chain=going below,]
     \node[punktchain, join] (intro) {Introduction};
     \node[punktchain, join] (initRun)      {InitialRun};
     \node[punktchain, join] (nthRun)      {nTh Run};
     \node[punktchain, join] (conc) {Conclusion};
  \path (nthRun) -- (conc) coordinate[pos=.5] (dep) ;
  \path (nthRun.north) -- (nthRun.north east) coordinate[pos=.25] (stop) ;
  \draw [red,thick,->] (dep) -| ([xshift=1cm] nthRun.east) node[right]{Iteration} |- ([yshift=10pt]stop) -- (stop);

enter image description here

share|improve this answer
@@theomega it's possible to reduce the code but it's more readable like this. – Alain Matthes Jan 2 '12 at 19:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.