repeating rows in a table 

Newsgroups: comp.text.tex
From: Kris Luyten <kris.luy...@luc.ac.be>
Date: Fri, 1 Feb 2002

Is there a package that allows to repeat (copy) a row in a table n times.

I want to say something like:

\begin{tabular}{l|l|l}\hline
blabla & blabla & blabla \\ \hline
\repeat_this_row_n_times &&&\\\hline
\end{tabular}

repeating rows in a table 

> > [...]
> > \theline
> > \theline
> > \theline
> > \theline
> > \end{tabular}
> That is not repeat "n" times, like my question stated.  I want to
> avoid the copy-paste stuff and "repeat" the LaTeX command like in a
> loop in a regular programming language.

Just like in a regular programming language, you'd do

\def\nlines#1{\expandafter\nlineii\romannumeral\number\number #1 000\relax}
\def\nlineii#1{\if#1m\expandafter\theline\expandafter\nlineii\fi}

and then in the document you can say

\def\theline{whatever&you&want\\}
\begin{tabular}{l|l|l}\hline
\nlines{13}
\end{tabular}

Is this more similar to what you need?

David Kastrup

repeating rows in a table 

> Is this more similar to what you need?

Yes! This works great.

Kris Luyten