I would like to draw a double-lined arc with an arrow at its end. It works perfectly well with a single line. Things are going south when I want to use a double lined arc.

Here is my MWE:






          \draw [border box] (0,0) -- (0,1) -- (1,1) -- (1,0) --  cycle;
          \node [anchors] (DL) at ({0.5/3 + \anchor@sep},{0.5/3 + \anchor@sep}) {};
          \node [anchors] (DM) at ({1.5/3},{0.5/3 + \anchor@sep}) {};
          \node [anchors] (DR) at ({2.5/3 - \anchor@sep},{0.5/3 + \anchor@sep}) {};
          \node [anchors] (ML) at ({0.5/3 + \anchor@sep},{1.5/3}) {};
          \node [anchors] (MM) at ({1.5/3},{1.5/3}) {};
          \node [anchors] (MR) at ({2.5/3 - \anchor@sep},{1.5/3}) {};
          \node [anchors] (UL) at ({0.5/3 + \anchor@sep},{2.5/3 - \anchor@sep}) {};
          \node [anchors] (UM) at ({1.5/3},{2.5/3 - \anchor@sep}) {};
          \node [anchors] (UR) at ({2.5/3 - \anchor@sep},{2.5/3 - \anchor@sep}) {};
          \draw[mal] ([shift=(-60:.35)]MM) arc (-60:241:.35);



    line width=1pt,
  border box/.style = {line width=0.75pt, rounded corners=3pt},
  anchors/.style = { draw, line width=0.1pt },

Correct (single line):

  mal/.append style = { double}

Boggus with 2 lines:


Did I miss something?

enter image description here


I started by minimising your example. As far as I can tell, the problem is basically to draw a tightly curved, double line with an arrow, using a macro which also works for a single line.

My first thought was to draw the second line of the double manually, rather than having TikZ do it. (All double does is draw 2 lines - one thicker and then one thinner.)

Unfortunately, TikZ goes a bit crazy trying to do this and it is possible to persuade it to draw lines going off at seemingly random angles for no readily apparent reason.

So, using a brute force approach, I tried adding a second curve to my testing macro and set up a separate style for this. When the style is draw=none, the macro does exactly the same as the original. However, when it is passed keys, it draws another curve.

However, this isn't quite enough because where the curve should end varies with the details of the line width etc. So, I added a key to set the end angle and, for good measure, the start angle as well.

Here's the result

angled arrow on fake double line

If you don't want the white middle, you can play around removing the open key from the tip specification, of course.

Here's the code:

    \draw [mal] (-60:.35) arc (-60:241:.35);
    \draw [mel] (-60:.35) arc (\melstartangle:\melstopangle:.35);
    line width=1pt,
  mel start angle/.store in=\melstartangle,
  mel stop angle/.store in=\melstopangle,
  mel angles/.code args={#1:#2}{%
      mel start angle=#1,
      mel stop angle=#2,
  mel angles=-60:241,

  mal/.append style={line width=2.5pt, -{Latex[bend,fill=white]} },
  mel/.append style={line width=.75pt, draw=white},
  mel angles=-60:175
| improve this answer | |
  • Ok thanks thus IIUC this is more related to a tikz issue. I'll try your solution to see if I can handle both single and doubled lined curves. – renard Aug 14 '16 at 22:13
  • @renard I tested it for both. Default assumes single (draw=none for the second style). – cfr Aug 15 '16 at 1:11
  • No idea what IIUC means. (If I understand correctly?) – cfr Aug 15 '16 at 1:11

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.