1

I would like to use decorated paths with arrow heads. But if I use the border decoration, something happens with the arrow tip positioning:

\documentclass{article}
\usepackage{tikz,amsmath, amssymb,bm,color}
\usepackage[margin=0cm,nohead]{geometry}
\usepackage[active,tightpage]{preview}
\usepackage{pgfplots}
\usetikzlibrary{decorations}
\usetikzlibrary{decorations.shapes}
\PreviewEnvironment{tikzpicture}
%
\begin{document}
\begin{tikzpicture}[>=stealth]
\node[draw=black, circle, inner sep=2mm] (v0) at (0,2) {};
\node[draw=black, circle, inner sep=2mm] (v1) at (1,2) {};
% ADDITIONAL WRONG ARROW TIP:
\draw[postaction={draw, decorate},->,decoration={border,segment length=3mm, angle=90, amplitude=.5mm}](0,0)--(v0);
% ONLY THE WRONG ARROW TIP:
\draw[postaction={draw, decorate,->},decoration={border,segment length=3mm, angle=90, amplitude=.5mm}](1,0)--(v1);
% how can I produce the right arrow tip only?
\end{tikzpicture}
\end{document} 

It seems that -> affect postaction and this will result in a second wrongly positioned arrow tip. The displaced arrow tip usually placed to the right place but it `does not know which path it belong', it's like an arrow tip on a degenerate line headed to a (usually wrong) direction.

So how can I keep only the rightly positioned arrow tip from the first arrow?

UPDATE: This is how it looks like on my computer:

Here's

From Gonzalo Medina's comment (thanks!) it looks like that this is a simple outdated tikz (MikTex...) issue. I try to update my tikz then and if the problem persisted I update this post again...

UPDATE: reinstalling MikTeX worked! (Package manager didn't work on my computer for some reason) Probably it downloaded the new TikZ 3.0 during the compilation.

Thanks!

  • I'm unable to reproduce the problem mentioned using TeX Live2014. Here's an image of the output I get using your code: i.imgur.com/lluSDB8.png Do you get something different? Are you perhaps using an outdated PGF/TikZ version? – Gonzalo Medina Feb 17 '15 at 18:19
  • 4
    I'm voting to close this question as off-topic because it has been solved by updating the software – egreg Mar 20 '15 at 13:28

Browse other questions tagged or ask your own question.