I'd like to typeset a bunch of small 3x3 matrices to describe generators of certain ideals, as in this paper, p7.
Using smallmatrix works beautifully as long as I only want circles and bullets, but when I try to use multirow to merge cells and put a square across four entries of the matrix, it simply doesn't work. It works in the standard matrix or array environments, but they're far too large for what I need.
I've also tried How to model {smallmatrix} with {array}? but the squares get shrunk and it doesn't quite look right. Since I don't really understand the code in that thread, I don't know how to edit it to make it do what I want. I think it would be fine if I could make the squares a bit bigger.
Here is the code that hopefully illustrates what I'm trying to do. The smallarray environment comes directly from the thread I linked to above.
\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{multirow}
\newcommand{\ZZ}{\multicolumn{2}{c}{\multirow{2}{*}{$\square$}}}
\newenvironment{smallarray}[1]
{\null\,\vcenter\bgroup\scriptsize
\renewcommand{\arraystretch}{0.7}%
\arraycolsep=.13885em
\hbox\bgroup$\array{@{}#1@{}}}
{\endarray$\egroup\egroup\,\null}
\begin{document}
When there's no cells to merge, both smallmatrix (left) and smallarray (right) work fine.
\begin{equation}
\begin{smallmatrix}
\circ & \circ & \bullet \\
\circ & \circ &\bullet \\
\circ & \circ & \circ
\end{smallmatrix}
\qquad
\begin{smallarray}{ccc}
\circ & \circ & \bullet \\
\circ & \circ &\bullet \\
\circ & \circ & \circ
\end{smallarray}
\end{equation}
But when we try to merge some cells...
\begin{equation}
\begin{smallmatrix}
\circ & \ZZ \\
\circ & & \\
\circ & \circ & \circ
\end{smallmatrix}
\qquad
\begin{smallarray}{ccc}
\circ & \ZZ \\
\circ & & \\
\circ & \circ & \circ
\end{smallarray}
\end{equation}
...smallmatrix just doesn't work. The second one is almost right and I'd happily just use that, but I also need a matrix of this form:
\[\begin{smallarray}{ccc}
\circ & \ZZ \\
\ZZ &\\
& & \circ
\end{smallarray}
\]
and that's really not quite right.
\end{document}
Any hints or suggestions would be appreciated.
\multirow
can't work insmallmatrix
.