bug-texinfo
[Top][All Lists]
Advanced

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

Re: comments on texinfo.tex changes


From: Karl Berry
Subject: Re: comments on texinfo.tex changes
Date: Wed, 24 Sep 2003 14:04:45 -0400

This avoids page breaks between the defun heading line and its
description (with intervening index commands -- complications,
complications).  Please report if you find any bad page breaks.

I've updated texinfo.tex in gnulib, tug.org, etc., everywhere but
ftp.gnu.org since we still have no way to release there without
bothering address@hidden

Thanks,
k

*** texinfo.tex.~1.91.~ Wed Sep 24 08:14:58 2003
--- texinfo.tex Wed Sep 24 10:44:34 2003
***************
*** 3214,3220 ****
--- 3214,3223 ----
        %
        \iflinks
          \ifvmode
+           % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
            \skip0 = \lastskip
+           \count255 = \lastpenalty
+           %
            % If \lastskip is nonzero, that means the last item was a
            % skip.  And since a skip is discardable, that means this
            % -\skip0 glue we're inserting is preceded by a
***************
*** 3223,3233 ****
            \ifdim\lastskip = 0pt \else \vskip-\skip0 \fi
          \fi
          %
!         \temp % do the write
          %
!         % Since this glue would be preceded by a non-discardable item
!         % (the whatsit from the \write), we must insert a \nobreak.
!         \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi
        \fi
      }%
    }%
--- 3226,3253 ----
            \ifdim\lastskip = 0pt \else \vskip-\skip0 \fi
          \fi
          %
!         \temp  % do the write
          %
!         \ifvmode
!            \ifdim\skip0 = 0pt
!              % if \lastskip was zero, perhaps the last item was a
!              % penalty, and perhaps it was >=10000, e.g., a \nobreak.
!              % In that case, we want to re-insert the penalty; since we
!              % just inserted a non-discardable item, any following glue
!              % (such as a \parskip) would be a breakpoint.  For example:
!              %   @deffn deffn-whatever
!              %   @vindex index-whatever
!              %   Description.
!              % would allow a break between the index-whatever whatsit
!              % and the "Description." paragraph.
!              \ifnum\count255>9999 \nobreak \fi
!            \else
!              % On the other hand, if we had a nonzero \lastskip,
!              % this make-up glue would be preceded by a non-discardable item
!              % (the whatsit from the \write), we must insert a \nobreak.
!              \nobreak\vskip\skip0
!            \fi
!         \fi
        \fi
      }%
    }%
***************
*** 4116,4121 ****
--- 4136,4149 ----
    % glue accumulate.  (Not a breakpoint because it's preceded by a
    % discardable item.)
    \vskip-\parskip
+   %
+   % This \nobreak is purely so the last item on the list is a \penalty
+   % of 10000.  This is so other code, for instance \parsebodycommon, can
+   % check for and avoid allowing breakpoints.  Otherwise, it would
+   % insert a valid breakpoint between:
+   %   @section sec-whatever
+   %   @deffn def-whatever
+   \nobreak
  }
  
  
***************
*** 5044,5050 ****
    % commands insert a \penalty10000, and we don't want to allow a break
    % between a section heading and a defun.
    \ifnum\lastpenalty=10002 \penalty0 \fi
!   \medbreak
    %
    % Define the \E... end token that this defining construct specifies
    % so that it will exit this group.
--- 5072,5083 ----
    % commands insert a \penalty10000, and we don't want to allow a break
    % between a section heading and a defun.
    \ifnum\lastpenalty=10002 \penalty0 \fi
!   %
!   % Similarly, after a section heading, do not allow a break.
!   % But do insert the glue.
!   \ifnum\lastpenalty<10000 \medbreak
!   \else \medskip  % preceded by discardable penalty, so not a breakpoint
!   \fi
    %
    % Define the \E... end token that this defining construct specifies
    % so that it will exit this group.




reply via email to

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