Is it possible to let LaTeX increment the headings in a table environment? If so, how could I do this?
For example, I would like to have 7 columns and 7 rows where the columns except the first are blue = $1$ & blue = $2$ & ... and similarly the rows except the first are red = $1$ & ....
Is there a way to have LaTeX do this? In TikZ, I could use a foreach loop.
\documentclass{article}
\begin{document}
\begin{table}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
& blue = $1$ & blue = $2$ & blue = $3$ & ... \\
red = $1$ & & ... \\
red = $2$ & & ... \\
red = $3$ & & ... \\
...
\end{tabular}
\end{table}
\end{document}

...to show the desired table. I have a suspicion (given the comments on my answer) that I can't guess what you intend. – David Carlisle Oct 10 '14 at 15:23