How can I set the transparency so that the arrow belongs to the same transparency group
as the path?
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}
\tikzset{%
> = stealth,
arrow over path/.style = {%
decoration = {%
markings,
mark = at position .5 with {\arrow {>};}
},
postaction = decorate
}
}
\draw[arrow over path, semitransparent] (0,0) -- (1,1);
\end{tikzpicture}
\end{document}
\draw
command with\begin{scope}[opacity=.5,transparency group]
and\end{scope}
should work (provided the back-end driver supports it).semitransparent
key from the\draw
command.