TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

How can I change the orientation of the start arrow to come from the top instead of coming from the left as it is its default behavior. Can anyone advice using as base the TikZ State Machine example:


    \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm,
      \tikzstyle{every state}=[fill=red,draw=none,text=white]

      \node[initial,state] (A)                    {$q_a$};
      \node[state]         (B) [above right of=A] {$q_b$};
      \node[state]         (D) [below right of=A] {$q_d$};
      \node[state]         (C) [below right of=B] {$q_c$};
      \node[state]         (E) [below of=D]       {$q_e$};

      \path (A) edge              node {0,1,L} (B)
                edge              node {1,1,R} (C)
            (B) edge [loop above] node {1,1,L} (B)
                edge              node {0,1,L} (C)
            (C) edge              node {0,1,L} (D)
                edge [bend left]  node {1,0,R} (E)
            (D) edge [loop below] node {1,1,R} (D)
                edge              node {0,1,R} (A)
            (E) edge [bend left]  node {1,0,R} (A);

share|improve this question
Use initial above instead of initial. This is explained in section "24.3 Initial and Accepting States" of the manual. – Jake Aug 29 '12 at 16:05
that's the solution, please answer I will accept. – Giovanni Azua Aug 29 '12 at 16:10
up vote 9 down vote accepted

You can change the orientation of the initial state by using initial above (or initial below, initial left or initial right).

share|improve this answer

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.