3

I want to align the double arrow shape in the tikz package with an arc, like this one:

\documentclass[landscape]{article}
\usepackage[a2paper]{geometry}
\usepackage{tikz}
\usetikzlibrary{fadings,shapes.arrows,shadows,arrows,positioning,shapes}
\pagenumbering{gobble}

\begin{document}
\begin{tikzpicture}[scale=2,node distance=1cm, auto,baseline=-.5ex]

\node (dummy) at (-5,-8) {}; 

\begin{scope}[remember picture,overlay,shift={(dummy.center)}]
\draw (8.75,4.75) arc (440:160:7.5); % I'm trying to align my double arrow shape with this arc.
\end{scope}

\end{tikzpicture}
\end{document}

By popular demand - a picture: picture

Preferrably I want the arrow tips to be unaffected by the bending of the shape. This would probably require a different shape than double arrow, though.

  • 1
    Could you please describe it a little more? If you could add a drawing by hand, it would be great, because there is no double arrow, it is difficult to imagine what you are trying to achive. – Malipivo Apr 12 '14 at 13:28
  • 1
    One tip: tex.stackexchange.com/questions/153922/… – Malipivo Apr 12 '14 at 16:30
1

Workaround (version 1)

I have only a workaround for you. I draw two arrows on each other, the arrowheads are shifted, so I manually move them slightly back. The first arrowhead's position is controlled by an extra point, the second arrowhead's position is controlled by an angle and a distance. Please try it if it fits your needs.

%! *latex mal-doublearrow.tex
\documentclass[landscape]{article}
\usepackage[a2paper]{geometry}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows}
%\usetikzlibrary{fadings,shadows,arrows,positioning,shapes}
\pagenumbering{gobble}
\begin{document}
\tikzset{mal/.style={<->, >=stealth, 
double arrow, line width=8mm,
 draw=black, double arrow head extend=1.5cm, double arrow head indent=1.25cm}}
\begin{tikzpicture}%[scale=2,node distance=1cm, auto,baseline=-.5ex]
\node (dummy) at (-5,15) {}; 
\begin{scope}[remember picture,overlay,at={(dummy)}]
\def\malpath{(7,5)-- (8.75,4.75) arc (440:160:7.5)--+(65:2)}
\draw[mal] \malpath; % I'm trying to align my double arrow shape with this arc.
\def\malpath{(7.2,5)--(8.75,4.75) arc (440:160:7.5)--+(65:1.8)}
\draw[mal, line width=6mm, draw=yellow] \malpath;
\end{scope}
\end{tikzpicture}
\end{document}

mwe


Edit (version 2)

%! *latex mal-doublearrow.tex
\documentclass[landscape]{article}
\usepackage[a2paper]{geometry}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,shapes}
\pagenumbering{gobble}
\begin{document}
\tikzset{mal/.style={<->, >={Stealth[length=40mm,sep=-5mm]},
 double distance=6mm, line width=5mm,
 draw=black, double=yellow}}
\begin{tikzpicture}
\begin{scope}
\draw[mal](6.5,5)--(8.75,4.75) arc (440:160:7.5)--+(70:2);
\end{scope}
\end{tikzpicture}
\end{document}

mwe

| improve this answer | |
  • Does this workaround offer any options to color the arrow similarly to the regular "flat" double arrow? My next step is to make the shape gradually fade in color, with say: [left color=blue,right color=green,middle color=cyan] – 1010011010 Apr 12 '14 at 16:53
  • It would require some more experiments. I am using line width, it can be changed, the yellow can be changed to white as well as to a shading object (untested). Your turn. :-) – Malipivo Apr 12 '14 at 16:59
  • I think I have an idea about using tikzfading and the draw={fading} command. Thank you for your insight. – 1010011010 Apr 12 '14 at 17:12
  • You can redefine mal style or copy its content directly to the \nodes. I think that I have made some mistake anyway as double arrow head * parameters seem not to work. Yes, I am, you asked for it (in drawing). I believe there is some double line width parameter and that second arrow won't be needed. – Malipivo Apr 12 '14 at 17:15
  • Oh, double distance=4mm, double=yellow it is... It looks there is more work in it. – Malipivo Apr 12 '14 at 17:19

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.