6

This is my tikz code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,shapes.geometric,arrows,fit,calc,positioning,automata,}
\usepackage{amsmath}

\begin{document}

\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);


\end{tikzpicture}
\end{document}

And the output is :

enter image description here

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

percusse
  • 157,807
tikzlearner
  • 4,527

1 Answers1

11

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}}
Peter Grill
  • 223,288