[Tex/LaTex] Listing over two columns – how to page break

listingspage-breakingtwo-column

I have a two column article:

\documentclass[a4paper, twocolumn]{article}

Inside this is a bigger lstlisting which has a float=* to merge the two columns.
However this listing needs a page break. LaTeX won't break the listing due to the float I think. What can I do to let LaTeX page break my listing?

Best Answer

If you can use the package multicol instead, then try this:

\documentclass[english,a5paper]{article}
\usepackage{babel}
\usepackage{listings}
\usepackage{multicol}
\usepackage{blindtext}
\begin{document}
\begin{multicols}{2}
 \blindtext[2]
\end{multicols}

\begin{lstlisting}[caption=A Listing,,basicstyle=\ttfamily,numbers=left]
ffooo 
ffooo 
ffooo 
ffooo 
ffooo 
ffooo 
ffooo 
ffooo 
ffooo 
ffooo 
ffooo 
\end{lstlisting}

\begin{multicols}{2}
 \blindtext[3]
\end{multicols}

\end{document}