6

I've drawn this arrow:

enter image description here

But want it to look like this:

enter image description here

How can I do that? This is my code for the first arrow:

\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
    \node (n1) at (0,0) {n1};
    \node (n2) at (4,0) {n2};
    \draw[-{Latex[length=1.2cm,open]}, blue, line width=0.1cm] (n1.east) to (n2.west);
\end{tikzpicture}
\end{document}
Tim N
  • 10,219
  • 13
  • 63
  • 88

2 Answers2

6

cfr's solution can be adapted to be a regular style with postaction. Also a shorten > option can be used to avoid calc tikzlibrary.

\documentclass[border=10pt,tikz]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
  [
    my double arrow/.style={double distance=2.5mm, -{Latex[length=12mm,open]}, line width=1mm,green,
        postaction={draw,double distance=.5mm,line width=1mm, white,-, shorten >=10mm}},
  ]

    \draw[my double arrow] (0,1) to (4,1);

    \draw[my double arrow, red] (0,0) to (4,0);

\end{tikzpicture}
\end{document}

enter image description here

Ignasi
  • 136,588
5

You could try something fairly simple like this:

\documentclass[border=10pt,tikz]{standalone}
\usetikzlibrary{arrows.meta,calc}
\begin{document}
\begin{tikzpicture}
    \node (n1) at (0,0) {n1};
    \node (n2) at (4,0) {n2};
    \draw [double distance=2.5mm, -{Latex[length=1.2cm,open]}, blue, line width=1mm] (n1.east) to (n2.west);
    \draw [double distance=.5mm, white, line width=1mm] (n1.east) to ($(n2.west) - (11mm,0)$);
\end{tikzpicture}
\end{document}

If you need to draw several, using the pic syntax might be the way to go:

\documentclass[border=10pt,tikz]{standalone}
\usetikzlibrary{arrows.meta,calc}
\begin{document}
\begin{tikzpicture}
  [
    pics/my arrow/.style n args=2{
      code={
        \draw [double distance=2.5mm, -{Latex[length=12mm,open]}, line width=1mm, pic actions] (#1) to (#2);
        \draw [double distance=.5mm, white, line width=1mm] (#1) to ($(#2) - (11mm,0)$);
      },
    },
  ]
    \node (n3) at (0,-1) {n3};
    \node (n4) at (4,-1) {n4};
    \pic [red] {my arrow={n3}{n4}};
\end{tikzpicture}
\end{document}

pic arrow

cfr
  • 198,882