# How can I create a lstlisting environment that spans more than one page?

I am using listings package to show some algorithms in a LaTeX document.

One of the algorithms I want to include is longer than one page. So, my question is:

How can I create a lstlisting environment that spans more than one page??

-
Could you add the start of the lstlisting environment that gives problems? –  egreg Oct 15 '12 at 13:14
It can spans more than one pages. –  Please don't touch Oct 15 '12 at 13:16
do not use the float option of the environment lstlisting –  Herbert Oct 15 '12 at 13:21

\documentclass{article}
\usepackage{listings}
\begin{document}
\lstinputlisting{pstricks.tex}
\end{document}


can spans multiple pages:

-
Ok, Thank you. My problem was I was using float option. –  Vicent Oct 15 '12 at 13:31
How did you do this .gif? –  Sigur Oct 15 '12 at 13:34
@Sigur: Please visit my profile, and locate the most bottom link. It is explained there. –  Please don't touch Oct 15 '12 at 13:35