This TeX.sx question asks if is it possible to use a TikZ matrix along a chain. The error that occurs when one tries to do so is Package pgf Error: No shape named chain-3 is known., and a way to circumvent it is to manually give the matrix node that name.
If the node is already used with a name it was given before making it a matrix, it can be tempting to give it an alias, like below:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,chains,matrix}
\begin{document}
\begin{tikzpicture}[start chain]
\node [on chain] {XYZ};
\node [on chain,alias=Foo] {123};
\node [on chain,matrix of nodes,alias=Bar] (chain-3) { A \\ B \\ C \\ };
\node [on chain] {$\alpha\beta\gamma$};
\fill (Foo) circle (2pt);
\fill (Bar) circle (2pt);
\end{tikzpicture}
\end{document}
Alas, this doesn't work, as it seems matrix nodes simply ignore the alias option -- which probably explains why they don't get the chain-i name when used in a chain.
Is there a way to give a matrix node an alias? Note: I'm using PGF version 2.10, which is rather up-to-date. If this behaviour is fixed in a later release, please let me know.
MWE:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\node [alias=Foo] (regularnode) {123};
\node [matrix of nodes,alias=Bar] (matrixnode) {A\\B\\C\\};
\fill (Foo) circle (2pt);
\fill (Bar) circle (2pt);
\end{tikzpicture}
\end{document}
This works perfectly for Foo (the regular node), but the last \fill command gives ERROR: Package pgf Error: No shape named Bar is known.



\fill[red] (Bar.north east) circle (2pt);or\fill[red] (Bar.73) circle (2pt);won't work. I don't know if there is a way to create a "clone" node, that works like acoordinate, but also copies all the anchors from the original node. Basically an "alias" shape. If that existed, using it instead of yourcoordinatewould solve the problem indeed. – Suzanne Soy Dec 10 '12 at 23:23\tikzset{mychainalias/.style={append after command={coordinate (chain-#1) at (\tikzlastnode)}}}then add the optionmychainalias=3to the matrix for sweeping it under the rug. But if the matrix is wide enough you might get into trouble. – percusse Dec 10 '12 at 23:46\coordinate (chain-3) at (Bar.east);but unfortunately the cardinal point depends on the growth direction of the chain. – JLDiaz Dec 11 '12 at 00:10