I use a very custom style (not mine) and very frequently I get a heading on the bottom of a page and the next paragraph on the top of the next page. Sometimes this paragraph may be a list or similar. The same is true for listings and the listing description.
- Is there a general way how I can adjust the "badness" of these events?
- Or can I adjust when a section heading would be on the last, say, 3cm of a page it should go to the next page?
- Or can I say, if a *listing description" is on the top 3cm of a page pull 5 more listing lines from the last page onto this page?
The style I use does not use standard structure tags and environments. But lets call them
listing and I will try to migrate them to my lingo.