Take the 2-minute tour ×
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.

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?

share|improve this question
add comment

1 Answer 1

up vote 9 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
add comment

Your Answer

 
discard

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.