I've started using LaTeX recently, and I'm trying to draw a few partial NFAs for an article; I have little to no experience with TikZ, so forgive me for asking something that is probably trivial.
I'm trying to draw images like these:
(Those came from here.)
So far I could position the nodes:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\pagestyle{empty}
Partial NFA example:
\begin{tikzpicture}[shorten >=1pt,->]
\tikzstyle{state}=[circle,draw=black,thick]
\tikzstyle{block}=[rectangle,draw=black,thick,minimum width=25pt]
\node[state] (s) at (1,1) { };
\node[block] (e) at (5,2) {\texttt{e}};
\node[] (x) at (4,0) { };
\draw (0,0) -- (s); % Start
\draw (s) edge[bend left=30] (e);
\draw (e) edge[bend left=30] (s);
\draw (s) edge[bend right=30] (x);
\end{tikzpicture}
\end{document}
But I couldn't get even close to what I want. I have no idea how to make the arrows properly.
Could anyone give me some help?
automata
library with TikZ? It already includes a style that, for example, draws an arrow pointing into a start node. You will still be able to customize the node styles further to use rectangles, etc., but I would start there.