Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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... http://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.)

share|improve this question

1 Answer 1

up vote 17 down vote accepted

The answer is in the listings documentation.

\begin{lstlisting}[float=*]
...
\end{lstlisting}
share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.