TikZ 锚点别名,用于传递无锚点

TikZ 锚点别名,用于传递无锚点

根据这个可爱的答案,我们可以创建锚点别名:https://tex.stackexchange.com/a/14772/186406

我们能否创建一个锚点别名,相当于根本不将锚点传递给节点?假设我将锚点定义为d(默认),我想要:

\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}

相关内容