I am trying to draw a complex node multiple times in a figure and connect lines to them using code like this:
\documentclass{report}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes,arrows,decorations.markings}
\newcommand\TalentBox{
\noindent
\tikz {
%figure is much more complex than this
\node[rectangle, fill=black, font=\color{white}, minimum width=10mm, minimum height=10mm] {A}
}
}
\begin{document}
\begin{tikzpicture}[remember picture, overlay]
% multiple calls to the figure with different parameters
\draw ( 0, 0) node(a){\TalentBox};
\draw ( 0, -5) node(b){\TalentBox};
\draw ( 0, -10) node(c){\TalentBox};
% lines between figures have a gap on both ends
\draw [gray,-,>=stealth, line width=6pt] (a) to (b);
% As shown here:
\node [circle,fill=red, inner sep=0,minimum size=4pt] at (c.south west) {};
\node [circle,fill=blue, inner sep=0,minimum size=4pt] at (c.center) {};
\node [circle,fill=purple,inner sep=0,minimum size=4pt] at (c.north east) {};
\node [circle,fill=green, inner sep=0,minimum size=4pt] at (c.north) {};
\node [circle,fill=orange,inner sep=0,minimum size=4pt] at (c.north west) {};
\node [circle,fill=yellow,inner sep=0,minimum size=4pt] at (c.south) {};
\node [circle,fill=brown, inner sep=0,minimum size=4pt] at (c.south east) {};
\node [circle,fill=black, inner sep=0,minimum size=4pt] at (c.east) {};
\node [circle,fill=pink, inner sep=0,minimum size=4pt] at (c.west) {};
\end{tikzpicture}
\end{document}
This is the result:
The problem is that the anchor points are not at the figure but display a gap. Is there a way to avoid that gap?


