I'm using package numprint to create a table which automatically formats its columns. However, the table has many columns.
Right now, my table definition looks like this:
\begin{tabular}{l n{2}{3} n{2}{3} n{2}{3} n{2}{3} n{2}{3} n{2}{3} .. etc ..} ..
Using package pgffor I would like to automate the number of column definitions (because they might differ). I thought of doing this using a \foreach as follows:
\begin{tabular}{l \foreach \k in {1,...,6}{ n{2}{3} }}
But it doesn't work. It gives an error that extra alignment tab has been changed to .., which implies that it can't interpret the output of the for each loop.
What is the correct way of doing this? (automatically generating the column types)
\begin{tabular}{l*{6}{n{2}{3}}}do the job, or did I misunderstood what you want to do? – Bernard Mar 17 '15 at 13:00