[Tex/LaTex] tikz arrows of the form =-> and -=>

tikz-arrows

I am trying to use tikz to draw a quiver and I need to draw arrows of the form =-> and -=> between two nodes. What is the best way to do it? Any help is appreciated.

Best Answer

Is this close to what you want?

\documentclass[tikz, border=5pt]{standalone}
\usetikzlibrary{decorations.pathreplacing, arrows}

\tikzset{
  -z>/.style={
    decoration={
      show path construction,
      lineto code={
        \path (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast) coordinate[pos=#1] (mid);
        \draw (\tikzinputsegmentfirst) -- (mid);
        \draw[double, -implies] (mid) -- (\tikzinputsegmentlast);      }
    },decorate
  }, -z>/.default=.5,
  z->/.style={
    decoration={
      show path construction,
      lineto code={
          \path (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast) coordinate[pos=#1] (mid);
                \draw[double] (\tikzinputsegmentfirst) -- (mid);
                \draw[->] (mid) -- (\tikzinputsegmentlast);
      }
    },decorate
  }, z->/.default=.5,
}

\begin{document}
\begin{tikzpicture}
  \draw [-z>] (0,0) -- (1,0);
  \begin{scope}[red, thick]
    \draw [z->=.3] (0,-.2) -- (1,-.4);
  \end{scope}
\end{tikzpicture}
\end{document}

styled lines

I don't think you can have = as part of a style name, so I've denoted a double line with z. Note that the arrowheads aren't quite the same for the two styles, although this can probably be fixed. For some reason, styles directly on the \draw commands don't get reliably passed to the decorations, but if you need to style it further you can use a scope.

Related Question