How to prevent strechtability?

Heiko Oberdiek heiko.oberdiek at googlemail.com
Fri Jun 21 13:45:03 CEST 2019


Hello,

On 2019-06-21 13:34, Rodolfo Medina wrote:
> 
> in the following example, to process with simply `tex test', I'd like that
> `hallo' was not so far from the hrule above.  How can I prevent stretchability
> in that place?

>    \hrule\vskip.1in
> hallo
>    \vskip .1in\hrule\vskip 1cm

The stretchability is inserted by \parskip (0pt plus 1pt), when "hallo" 
starts a new paragraph. This can be prevented by locally removing the
stretchable component of \parskip when starting the paragraph for "hallo":

\hrule
\vskip.1in
\begingroup\parskip=0pt \leavevmode\endgroup
hallo
\vskip .1in
\hrule
\vskip 1cm

Yours sincerely
   Heiko


More information about the texhax mailing list