I would like to draw a single path with relative coordinates, where every segment gets their arrow tips. I have tried

\draw[<->] (0,0) -- ++(1,0) -- ++(1,0) -- ++(1,0);

But of course, as is specified in the manual, this adds arrow tips to the first and last subpaths only, of course, so it becomes something like <------------>, whereas I would like it to be <---><---><--->. I have read Drawing an arrow tip to every node of a path and know that an edge will give me arrow tips on every edge, but then I can't use incremental coordinates. (I am actually trying to do the exact same thing that @quinmars is doing in that question.)

Since the answer to that question is 5 years old, I was hoping that either TikZ or somebody else may have an elegant solution to this?


1 Answer 1


For straight lines only, maybe a bit like this?

  \path [every arrow subpath/.try] \pgfextra{%
\tikzset{every arrow subpath/.style={->, draw, thick}}
  \path [decoration=arrows, decorate](0,0) -- ++(1,0) -- ++(0,1) -- ++(45:1);

enter image description here

  • I think the OP wants to have arrows on both ways: not like --->--->---> but like <----><----><---->. Sep 27, 2016 at 19:10
  • 1
    Just replace "->" in the .style with "<->".
    – Derek
    Sep 27, 2016 at 20:08
  • It there a way to modify this so that styles declared on the \path are inherited? For example, so that \path [decoration=arrows, decorate, green] would make the path green? Jul 7, 2019 at 17:31

You must log in to answer this question.

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