[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6630] better line breaking for TOC and index
From: |
Gavin D. Smith |
Subject: |
[6630] better line breaking for TOC and index |
Date: |
Thu, 17 Sep 2015 13:45:51 +0000 |
Revision: 6630
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6630
Author: gavin
Date: 2015-09-17 13:45:50 +0000 (Thu, 17 Sep 2015)
Log Message:
-----------
better line breaking for TOC and index
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/texinfo.tex
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-09-17 10:03:26 UTC (rev 6629)
+++ trunk/ChangeLog 2015-09-17 13:45:50 UTC (rev 6630)
@@ -1,5 +1,17 @@
2015-09-16 Gavin Smith <address@hidden>
+ * doc/texinfo.tex (\entry): Use a finite \rightskip to encourage
+ more words onto the earlier lines. Increase \linepenalty and
+ \hyphenpenalty. No interword stretch. Make hanging indent 1em
+ instead of 2em. Use a completely shrinkable space before the
+ page number.
+ (\indexdotfill): Reduce stretchability to balance stretch of
+ \rightskip in previous lines.
+
+(\initial): Move initial slightly to left.
+
+2015-09-16 Gavin Smith <address@hidden>
+
* util/texi2dvi (run_tex_suite): Call xref_files_changed right
after run_core_conversion to avoid one extra generation of the
sorted index files which isn't necessary. Reported by
Modified: trunk/doc/texinfo.tex
===================================================================
--- trunk/doc/texinfo.tex 2015-09-17 10:03:26 UTC (rev 6629)
+++ trunk/doc/texinfo.tex 2015-09-17 13:45:50 UTC (rev 6630)
@@ -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.11}
+\def\texinfoversion{2015-09-17.15}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -5157,7 +5157,7 @@
%
% No shrink because it confuses \balancecolumns.
\vskip 1.67\baselineskip plus 1\baselineskip
- \leftline{\secfonts \secbf #1}%
+ \leftline{\secfonts \kern-0.05em \secbf #1}%
% \secfonts is inside the argument of \leftline so that the change of
% \baselineskip will not affect any glue inserted before the vbox that
% \leftline creates.
@@ -5201,16 +5201,22 @@
% Do not prefer a separate line ending with a hyphen to fewer lines.
\finalhyphendemerits = 0
%
- \linepenalty=400 % Discourage line breaks.
+ % Word spacing - no stretch
+ \spaceskip=\fontdimen2\font minus \fontdimen4\font
%
- % Ragged right margin, but not for the last line with the leaders in it
+ \linepenalty=1000 % Discourage line breaks.
+ \hyphenpenalty=5000 % Discourage hyphenation.
+ %
+ % Ragged right margin, but not for the last line with the leaders in it.
+ % When an index entry spans lines, this stretch competes with the stretch
+ % in \indexdotfill to determine how the line will be split.
\rightskip=\entryrightmargin
- \advance\rightskip by 0pt plus 1fil
+ \advance\rightskip by 0pt plus .6\hsize
%
% \parfillskip is at the end of the line with the page number
\parfillskip=0pt
% Cancel the \rightskip stretch
- \advance \parfillskip by 0pt plus -1fil
+ \advance \parfillskip by 0pt plus -.6\hsize
% Determine how far we can stretch into the margin.
% This allows, e.g., "Appendix H GNU Free Documentation License" to fit
% on one line.
@@ -5243,10 +5249,10 @@
\null\nobreak\indexdotfill % Have leaders before the page number.
%
\ifpdf
- \pdfgettoks#1.%
- \thinspace\the\toksA
+ \pdfgettoks#1.%
+ \hskip\skip\thinshrinkable\the\toksA
\else
- \thinspace#1%
+ \hskip\skip\thinshrinkable #1%
\fi
\fi
% Parameters for formatting this paragraph, reset for each paragraph.
@@ -5258,7 +5264,7 @@
% lines. So we use a small indentation and put up with long leaders.
%
\hangafter = 1
- \hangindent = 2em
+ \hangindent = 1em
\par
\egroup % The \vtop
\endgroup
@@ -5267,6 +5273,9 @@
\entryorphanpenalty
}
+\newskip\thinshrinkable
+\skip\thinshrinkable=.15em minus .15em
+
\newbox\entryindexbox
\def\insertindexentrybox{%
\lineskip=0.8ex % This comes into effect when the \vtop has a large depth
@@ -5295,11 +5304,11 @@
\egroup % now comes the box added with \aftergroup
}
-% Like plain.tex's \dotfill, except uses up at least 1.2 em.
+% Like plain.tex's \dotfill, except uses up at least 1 em.
% Using a finite stretch encourages several words to appear on a second line
% if the entry is broken.
\def\indexdotfill{\cleaders
- \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1.2em plus 1\hsize}
+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus .4\hsize}
\def\primary #1{\line{#1\hfil}}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6630] better line breaking for TOC and index,
Gavin D. Smith <=