I know how to use let from TikZ calc library into a path command and fix some parameter of a particular node on that path. But I would like to use inside node's style definition.
As an example, consider how to automatically fix height and border rotation for a single arrow between to nodes:
\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{positioning, shapes.arrows, calc}
\begin{document}
\begin{tikzpicture}
\node[draw] (a) {A};
\node[draw, above right=2cm and 1cm of a] (b) {B};
\path (a.north east) let \p1=($(b.south west)-(a.north east)$) in
node[single arrow, draw,
minimum height={veclen(\x1,\y1)},
shape border uses incircle,
shape border rotate={atan2(\y1,\x1)},
anchor=tail] at (a.north east) {};
\end{tikzpicture}
\end{document}
I would like to define this arrow node with a style similar to arrow between a and b and be able to use
\node[arrow between a and b] {};
The problem is that I've never seen let inside a .\style for a node. Is it possible to do it?




/tikz/.unknowncode but that's just messy. – Qrrbrbirlbel Sep 06 '22 at 00:05