I have some square pictures in eps format which should be regarded as mathematical symbols. Each square picture consists of a blank square with some drawing in the center. I would like to be able to do essentially two things with these pictures.
(Most important) Make matrices out of these pictures. Problem: I need the final matrix to be a square. The lines dividing each column and each row of the matrix must match precisely the borders of the square pictures. The result that I get using the array matrix is not satisfactory because the final matrix is not really a square, and the lines dividing columns and lines do not match borders of pictures.
(Also important) I need to write sequences of these pictures, enclosed into several types of brackets, such as (),[],{} , and such that the pictures are separated by commas. The result I get is not satisfactory because for some reason I get huge spaces under the pictures.
For instance, the following is an example of square picture.
Below, it is an example of the things I would like to do with square pictures.
But what I actually get with the minimal example given below is the following, which is unsatisfactory.
A minimal example of my code is given below.
\documentclass[a4paper]{article}
\usepackage{graphicx,amsmath,amssymb}
\newcommand{\squarepicture}{{\includegraphics[scale=0.8]{squarepicture.eps}}}
\begin{document}
\begin{equation}
\left\{ \squarepicture, \squarepicture, \squarepicture \right\}
\end{equation}
\begin{equation}
\left( \squarepicture, \squarepicture, \squarepicture \right)
\end{equation}
\begin{equation}
\begin{array}{|c|c|c|}
\hline
\squarepicture & \squarepicture & \squarepicture \\
\hline
\squarepicture & \squarepicture & \squarepicture \\
\hline
\squarepicture & \squarepicture & \squarepicture \\
\hline
\end{array}
\end{equation}
\end{document}