16

Not too well up on LaTeX, but I want to use the listings package for listings spanning a two-column format.

Unfortunately, asterisks cannot save me (like for figures/tables); this doesn't work:

\begin{lstlisting*}
...
\end{lstlisting*}

I've Googled about, but got no satisfactory answer, and getting a bit desperate. Should be simple... hope I'm not missing something stupid. Perhaps it's possible to embed this into a separate spanning float?

Help?

(P.S., I've posted this on the main stackoverflow site as well... https://stackoverflow.com/posts/3744232/edit if this is considered a duplicate, please comment and I'll remove the other. Getting a bit desperate fighting a deadline.)

badroit
  • 7,557

1 Answers1

26

The answer is in the listings documentation.

\begin{lstlisting}[float=*]
...
\end{lstlisting}
TH.
  • 62,639
  • So simple :). Many thanks for that. I had scanned the listings documentation a few times and had missed it (was rushing for a deadline). I had also scanned a few forums. In the end, managed to fit the listing in one column with 'tiny' font... not ideal, but now I know for future. – badroit Sep 19 '10 at 15:30