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

When there are two nodes pointing to the same node, the picture looks odd because they point to the same location. How can I change the location of pointing?

For instance,




    \begin{tikzpicture}[shorten >=1pt,node distance=3cm,on grid,auto] 
        \node[state,initial,accepting]      (q_0)                           {$q_0$};
        \node[state,accepting]              (q_1)   [right=of q_0]          {$q_1$};
        \node[state]                        (q_2)   [right=of q_1]          {$q_2$};    
        \node[state,accepting]              (q_3)   [right=of q_2]          {$q_3$}; 
        \node[state]                        (q_4)   [above right=of q_3]    {$q_4$};    
        \node[state,accepting]              (q_5)   [below right=of q_3]    {$q_5$};        

        (q_0)   edge    [bend right]        node {0}            (q_1)
        (q_0)   edge    [bend right]        node {1}            (q_3)

        (q_1)   edge    [above,bend right]  node {0}            (q_0)
        (q_1)   edge    [above,bend right]  node {0}            (q_3)

        (q_2)   edge                        node {0}            (q_1)
        (q_2)   edge    [above,bend left]   node {0}            (q_4)

        (q_3)   edge                        node {0,1}          (q_5)

        (q_4)   edge                        node {0,1}          (q_3)
        (q_5)   edge    [loop below]        node {0,1}          (q_1)

        ; %end path 

Output of code

What I want to achieve is one arrow to point to below the circle and the other point to somewhere else.

share|improve this question
up vote 5 down vote accepted

You can fix output and input angle with in and out options

(q_0) edge [bend right, out=-60, in=240] node {1} (q_3)
share|improve this answer
Thanks a lot ;). I felt in love with LaTex now. – Chan Jun 17 '11 at 10: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.