tags:

views:

37

answers:

1

I make a document with twocolumn, but sometimes twocolumn is too narrow for source code listing.

I found the multicols environment and used it as follows:

% \documentclass[twocolumn]{article} % I don't use towcolumn, but multicolumn
\documentclass[]{article}
\usepackage{multicol}
...
\begin{multicols*}{2}

\section{In short}
...
\end{multicols*}

% Now I use one column

\begin{multicols*}{1}
...
\end{multicols*}

The result is not what I wanted.

What's wrong with my LaTeX code? What do you do for this case?

I tried to use a figure* environment, but it just floats around, so I'd rather not use it.

+1  A: 

Does this give you what you want?

\documentclass[]{article}
\usepackage{multicol}

\begin{document}

\begin{multicols}{2}

\section{In short}
double column text here. .double column text here. . . 
double column text here. . . 
double column text here. . . 
double column text here. . . 
 . 

\end{multicols}

% Now I use one column

% don't put any multicol command here, you're in outer
% single column document already

put single column text here. put single column text here. 
put single column text here. put single column text here. 
put single column text here. put single column text here. 
. . . 

\begin{multicols}{2}

\section{In short}
double column text here. . . 
double column text here. . . 
double column text here. . . 
double column text here. . . 
double column text here. . . 

\end{multicols}

\end{document}
Herbert Sitz