How to modify the following example to get a self loop labelled by "b" ENDING BY TWO ARROWS? The other self loop labelled by "a" should remains as it is.

\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,semithick]
  \node[initial,initial where=above,initial distance=4mm,accepting,state] (s) {s};
  (s)   edge     [loop right] node {$a$} (s)
        edge [->>,loop left] node {$b$} (s);

First, it's best to include a minimal working example, with all code in your preamble to help those that want to help you. Second, it seems (someone should correct me if I'm wrong here) that the stealth' arrow tip has been replaced by Stealth[round] in Tikz 3.0, so that's what I employed. Here is the code, for the whole document:




\begin{tikzpicture}[->,>={Stealth[round]},shorten >=1pt,auto,semithick]
  \node[initial,initial where=above,initial distance=4mm,accepting,state] (s) {s};
  (s)   edge [loop right] node {$a$} (s)
        edge [->,>={Stealth[flex,sep=-1pt,round] Stealth[round]},loop left] node {$b$} (s);


Here is the resulting picture:

enter image description here

Note that you can change the distance between the two tips by changing the sep=-1pt value to something smaller or bigger. Also, you can change flex to bend in the arrow tip option if you like how that looks better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.