studding CarLaTeX answer on question i find unexpected behavior of tikz matrix delimiter: if the size of math nodes are determined by text width=... and text height=..., than delimiters work as expected, however, if i replace them with minimum size=... gives error !missing } inserted.. <inserted text> }. test example:
\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{matrix}
\newcommand\x{\times}
\begin{document}
\begin{tikzpicture}
\matrix [matrix of math nodes,
nodes={rectangle, %draw, very thin,
minimum size=1.2em, text depth=0.25ex,
inner sep=0pt, outer sep=0pt,
left delimiter=(, right delimiter=),
fill opacity=0.5, text opacity=1,
anchor=center},
column sep=-0.5\pgflinewidth,
row sep=-0.5\pgflinewidth,
column 2/.append style = {nodes={fill=cyan!50}},
row 2/.append style = {nodes={fill=cyan!50}},
row 2 column 2/.append style={nodes={fill=cyan}},
]
{
a_1 & \x & a_3 \\
a_4 & \x & a_6 \\
a_7 & \x & a_9 \\
};
\end{tikzpicture}
\end{document}
if i comment definition of delimiters, example gives:
do i miss something or doing wrong?


ampersand replacementand theleft delimiter/right delimiterline.minimum sizeworks as well for me astext widthortext height. – Jasper Habicht Feb 17 '18 at 23:56ampersant replacementwas left from some my experiments ... it should be erased. done now in question. – Zarko Feb 17 '18 at 23:59