On Tue, 21 Apr 2009, Jos van Gisbergen wrote:
Hi,
I have a question regarding framed text. To obtain framed verbatim text that breaks over pages, I use the macro \definetextbackground. I have encountered a slight problem, however: sometimes the upper part of the frame appears on the bottom of the page with no text in it (because there's not enough room). The strange thing is that if I comment out the setupcolors macro the problem disappears (in the example that is).
I sometimes use \definetextbackground[....][before={\testpage[3], .. other options .. ] The \testpage[3] checks if there is enough space to put three lines, if not it issues a page break. In most cases this gets rid of the hanging empty text backgrounds at the bottom of a page. Aditya