5

I have a curved arrow which works fine if the radius is 0.7 or smaller. But if I increase the radius to 0.8 then the arrowhead vanishes. Changing the various parameters doesn't seem to help. I would like to understand what is happening and how I can use a larger radius.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows, decorations.markings}
\begin{document}

\begin{tikzpicture}

    % https://tex.stackexchange.com/a/169115/2737
    \tikzset{
    curveArrow/.style={
      thick,
      decoration={markings,mark=at position
       1 with {\arrow[scale=1.5,semithick]{open triangle 60[fill=white]}}},
      double distance=3.5pt, shorten >= 8pt,
      preaction = {decorate},
      postaction = {draw,line width=1.4pt, white,shorten >= 8.5pt}
      }
    }
    % changing radius from 0.7 to 0.8 makes the arrow head disappear
    \draw[curveArrow] (0,0) arc (90:270:0.7); 

\end{tikzpicture}

\end{document}

Radius = 0.7 radius=0.7 Radius = 0.8 radius=0.8

3
  • Workaround: ` mark=at position .99999`. Maybe, it is a rounding issue. Dec 28, 2020 at 15:49
  • Thanks, that works a treat and explains what may be happening.
    – stevem
    Dec 28, 2020 at 16:30
  • Arrow also reappears when changing 270 to anything close like 270.0001 Dec 28, 2020 at 19:34

1 Answer 1

4

Tikz library arrows is deprecated. I find it a bit strange to use markings just to place something at the very end of a path - maybe that is just me. Here is an altenative version without the artefacts and problems from the original code. The idea is to draw a triangle arrow first, and then make the double line exact long enough to draw over part of the vertical arrow line.

\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[
  curveArrow/.style={
    draw=none,
    preaction={draw, thick, -{Triangle[open, length=8pt 1, width=10pt]}},
    postaction={draw, thick, double distance=3.5pt, shorten >=8pt}
  }]
\draw[curveArrow] (0,0) arc (90:270:0.8); 
\end{tikzpicture}
\end{document}

Curve with triangle arrow

3
  • Thank you. That also produces a correct result for small radii such as 0.4.
    – stevem
    Dec 30, 2020 at 13:56
  • I'm mistaken. A radius of 0.4 has a strange effect, where the arrowhead itself is fine, but one of the edges at the end of the path curves in the opposite direction. Nothing to do with the arrows or arrows.meta libraries though.
    – stevem
    Dec 30, 2020 at 14:23
  • Fat lines(here a double line) can only be shortened a small amount when they curve a lot. It is difficult to make a style that works in every case. Alternative to shorten is \clip but it needs to be done case by case. Dec 30, 2020 at 17:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .