bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: '@need' command buggy since 2022-08-21.14


From: Gavin Smith
Subject: Re: '@need' command buggy since 2022-08-21.14
Date: Tue, 29 Nov 2022 21:54:21 +0000

On Tue, Nov 29, 2022 at 05:29:47PM +0100, Vincent Lefevre wrote:
> Consider the following testcase:
> 
> \input texinfo    @c -*-texinfo-*-
> @afourpaper
> @page
> A
> @sp 31
> B
> @need 800
> C
> @sp 17
> D
> @bye
> 
> to be compiled with texi2pdf. As of texinfo.tex 2022-08-21.14[*],
> the output is incorrect: more than 3 inches remain after line B on
> the first page, but line C appears on a new page while "@need 800"
> requires only 8/10 inches.
> 
> [*] 2792b176c5a783a6616635be068447e0448d0a55

A page break is allowed at the bottom of the page if there is not much
space left, but whether one happens or not depends on TeX's page
breaking algorithm.  It is not currently the case that no more than
exactly the @need amount will be left at the bottom of the page.

It's possible to make this page break less likely, e.g. with

diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 6b39021567..e819dfd462 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -702,9 +702,9 @@ where each line of input produces a line of output.}
     % when followed by a section heading, as it was not a "discardable item".
     % This also has the benefit of providing glue before the page break if
     % there isn't enough space.)
-    \vskip0pt plus \dimen0
+    \vskip0pt plus .5\dimen0
     \penalty-100
-    \vskip0pt plus -\dimen0
+    \vskip0pt plus -.5\dimen0
     \vskip \dimen0
     \penalty9999
     \vskip -\dimen0

(or even removing the three lines 

     \vskip0pt plus \dimen0
     \penalty-100
     \vskip0pt plus -\dimen0

completely).  However, I would like to test it with different inputs.

As seen in the comments and ChangeLog message for the above commit, @need
was "buggy" even before this change.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]