Here's the best I could come up with. First, I define \oldsection
as the old \section macro, then use it to define a new \section command which first ends the previous multicolumn environment, unless it's the first section, in which case it does nothing, and then starts a new multicolumn environment with a section heading as defined by old section.
I also have to redefine \enddocument
to end the final multicolumn.
This is not a very robust or advisable solution, but may work in a pinch.
\usepackage{multicol}
\usepackage{ifthen}
\let\oldsection\section
\renewcommand*{\section}[1]{%
\ifthenelse{\thesection = 0}{}{\end{multicols}}%
\begin{multicols}{2}[\oldsection{#1}]}
\let\oldend\enddocument
\renewcommand*{\enddocument}{\end{multicols}\oldend}
To used as follows:
\documentclass{article}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{ifthen}
\let\oldsection\section
\renewcommand*{\section}[1]{%
\ifthenelse{\thesection = 0}{}{\end{multicols}}%
\begin{multicols}{2}[\oldsection{#1}]}
\let\oldend\enddocument
\renewcommand*{\enddocument}{\end{multicols}\oldend}
\begin{document}
\section{My first section}
\lipsum[1-2]
\section{Another section}
\lipsum[3-4]
\end{document}
\section{Introduction}
and have it be the same as\begin{multicols}{2}[\section{Introduction}]
? Your directives about what answers are acceptable are ill-advised and frankly, kinda rude.\end{multicols}
should also be handled automatically, because taking your request literally, it shouldn't.