0

I understand why it is difficult to enforce the left and right margins in LaTeX and there are lots of helpful answers here about stopping text from spilling over into the right margin. I have also seen helpful answers about using \flushbottom to make sure that text runs all the way to the bottom margin. But is there a way to make sure that text never spills into the bottom margin? I have noticed that sometimes the last line of a footnote goes into the margin. In case it matters, I am using the geometry package to set the margins.

  • 1
    There are penalties that can be adjusted, but the default is to allow some overlap. Also, the rule is to align the bottom baseline to the margin, which causes descenders to overlap. You could add some glue to \baselineskip (sort of like \sloppy). – John Kormylo Dec 22 '22 at 05:15
  • Thanks @JohnKormylo. Can you point me to the right penalty(ies)? I have not been able to find one for lines into the margin generically (only ones I could manually input at particular places to stop/force page breaks at specific points to avoid overflow). – bbernicker Dec 23 '22 at 22:28
  • \pagebreak uses \penalty. There is also \widowpenalty and \clubpenalty. – John Kormylo Dec 23 '22 at 23:14
  • Thanks @JohnKormylo. I am familiar with all of those penalties, but I do not understand how I could use them to stop text from flowing into the bottom margin. I understand that I could manually set a penalty to force a break in a specific place to prevent that text from flowing into the margin, but is there any way to automatically enforce a strict bottom margin? – bbernicker Dec 27 '22 at 14:30
  • Not against unbreakable boxes without creating ugly gaps.. Try \advance\baselineskip by 0pt plus 1pt\relax ), or 0pt plus 1fil. – John Kormylo Dec 27 '22 at 17:40
  • Thanks John. This still is not working for me. I still get footnotes overflowing into the margins. Is there a way to make the page box unbreakable? For my application, that would be preferable even to creating ugly gaps. – bbernicker Jan 22 '23 at 23:26
  • Unless you provide a Minimal Working Example (MWE) we can only guess as to the nature of the problem. Anyway, footnotes are a separate problem. – John Kormylo Jan 23 '23 at 04:11

0 Answers0