I saw someone use this scripts to generate big arrows, but it seems quite tricky to me. And I also hope the arrow is not filled. Any good ideas?

    -triangle 45,
    line width=1.0mm,
    postaction={draw, line width=0.25cm, shorten >=0.8cm, -}
] (2,-2) -- (2.5,-2);

Something like


The code first draws a relatively short line of 0.5 mm length with a ridiculous big line width of 1.0 mm which looks like

enter image description here

(The line width is used to a part in the calculation of the arrow tip size. This is an often used trick to get big arrow tips.)

The actual line lies under the arrow tip that is so big that it totally hides the line, with an opacity=.5 setting we can see it (remember that the arrow itself contains of a line and a filled area, the filled area and the line create a darker triangle).

enter image description here

When this is done the same path is used again (postaction), but with different settings:

  • a line width of 2.5 mm instead of 1 mm,
  • no arrow (-), and
  • the > part (in this case the end lies at (2.5,-2) is shorten by the amount of 8 mm.

The draw mode is used in the “normal action” because it is explicitly used with \draw but the postaction does not inherit this setting, but only the path itself.

This creates

enter image description here

The actual addition line due to postaction can be best seen if we draw it in another color (or use again opacity); with draw=green we see that it acutally overlaps the arrow:

enter image description here

Observe what happens if I remove the shorten > option (or set it to 0pt):

enter image description here

Now, the actual end is at the tip of the arrow and with shorten >=0.8cm it is set 8 mm to the left. But as our line is only 5 mm long we actually get a reversed line of –3 mm length. The postaction does not know about our arrow anymore and can’t shorten the line as it does normally automatically.

Weird! This is probably not the most sufficient way to draw a big arrow. For these kinds of arrows we could have used the single arrow shape of the shapes.arrows library.

Your update implies (huh!) a totally different approach:

\tikz\draw[line width=1mm,-implies,double, double distance=1mm] (0,0) -- (1,0);

which produces

enter image description here

The double distance describes the distance between the doubled lines that are drawn with the usual line width (default: thin = .4pt, here 1mm).

What actually happens:

  • a line with the line width of 2 * 'line width' + 'inner distance' is drawn
  • a line with the line width of inner distance is drawn over it
  • (and the arrow actually shortens the line too but that's a totally different chapter, see above)

We can add opacity=.5 to highlight that again:

enter image description here


Neither the arrow tip nor a post action updates the bounding box, which is the reason I had to use a relatively thick border of 6pt. This usually creates no problems in normal TikZ pictures.

\tikzset{every picture/.append style={opacity=.5}}
    -triangle 45,
    line width=1.0mm,
    postaction={draw=green, line width=0.25cm, shorten >=0.0cm, -}
] (2,-2) -- (2.5,-2);
\tikz\draw[line width=1mm,-implies,double, double distance=1mm] (0,0) -- (1,0);

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.