[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `@need` badly influences top margin
From: |
Gavin Smith |
Subject: |
Re: `@need` badly influences top margin |
Date: |
Thu, 18 Aug 2022 23:09:53 +0100 |
On Thu, Aug 18, 2022 at 06:57:21PM +0100, Gavin Smith wrote:
> One possible fix is to replace the \vtop with vertical glue:
It wasn't as simple as that but I've made the change to use vertical
glue and penalties only (following LaTeX 'needspace'). I've committed
it and will upload shortly.
It seems to fix the footnote test case you sent as well!
Now when @need does not have enough space, there is a gap left at
the bottom of the page, which is preferable to the rest of the page
being stretched down to fit.
I concluded that the approach with a vbox couldn't be made to work
perfectly. I tried an approach with ending with a special penalty
value and checking for this value elsewhere, which nearly worked,
but wasn't perfect (although satisfactory) because \strut could be
slightly too small when the font changed.