5

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}
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

5

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

  • 2
    This looks great, but it draws a white rect inside the shaft of the arrow. Can the middle of the shaft be transparent? – Johan - reinstate Monica Jul 26 '17 at 14:31
  • @Johan I think that could be asked as a question; many people will be interested. – Cyriac Antony Jun 27 at 11:32

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.