I'm trying to decorate a path with vectors. I've created two different styles: one which creates tangent vectors, and one which creates random ones.
I want in each selected point of the path two vectors: one (dl) that is tangent and one (Rvec) that is randomly rotated.
Unfortunately I cannot apply both styles simultaneously (third picture). There seems to be something wrong with the Rvec style: in the second image it will not show at all and in the third it somehow prohibits the dl decoration. The dl style seems to work just fine.
Also at some point Rvec was somehow applied twice (in each point there were 2 random vectors) but I can't seem to reproduce that behavior again.
Do you have any idea how this could be solved?
This is my minimal example
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{decorations.markings}
\tikzset{
% Tangent vector
dl/.style={
decoration={
markings,
mark=between positions 0 and 1 step #1 with {
\draw[{Circle[length=4pt]}-Latex, purple, very thick] (0,0) -- (28pt, 0) node[above]{$\vec{dl}$};
}
},
postaction={decorate}
},
% Random vector
Rvec/.style={
decoration={
markings,
mark=between positions 0 and 1 step #1 with {
\draw[{Circle[length=4pt]}-Latex, black, very thick] (0,0) -- (rand*360:28pt) node[above]{$\vec{H}$};
}
}
},
postaction={decorate}
}
\begin{document}
\begin{tikzpicture}[scale=1.3]
\draw[thick, red, dl=0.2] (0,1) to[out=30,in=210] node[midway,below] {$\Gamma$} (6, 1);
\end{tikzpicture}
\begin{tikzpicture}[scale=1.3]
\draw[thick, red, Rvec=0.2] (0,1) to[out=30,in=210] node[midway,below] {$\Gamma$} (6, 1);
\end{tikzpicture}
\begin{tikzpicture}[scale=1.3]
\draw[thick, red, Rvec=0.2, dl=0.2] (0,1) to[out=30,in=210] node[midway,below] {$\Gamma$} (6, 1);
\end{tikzpicture}
\end{document}

