Here is the MWE:
\documentclass{article}
\usepackage{pgffor, geometry, tabu, booktabs}
\geometry{
a4paper,
portrait,
margin=1in
}
\begin{document}
Here is creating the table using a loop\\[10pt]
\foreach \n in {Feb, Mar, April is the best month}{
\begin{tabu}{X[-1] X}
\n & \foreach \m in {0,...,30}{\framebox(9,9){} }\\ \midrule
\end{tabu}
}
\vskip 20pt
Here is creating table one row at a time\\[10pt]
\begin{tabu}{X[-1] X}
Feb & \foreach \n in {0,...,30}{\framebox(9,9){} }\\ \midrule
Mar & \foreach \n in {0,...,30}{\framebox(9,9){} }\\ \midrule
April is the best month & \foreach \n in {0,...,30}{\framebox(9,9){} }\\ \midrule
\end{tabu}
\end{document}
Table in the loop is broken --- no alignment of columns.
How do I get the table in the loop set as the table without the loop?


Xcolumns so each independently chooses a column width. – David Carlisle Feb 18 '17 at 10:25