[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6633] pre-environment penalty
From: |
Gavin D. Smith |
Subject: |
[6633] pre-environment penalty |
Date: |
Sat, 19 Sep 2015 13:05:25 +0000 |
Revision: 6633
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6633
Author: gavin
Date: 2015-09-19 13:05:24 +0000 (Sat, 19 Sep 2015)
Log Message:
-----------
pre-environment penalty
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/texinfo.tex
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-09-18 13:06:00 UTC (rev 6632)
+++ trunk/ChangeLog 2015-09-19 13:05:24 UTC (rev 6633)
@@ -1,5 +1,13 @@
2015-09-18 Gavin Smith <address@hidden>
+ * doc/texinfo.tex (\afterenvbreak): Copy from \aboveenvbreak.
+ (\aboveenvbreak): Insert a penalty for page breaking above
+ environment, instead of a bonus.
+
+ (\insertindexentrybox): Set \lineskip with stretch.
+
+2015-09-18 Gavin Smith <address@hidden>
+
* util/texi2dvi: Don't exempt mingw and djgpp from using ; as a
path separator. Suggested by Eli Zaretskii.
Modified: trunk/doc/texinfo.tex
===================================================================
--- trunk/doc/texinfo.tex 2015-09-18 13:06:00 UTC (rev 6632)
+++ trunk/doc/texinfo.tex 2015-09-19 13:05:24 UTC (rev 6633)
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2015-09-17.15}
+\def\texinfoversion{2015-09-20.15}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -5195,7 +5195,7 @@
\vskip 0pt plus0.5pt
%
% Badness calculation for paragraph affected by -
- % How much \indexdotfill is stretched, or how much \pafillskip is shrunk
+ % How much \indexdotfill is stretched, or how much \parfillskip is shrunk
% Number of lines (\linepenalty)
%
% Do not prefer a separate line ending with a hyphen to fewer lines.
@@ -5278,8 +5278,9 @@
\newbox\entryindexbox
\def\insertindexentrybox{%
-\lineskip=0.8ex % This comes into effect when the \vtop has a large depth
- % due to the paragraph in it having several lines.
+\lineskip=.8ex plus .6ex % This comes into effect when the \vtop has a large
+ % depth due to the paragraph in it having several
+ % lines.
\box\entryindexbox}
% Default is no penalty
@@ -6626,6 +6627,24 @@
\endgraf
\ifdim\lastskip<\envskipamount
\removelastskip
+ \ifnum\lastpenalty<10000
+ % Penalize breaking before the environment, because preceding text
+ % often leads into it.
+ \penalty100
+ \fi
+ \vskip\envskipamount
+ \fi
+ \fi
+}}
+
+\def\afterenvbreak{{%
+ % =10000 instead of <10000 because of a special case in \itemzzz and
+ % \sectionheading, q.v.
+ \ifnum \lastpenalty=10000 \else
+ \advance\envskipamount by \parskip
+ \endgraf
+ \ifdim\lastskip<\envskipamount
+ \removelastskip
% it's not a good place to break if the last penalty was \nobreak
% or better ...
\ifnum\lastpenalty<10000 \penalty-50 \fi
@@ -6634,8 +6653,6 @@
\fi
}}
-\let\afterenvbreak = \aboveenvbreak
-
% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
% also clear it, so that its embedded environments do the narrowing again.
\let\nonarrowing=\relax
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6633] pre-environment penalty,
Gavin D. Smith <=