I'm using tikz and pgf to draw state machines in a document, and I'd like to be able to have a multiline edge label between two nodes. Something like the following would be ideal:
\begin{center}
\begin{tikzpicture}[node distance=2.5cm,auto]
\node[state] (one) {$q_1$};
\node[state] (two) [right of=one] {$q_2$};
\path[->] (one) edge node {$line1 \\ line2$} (two);
\end{tikzpicture}
However, the typesetting of that fails with the message "There's no line here to end." (Adding additional mathmode markers before and after the line break changes the error message to the vaguer "Something's wrong--perhaps a missing \item.")
Is there a way to break the label in this graph into two lines?