Following this lovely answer, we are able to make anchor aliases: https://tex.stackexchange.com/a/14772/186406
Are we able to make an anchor alias that is equivalent to not passing an anchor to the node at all? Let's say I define an anchor as d (default), I want:
\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
\node[circle, draw, label=A] (A) at (0,1) {};
\node[circle, draw, label=B] (B) at (1,0) {};
\draw[<->] (A) -- (B); % node to node line
\draw[<->] (A.d) -- (B.d); % this should be the same as above
\end{tikzpicture}
\end{document}
node csspecification you can use(node cs: name=A, anchor=none) -- (node cs: name=B, angle=none). [Bothanchorandangleare preset withnone, so(node cs: name=A) -- (node cs: name=B)would be the normal way to specify this connection.] This is one way to not have to check yourself whether a user has specified a special non-anchor anchor. – Qrrbrbirlbel Nov 22 '23 at 17:56d. Of course this is easy and I have it working, but I try to avoid conditionals and re-writing similar lines of code if necessary, – likethevegetable Nov 22 '23 at 18:06\NewDocumentCommand, but you could have a key set a macro to dot + argument, say, where the macro is empty by default and then use<name>\macroin place of<name>.d(depending on whether that would work in the relevant cases). It needn't mean maintaining near-duplicate lines of code. – cfr Nov 22 '23 at 18:38