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.

I followed an example from TikZ manual, and modify mine to add an extra node with text below a given node. This is the example from TiKZ manual, enter image description here

And here is the code, enter image description here

So I modified my code to fit the example above,

\documentclass[10pt,letterpaper]{article}
\usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry} 
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\def\xcolorversion{2.00}
\def\xkeyvalversion{1.8}

\usepackage{enumerate}
\usepackage[version=0.96]{pgf}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,automata,backgrounds,petri,positioning}
\title{\textbf{Solution for Chapter 1}}

\begin{document}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex}
\maketitle

\begin{description}
    \item[1.1] The following are the state diagrams for two DFAs, $M_1$, and $M_2$. Answer the following question 
    about each of these machines.\\

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

    \path[->]
    (q_1) edge  [bend left]     node {a}            (q_2)
    (q_1) edge  [loop above]    node {b}            (q_1)
    (q_2) edge  [bend left]     node {a,b}          (q_3)
    (q_3) edge  [bend left]     node {a}            (q_2)
    (q_3) edge  [bend left]     node {b}            (q_1)

    \node [below=4cm, text width=4cm] at (q_3)
    {
        something
    }   
    ;
    \end{tikzpicture}\\\

\end{description}
\end{document}

But the pdflatex compiler run forever, it's just freezed completely. I don't know where did I miss? It seemed logically correct. Any idea or suggestion? Thank you.

share|improve this question

closed as too localized by Caramdir, Martin Scharrer Jul 24 '11 at 21:33

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I figured it out. An annoying ; after \path cost me a lot of times :(. –  Chan Jul 24 '11 at 21:02

Browse other questions tagged or ask your own question.