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.

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??

share|improve this question
    
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. –  stalking is prohibited Oct 15 '12 at 13:16
2  
do not use the float option of the environment lstlisting –  Herbert Oct 15 '12 at 13:21

1 Answer 1

up vote 1 down vote accepted
\documentclass{article}
\usepackage{listings}
\begin{document}
\lstinputlisting{pstricks.tex}
\end{document}

can spans multiple pages:

enter image description here

Please delete this answer if I forget to do so.

share|improve this answer
    
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
1  
@Sigur: Please visit my profile, and locate the most bottom link. It is explained there. –  stalking is prohibited Oct 15 '12 at 13:35

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.