I'm trying to create a table using the foreach loops made available in the pgffor
package. Using the following code, I am able to generate the right contents, but not aligned properly.
\begin{tabular}{c}
\foreach \i in {0,...,7}{
\foreach \j in {0,...,7}{
(\i,\j)
}
}
\end{tabular}
However, as soon as I try to add line endings (see below), ..
\begin{tabular}{c}
\foreach \i in {0,...,7}{
\foreach \j in {0,...,7}{
(\i,\j) \\
}
}
\end{tabular}
I get the following error:
! Missing \endgroup inserted.
<inserted text>
\endgroup
l.237 }
I don't see what I'm doing wrong. Can anyone point it out to me?