I am currently writing a paper that has lots of code snippets in it, which I would like to treat as figures.

Because the examples can be very long it would be convenient to allow page breaks inside of the code.

Is there any way to achieve this?



...Here will be a very long code snippet...
  • You cannot, flots are by definition single page. Btw di you know that lstlisting has a build in caption feature?
    – daleif
    Apr 28 '21 at 7:38
  • @daleif No I did not know that. Thank you a lot!
    – Manox
    Apr 28 '21 at 7:41

Float are by definition single page only. If you just want to label/caption your source sniplets, listings has build in features for that. See the listings manual

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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