Re: \hrule issue

David Carlisle <[email protected]> Mon, 4 Aug 2025 09:06:30 +0100
Newsgroups gmane.comp.tex.texhax
Message-ID <CAEW6iOiq3mWPMuD3ROkqJHzk0PaE6iRHXuAaLWirPXTWHi1kjA@mail.gmail.com>
TeX does tell you it is doing this:

Underfull \vbox (badness 10000) has occurred while \output is active

reads as "some space is over-stretched"

If you add tracing as in

\tracingoutput1
\tracingonline1
\showboxdepth2

\hrule\vskip.1in

good morning

\vskip.1in\hrule

\eject\end


then you see

Completed box being shipped out [1]
\vbox(667.20255+0.0)x469.75499
.\vbox(0.0+0.0)x469.75499, glue set 14.0fil
..\glue -22.5
..\hbox(8.5+0.0)x469.75499, glue set 469.75499fil []
..\glue 0.0 plus 1.0fil minus 1.0fil
.\vbox(643.20255+0.0)x469.75499, glue set 609.4588
..\glue(\topskip) 9.6
..\rule(0.4+0.0)x*
..\glue 7.22743
..\glue(\parskip) 0.0 plus 1.0
..\hbox(6.94444+1.94444)x469.75499, glue set 389.17148fil []
..etc.
.\glue(\baselineskip) 17.55556
.\hbox(6.44444+0.0)x469.75499, glue set 232.37749fil
..\glue 0.0 plus 1.0fil minus 1.0fil
..\tenrm 1
..\glue 0.0 plus 1.0fil minus 1.0fil

so the two vskip.1in produce exactly the same space but before the text you
have a parskip glue of  opt plus 1pt and as that is the only stretch glue
on the page, that 1pt gets stretched to the page height to fill out the
page.

So to equalize that you could remove the stretch

adding \parskip=0pt  produces

[image: image.png]
but the page is now infinitely under full

Underfull \vbox (badness 10000) has occurred while \output is active


or, as you showed in a later message you could use stretch glue for your
vskips. Or keep the finite vskip but add an additional \vskip\parskip
before the second rule to match the parskip before the text.

David




On Mon, 4 Aug 2025 at 08:19, Rodolfo Medina <[email protected]>
wrote:

> Rodolfo Medina <[email protected]> writes:
>
> > Please help understand how to have the same vertical space instead.
>
> Well, this can be achieved with:
>
>
> -------------------------------------------------------------------------------
> \hrule\vfil
>
> good morning
>
> \vfil\hrule
>
> \eject\end
>
> -------------------------------------------------------------------------------
>
> but I wish to limit that vertical blank space to a desired maximum.
> Substantially, I wish that \vskip.1in *after* \hrule produce the same
> space as
> *before* \hrule: how to do so?
>
> Rodolfo
>
>
image.png (image/png, 2.3 KB) - not displayed