Document ClassesListings without page breaks?

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
mcarvalho
Posts: 1
Joined: Mon Dec 22, 2008 1:42 pm

Listings without page breaks?

Post by mcarvalho »

I am using the packages listings to depict portions of source code in a tech report. However, I could not find any way of avoiding page breaks inside a listing.

Anyone knows which option avoids page breaks inside listings?

Thank you

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Re: Listings without page breaks?

Post by Juanjo »

To my knowledge, there is not such an option. However, you can put the listing inside a minipage. This will avoid page breaks.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Listings without page breaks?

Post by localghost »

Section 1.4 (Seduce to use, p. 6) of the listings manual describes how to put a caption to a listing and so make it float. Perhaps that helps.


Best regards
Thorsten¹
Post Reply