I have a custom environment that I am using as part of a template. Right now this is the code for the template file.
%-----------------------------------------------------------
% customtemplate.cls
%-----------------------------------------------------------
\setlength{\tabcolsep}{0pt}
% New environment for the long list
\newenvironment{twenty}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}}{%
\end{tabular*}
}
\newcommand{\twentyitem}[3]{%
\parbox[t]{\textwidth}{%
\textbf{#2}%
\hfill%
#1\\%
#3\vspace{\parsep}%
}\\
}
In a .tex
file the command is called like so:
%-----------------------------------------------------------
% somefile.tex
%-----------------------------------------------------------
\begin{twenty}
\twentyitem{2013}{This is an example}{lorem ipsum etc\ldots}
\end{twenty}
gives this output:
The behavior I would like is this, where I can have as many or as little arguments as I want, with the condition that the first 3 are required. "meaning there needs to be at least one item in the list"
%-----------------------------------------------------------
% somefile.tex
%-----------------------------------------------------------
\begin{twenty}
\twentyitem{2013}{This is an example}{lorem ipsum etc\ldots}{as}{many}{as}{possible}
\end{twenty}
I made an attempt at putting an itemize in the template code but was unable to figure out how to make a variable number of arguments with the precondition that there must be at least 3. None of what I tried would actually compile.
Any help would be appreciated.
Best Answer
I'm guessing at what the OP really wants, but am convinced, regardless, that nested environments are preferable to long-argument macros, for what he wants.