fac2@dayton.saic.com (Earle Ake) (01/14/90)
I am trying to come up with a way of not putting in 50 or so of the
same thing when I want to make up a checklist in a tabular environment of
LaTeX. I tried to use the \loop...\repeat construct but to no avail. Has
anyone else done this and if so how? Any help would be appreciated. Thanks
in advance. Example of what I would like to do is below:
%
%
% Some sort of macro to do a \duplicate{command}{number-of-times}
%
%
\newcount\n
\def\duplicate#1#2{\n=0
\loop\ifnum\n<#2 \advance\n by1
{#1} % \endgraf
\repeat}
\documentstyle{article}
\pagestyle{empty}
\begin{document}
%
%
% Just a little tabular environment here
%
%
\begin{tabular}{p{1.5in}p{1.0in}p{1.0in}p{1.8in}}
\multicolumn{1}{c}{\rule{1.3in}{0pt}}
& \multicolumn{1}{c}{\rule{0.8in}{0pt}}
& \multicolumn{1}{c}{\rule{0.8in}{0pt}}
& \multicolumn{1}{c}{\rule{1.6in}{0pt}} \\
\hline
%
%
% I don't want to put 50 or so of the following line in the TeX file. Would
% some form of repeat work here?
%
%
\duplicate{
\multicolumn{1}{c}{\rule{1.3in}{1pt}}
& \multicolumn{1}{c}{\rule{0.8in}{1pt}}
& \multicolumn{1}{c}{System\rule{0.2in}{0pt}User}
& \multicolumn{1}{c}{Readonly\rule{0.2in}{0pt}Read/Write}\\
}{5}
\end{tabular}
\end{document}
--
_____________________________________________________________________________
____ ____ ___
Earle Ake /___ /___/ / / Science Applications International Corporation
____// / / /__ Dayton, Ohio
-----------------------------------------------------------------------------
Internet: fac2%dayton.saic.com@uunet.uu.net uucp: uunet!dayvb!fac2