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

This is my tikz code:



\begin{tikzpicture}[shorten >=1pt,auto,node distance=5 cm, scale = 0.5, transform shape]

  \node[initial,state] (A)                                  {$q_0$};
  \node[state]         (B) [right of=A,node distance=3 cm]              {$q_1$};
  \node[state]         (C) [right of=B,node distance = 6.5 cm]              {$q_2$};
  \node[state]         (D) [below right of=B]       {$q_3$};
  \node[state]         (E) [below right of=D]                   {$q_5$};
  \node[state]         (F) [below left of=D]                {$q_4$};

  \path[->] (A) edge [above]            node [align=center]             {a} (B)
        (B) edge [loop above]       node [align=center]             {a} (B)
        edge [bend right,below]     node [align=center]         {b} (C)
        edge [left]             node [align=center]         {a} (D)
        (C) edge [loop above]       node [align=center]         {b} (C)
        edge [bend right,right]     node [above,align=center]       {a} (B)
        edge [right]            node [align=center]             {a} (D)
        (D) edge [bend left,right]      node [align=center]         {d} (E)
        edge [bend right,left]      node [pos=0.4,align=center]     {a} (F)
        (E) edge [bend left]        node [pos=0.2,align=center]     {c} (D)
        (F) edge [bend right,above]     node [pos=0.6,align=center]     {b} (D)
        edge [bend left]        node [pos=0.7,align=center]     {a} (A);


And the output is :

enter image description here

I want to increase the size of the font over edges. How do I do that?

share|improve this question
up vote 10 down vote accepted

You can use the option font=\Large, for instance, to increase the size. If you apply this to the tikzpicture options than all text will be made to be of \Large size. If you only want it to apply to the edges then you add this option o the edge, either manually on a per edge basis, of with:

\tikzset{every edge/.append style={font=\Large}}
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.