I'm trying to draw a graph in LaTeX with Tikz. Unfortunately, it is my first time using this package and I'm not too familiar with it. I've used the example from this website: http://www.texample.net/tikz/examples/state-machine/
But somehow, there are still some things I cannot figure out.
My problem is now:
SOLVED I want to remove the arrow going into the first node (A). I have removed the word "start", but I don't know what to do with the arrow itself.
SOLVED (Problem was solved by putting the label at either the start or the end of the arrow, otherwise there was an error.) I need two edges between (D) and (G). Somehow, there is always an error.
I am trying to put this "picture" into my main text, a continuous text. But, I can't put it into the text, with the text being above and below this picture. I've tried to add the Tikz picture with "figure" and "center", but the Tikz picture was always somewhere floating around.
My code:
\documentclass[12pt,a4paper,twoside]{article}
\usepackage{pgf}
\usepackage{tikz}
\usetikzlibrary{arrows,automata}
\usepackage[latin1]{inputenc}
\setlength{\voffset}{-28.4mm}
\setlength{\hoffset}{-1in}
\setlength{\topmargin}{20mm}
\setlength{\oddsidemargin}{25mm}
\setlength{\evensidemargin}{25mm}
\setlength{\textwidth}{160mm}
\setlength{\parindent}{0pt}
\setlength{\textheight}{235mm}
\setlength{\footskip}{20mm}
\setlength{\headsep}{50pt}
\setlength{\headheight}{0pt}
\begin{document}
\pagestyle{empty}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\begin{figure}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=4cm, semithick,initial text=,overlay,>=latex]
\tikzstyle{every state}=[fill=lightgray,draw=none,text=black]
\node[state](A) {$P_{000}$};
\node[state](B) [right of=A] {$P_{010}$};
\node[state](C) [above of=B] {$P_{001}$};
\node[state](D) [below of=B] {$P_{100}$};
\node[state](E) [right of=B] {$P_{101}$};
\node[state](F) [below of=E] {$P_{110}$};
\node[state](G) [above of=E] {$P_{011}$};
\node[state](H) [right of=E] {$P_{111}$};
\path (A) edge [bend angle = 10, bend left] node {$\beta_{A_2}a$} (C)
edge [bend angle = 10, bend left] node {$\beta_{H}h$} (B)
edge [bend angle = 10, bend left] node {$\beta_{A_1}a$} (D)
(B) edge [bend angle = -10, bend right] node {$\alpha_H$} (A)
edge [bend angle = 10, bend left] node[very near start] {$\beta_{A_2}a$} (G)
edge [bend angle = 10, bend left] node[very near start] {$\beta_{A_1}a$} (F)
(C) edge [bend angle = -10, bend right] node {$\alpha_{A_2}$} (A)
edge [bend angle = 10, bend left] node {$\beta_{A_1}a$} (G)
edge [bend angle = 10, bend left] node[very near end] {$\beta_{H}h$} (E)
(D) edge [bend angle = -10, bend right] node[near start] {$\alpha_{A_1}$} (A)
edge [bend angle = 10, bend left] node {$\beta_{H}h$} (F)
edge [bend angle = 10, bend left] node[very near end] {$\beta_{A_2}a$} (E)
(E) edge [bend angle = -10, bend right] node[very near start] {$\alpha_H$} (C)
edge [bend angle = -10, bend right] node[very near start] {$\alpha_{A_2}$} (D)
edge [bend angle = 10, bend left] node {$\beta_{A_1}a$} (H)
(F) edge [bend angle = -10, bend right] node {$\alpha_H$} (D)
edge [bend angle = -10, bend right] node[very near end] {$\alpha_{A_1}$} (B)
edge [bend angle = 10, bend left] node {$\beta_{A_2}a$} (H)
(G) edge [bend angle = -10, bend right] node {$\alpha_{A_1}$} (C)
edge [bend angle = 10, bend left] node {$\beta_{H}h$} (H)
edge [bend angle = -10, bend right] node[very near end] {$\alpha_{A_2}$} (B)
(H) edge [bend angle = -10, bend right] node {$\alpha_{H}$} (G)
edge [bend angle = -10, bend right] node{$\alpha_{A_1}$} (E)
edge [bend angle = -10, bend right] node{$\alpha_{A_2}$} (F)
;
\end{tikzpicture}
\end{figure}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\end{document}
The first screenshot is with \begin{figure} \end{figure}
and the second screenshot is with \begin{center} \end{center}
.
initial
from\node[initial,state] (A)
. The other request I don't understand.