# Arc between arrows in TikZ (automata library)

Here's what I have for now:

\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3.5cm,
semithick, bend angle=35]
\tikzstyle{every state}=[fill=none,draw=black,text=black,shape=circle]

\node[state]               (s0) {$s_0$};
\node[state]               (s1) [above left of =s0]   {$s_1$};
\node[state]               (s2) [below left of =s0]   {$s_2$};

\path (s0)  edge [bend left] node {$a$} (s1)
(s0)  edge [bend right] node {$b$} (s2);

\end{tikzpicture}

I would like to know if it is possible to add an arc between two arrows:

Any help will be appreciated, thanks!

-

One solution is to use intersections library:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{automata}
\usetikzlibrary{arrows}
\usetikzlibrary{intersections}
\begin{document}

\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,
node distance=3.5cm,semithick, bend angle=35]
\tikzstyle{every state}=[fill=none,draw=black,text=black,shape=circle]

\node[state] (s0) {$s_0$};
\node[state] (s1) [above left of =s0] {$s_1$};
\node[state] (s2) [below left of =s0] {$s_2$};

\draw[name path=e1] (s0) to [bend left] node {$a$} (s1);
\draw[name path=e2] (s0) to [bend right] node {$b$} (s2);

\path[name path=c] (s0) circle (1);
\draw[name intersections={of=e1 and c, by=i1},
name intersections={of=e2 and c, by=i2},
-,shorten >=0pt]
(i1) to[bend right] (i2); % well, it isn't an arc
\end{tikzpicture}

\end{document}

-
Wow thanks! This works indeed! –  pp35377 Aug 10 '11 at 16:05

You can also create nodes along the bend edges by using the pos option. So modifying the code

\begin{tikzpicture}[->,>=stealth,shorten >=1pt,auto,node distance=3.5cm,semithick, bend angle=35]
\tikzstyle{every state}=[fill=none,draw=black,text=black,shape=circle]

\node[state]               (s0) {$s_0$};
\node[state]               (s1) [above left of =s0]   {$s_1$};
\node[state]               (s2) [below left of =s0]   {$s_2$};

\path (s0)  edge [bend left]   node[inner sep=0mm,pos=0.2] (a1) {} node {$a$} (s1);
\path (s0)  edge [bend right]  node[inner sep=0mm,pos=0.2] (b1) {} node {$b$} (s2);
\path[-,shorten <=-1.5pt,shorten >=0mm] (a1) edge [bend right]  (b1) ;
\end{tikzpicture}

leads to a similar result by connecting the additional a1 and b1 nodes.