0

I wish to replace straight line with the \leadsto line. I tried \draw[leadsto] (s2)--(s3); however it can not work.

Below is my code

\documentclass[tikz]{standalone}
\usepackage{tikz}
\begin{document}
\tikzset{bag/.style={text width=5em,text centered,yshift=-0.2cm}}
\begin{tikzpicture}[node distance=4mm]
\node[bag](s0){$s_0$};
\node[bag,  below = of s0, xshift=-5em] (s1){$s_1$};
\node[bag, below  = of s0, xshift= 7em](s2){$s_2{:}(P_2, Q_1$};
\node[bag, below = of s1,xshift=6em](s3){$s_3$};
\draw[->] (s0)--(s1);
\draw[->] (s0)--(s2);
\draw[->] (s1)--(s3);
\draw[->]  (s2)--(s3);
\end{tikzpicture}
\end{document}
2
  • You didn't define the leadsto style (the definition is in the answer to the question linked by m0nhawk). – Gonzalo Medina Apr 26 '13 at 13:06
  • You need to define the leadsto style before you can use it. Read the answer that IARI gave you carefully, you'll find leadsto/.style. That part needs to be present in your new code as well. – Jake Apr 26 '13 at 13:06

Browse other questions tagged or ask your own question.