[Tex/LaTex] Alignment within enumerate

#enumeratecolumnshorizontal alignmentliststables

I'm looking for a way to sort of combine the features of enumerate (and other list-like environments) with features of tabular environments.

Specifically, what I like about enumerate is that it provides automatic numbering, and that it produces a straight "stream" of output that can be wrapped in a multicols environment so I can easily change how many columns I want. What I need that's similar to tabular, though, is that I need to have multiple alignment points within each enumerate item.

What I ideally want to be able to do is this:

\begin{coolEnv}{lrc}{2} % specifying two columns
   \item This should & align & and stuff
   \item This should & also align & and everything
   \item This should & additionally align & and all
   \item This here should & be aligned & with the rest
\end{coolEnv}

The output I want is going to look like it's six columns, but it should really be two columns, each of which has three "sub-columns". That is, my {2} in the environment is saying "I want two columns", but since each item of the environment has two align points, the separate parts should also be aligned as columns. I'd like to be able to specify the alignment of the sub-columns as I have with {lrc} there, but this is the least important part.

The reason I want to do this is that I frequently find myself creating tabulars with some number of columns, but then later deciding I want them to be wider instead of tall and skinny, with the entire tabular wrapping into multiple columns (the way enumerate does in a multicols environment). With tabular, this requires me to completely eviscerate the tabular and move all the &s and \\s around, because the tabular requires me to specify what is shown on the same line, not what data belong together. I want a way to specify the data of the table in semantic "rows" (i.e., groups of info which must remain together) without having to specify how I want it to flow (i.e., how many such groups are printed on a line). I want to retain the freedom to later say "I want X groups on a line" and not have to redo the whole thing.

I've looked at various combinations of packages like multicol, enumerate, listliketab, multienum, etc., but none of those seem to do what I want. Is there a clean solution?

Best Answer

I've always been using \makebox for this purpose. If it's needed more than two or three times, one could make a macro that accepts n arguments for n columns. E.g.

\newcommand\itemrow[3]{%
  \item\makebox[8em][l]{#1}%
    \makebox[8em][r]{#2}%
    \makebox[8em][c]{#3}%
}

\begin{enumerate}
   \itemrow{This should}{align}{and stuff}
   \itemrow{This should}{also align}{and everything}
   \itemrow{This should}{additionally align}{and all}
   \itemrow{This here should}{be aligned}{with the rest}
\end{enumerate}

But that is a rather inflexible solution of course.

Best