Is it possible to use a TikZ matrix along a chain?
The following code attempts to create a chain consisting of a node, a matrix, and another node.
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{positioning,chains}
\begin{document}
\begin{tikzpicture}[start chain]
\node [on chain] {XYZ};
\matrix [on chain]
{
\node {A}; \\
\node {B}; \\
\node {C}; \\
};
\node [on chain] {123};
\end{tikzpicture}
\end{document}
However, if I try to compile, I get the error "Package pgf Error: No shape named chain-2 is known." (Interestingly, if I remove the final node so that nothing follows the matrix, then it compiles without error.) Why does this error occur?
Of course, it is straightforward enough to use the positioning library directly. So, mostly, I am interested in this question for its own sake; I don't have an important, specific use in mind where chains of matrices would be critical.

(chain-3)does indeed work. However, when I try naming the chain in your code withstart chain=mychainandon chain=mychain, I get the same error as before unless I continue to explicitly name the matrix with(mychain-3). Is something more going on here? – Henry DeYoung Jun 16 '12 at 15:24\matrix (mat) [matrix of nodes] { A \\ B \\ C \\ D \\ }; \draw[fill,blue] (mat-1) circle (2pt);, I get the error that "No shape namedmat-1is known." Why does this then conflict with the way a chain is named, ifmat-1doesn't appear to be used in ordinary matrix construction? – Henry DeYoung Jun 20 '12 at 21:14(mat-1-1)even though it's a vector. The problem is that the matrix is full of nodes but none of them gets the proper chain name. So it needs to be explicitly stated. But you are right I should have mentioned it in the answer. – percusse Jun 20 '12 at 22:19circleatmat-1to show that a matrix namedmatdoesn't actually define any point namedmat-1, which is indeed confirmed by the error message that I got. Given this, then, I don't understand why there is a naming clash between chain names and matrix names. Why doesn't TikZ just assign the proper chain name (e.g.,chain-3) to the matrix itself (as opposed to hoping that one of the nodes within the matrix will have the proper name for inclusion on the chain)? – Henry DeYoung Jun 22 '12 at 17:15-character directly steers the algorithm to matrix part of the code. But there is no matrix node with the namechainsuch that TikZ can keep on parsing the particular subentry e.g. (chain-3-5) etc. So it knows that it's a matrix but cannot parse it since (chain-3) is missing the column part. That's probably why it gets confused. – percusse Jun 22 '12 at 23:01