The following code draws arrows at a mid point along the line:
\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}[
mid arrow/.style={
postaction={decorate,decoration={
markings,
mark=at position .5 with {\arrow{latex}}
}}
},
]
\draw[thin,gray,dashed] (0,-1) -- (0,1);
\draw[mid arrow] (-1,0.1) -- (1,0.1);
\draw[mid arrow] (1,-0.1) -- (-1,-0.1);
\end{tikzpicture}
\end{document}
The result is as expected:
Note that the tip of the arrow is the point of reference for where the marking gets placed, which is why the dashed gray line intersects the two tips. (In general, this is what you want: an arrow at the end of the line should have its tip at the end of the line!)
However, I would like these two arrows to be "centered" on the mid-line, such as this:
(I achieved this by adjusting the position of the marking to 0.54, but of course this is a hack that depends on the length of the line.)
Is there some way either to anchor an arrow somewhere other than at its tip, or otherwise tweak the positioning of the mark by, say, 3.2pt
(which, in my actual use case, is half the length of the arrow)?