I have been experimenting with the TikZ sep arrow option, which allows to space arrows. I think that it can be hugely useful to also make midpoint arrows and to shorten paths. I have not yet seen anyone do this - maybe I have not looked closely enough.
Here I make some arrow distanced fist from one end and then the other end:
\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary {arrows.meta,bending}
\begin{document}
\begin{tikzpicture}
\newcommand{\mypath}{(0,0) to[out=90, in=-90] (4,2)}
\draw [red, -{>[sep=0.5cm] Butt Cap[]}] \mypath;
\draw [green, yshift=-1cm, {Butt Cap[] Stealth[reversed, sep=0.5cm]}-] \mypath;
\draw [blue, yshift=-2cm,
{Butt Cap[]
Stealth[reversed, sep=0.1cm]
Stealth[reversed, sep=0.2cm]
Stealth[reversed, sep=0.4cm]
Stealth[reversed, sep=0.8cm]
Stealth[reversed, sep=1.6cm]
}-] \mypath;
\end{tikzpicture}
\end{document}
I do not like Butt Cap[] to avoid an arrow in the end. Are there some notation for no arrow. This: ->- does not work. Maybe a empty or \arrow[none] that I have overlooked in the manual?
Is there any way to give relative length to sep? - sep=0.5 does not give a midpoint arrow (the unit is apparently pt).
Here I use the sep to shorten without changing the path. Normal shorten will shorten tangentially from the end point - see the green path:
\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary {arrows.meta,bending}
\begin{document}
\begin{tikzpicture}
\newcommand{\mypath}{(0,0) to[out=90, in=-90] (4,2)}
\draw [gray, thick] \mypath;
\draw [red, -{Butt Cap[sep=0.5cm]}] \mypath;
\draw [green, shorten >=0.5cm] \mypath;
\end{tikzpicture}
\end{document}
Again, I do not like the Butt Cap arrow, as it overwrites(or are rather in addition to) the default line cap.
Edit: I am aware of many other midpoint arrow solutions e.g. here TikZ: How to draw an arrow in the middle of the line? , but none that uses sep.



decorations.markings. – muzimuzhi Z Jan 03 '21 at 20:42