# renew section command with tabular sections

I want to renew the section command so each section will follow by a fully two columns tabular. it seems that it should be like:

\renewcommand{\section}[1]
{
\hfill\newline {#1}:\newline
\begin{tabular}{ll}
}


the problem is \end{tabular} which I don't know where should I put it without need of something like endsection.

any idea?

-

## migrated from stackoverflow.comMar 28 '11 at 18:55

This question came from our site for professional and enthusiast programmers.

This seems like a very odd thing to do. What effect are you trying to achieve? Maybe there's another way to do what you want. – Alan Munn Mar 28 '11 at 19:05
I need all the sections to have two columns! that's all. – MBZ Mar 30 '11 at 10:46
So what you want is a two column document, but with section headings that span both columns? – Alan Munn Mar 30 '11 at 11:07

If you want two columns in your document you should use the twocolumn class option. If you only want two-column style in your section (which is kind of funny) it would be better to use the multicol package and its {multicols}{<number>} environment instead of tabular. I would then still avoid redefining \section and simply adding this environments by hand.