1

Normally, sections encourage LaTeX to \pagebreak so that if e.g. a section is close to the end of a page, it will get pushed onto the next page. I am happy with this behavior, except for one point: \pagebreak can potentially leave a lot of awkward spacing between the paragraphs on the previous page. Therefore, I would prefer to \newpage instead of \pagebreak if the section is going to have any break at all.

Note that:

  • I do NOT want to \newpage unconditionally, but only if the \section would have had a break anyway.

  • I am NOT attempting to alter the amount of text which must appear under a section in order for it to be considered "ok" with respect to page breaks (as asked in previous questions here).

Of course, I could do this manually by just adding \newpage in front of the offending sections. However, this is undesirable because I can only apply to the absolute final text (otherwise the sections may move), and is generally brittle. If there is a way to do this automatically so I can "fire and forget", then I would greatly prefer that.

I am using titlesec in case that makes a difference. I have made no other modifications to how sections are defined.

  • 1
    do you not just want \raggedbottom ? – David Carlisle Dec 5 '14 at 8:59
  • 2
    \vfil\section[title]{title\vadjust{\vfilneg}} – egreg Dec 5 '14 at 9:39

Your Answer

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

Browse other questions tagged or ask your own question.