2

When I mark a path at positions that are decreasing and the path contains two or more to parts, only the last to is taken into account.

Here is an example :

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

\begin{tikzpicture}
  \draw[gray] (0,0) grid (4,4);
  \draw[very thick, draw=red,
      decoration={markings,
      mark=at position .3 with {\arrow[green]{*}},
      mark=at position .9 with {\arrow[black]{*}},
      mark=at position .3 with {\arrow[blue]{*}}, % the bad positioned mark
    },postaction={decorate}]
    (0,1) to[out=30,in=270] (4,3) to[out =90, in =-30 ] (0,4);
  % orange mark using only the second 'to'
  \path[decoration={markings,
          mark=at position -1.46 with {\arrow[green,scale=.5]{*}},
        },postaction={decorate}]
    (4,3) to[out =90, in =-30 ] (0,4);
\end{tikzpicture}

\end{document}

enter image description here

My questions is : Is this a bug ?

Kpym
  • 23,002

1 Answers1

4

I don't think it's a bug. The problem is that one cannot use positions in decreasing order. Page 585 of the manual says (italics for emphasis are mine)

It is possible to give the mark option several times, which causes several markings to be applied. In this case, however, it is necessary that the positions on the path are in increasing order. That is, it is not allowed (and will result in chaos) to have a marking that lies earlier on the path to follow a marking that is later on the path.

Isn't this what is happening here? You are placing marks at positions .3, .9 and then .3, so chaos results.

Gonzalo Medina
  • 505,128