texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Simplify toc/index entry formatting


From: Gavin D. Smith
Subject: branch master updated: Simplify toc/index entry formatting
Date: Tue, 19 Sep 2023 15:56:46 -0400

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 2f5fbe3265 Simplify toc/index entry formatting
2f5fbe3265 is described below

commit 2f5fbe3265d955657a63701613c83c71a27260d7
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue Sep 19 20:56:36 2023 +0100

    Simplify toc/index entry formatting
    
    * doc/texinfo.tex (\entry): Eliminate code allowing stretching
    into the margins, as it complicates the code and was questionable
    whether this was a good idea in the first place.  Do not hardcode
    70:30 ratio for splitting text across multiple lines.
---
 ChangeLog       |  9 +++++++++
 doc/texinfo.tex | 31 +------------------------------
 2 files changed, 10 insertions(+), 30 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 83310408dd..a287608fe5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-09-19  Gavin Smith <gavinsmith0123@gmail.com>
+
+       Simplify toc/index entry formatting
+
+       * doc/texinfo.tex (\entry): Eliminate code allowing stretching
+       into the margins, as it complicates the code and was questionable
+       whether this was a good idea in the first place.  Do not hardcode
+       70:30 ratio for splitting text across multiple lines.
+
 2023-09-17  Patrice Dumas <pertusus@free.fr>
 
        * tp/tests/many_input_files/different_encodings.sh: skip test if
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index cc562fc8e0..c96d4d7b28 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -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{2023-09-12.17}
+\def\texinfoversion{2023-09-19.19}
 %
 % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
 %
@@ -5652,42 +5652,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
       \parfillskip=0pt plus -1fill
       %
       \advance\rightskip by \entryrightmargin
-      % Determine how far we can stretch into the margin.
-      % This allows, e.g., "Appendix H  GNU Free Documentation License" to
-      % fit on one line in @letterpaper format.
-      \ifdim\entryrightmargin>1.5em
-        \dimen@i=1.5em
-      \else
-        \dimen@i=0em
-      \fi
-      \advance \parfillskip by 0pt minus 1\dimen@i
       %
       \dimen@ii = \hsize
       \advance\dimen@ii by -1\leftskip
       \advance\dimen@ii by -1\entryrightmargin
-      \advance\dimen@ii by 1\dimen@i
       \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line
       \ifdim\dimen@ > 0.8\dimen@ii   % due to long index text
-        % Undo changes above
-        \advance \parfillskip by 0pt minus -1\dimen@i
-        \advance\dimen@ii by -1\dimen@i
-        %
-        % Try to split the text roughly evenly.  \dimen@ will be the length of 
-        % the first line.
-        \dimen@ = 0.7\dimen@
-        \dimen@ii = \hsize
-        \ifnum\dimen@>\dimen@ii
-          % If the entry is too long (for example, if it needs more than
-          % two lines), use the same line length for all lines.
-          \dimen@ = \dimen@ii
-        \else
-          \advance \dimen@ by 1\rightskip
-        \fi
         \advance\leftskip by 0pt plus 1fill % ragged right
-        \parshape = 2 0pt \dimen@ 0em \dimen@ii
-        % Ideally we'd add a finite glue at the end of the first line only,
-        % instead of using \parshape with explicit line lengths, but TeX
-        % doesn't seem to provide a way to do such a thing.
         %
         % Indent all lines but the first one.
         \advance\leftskip by \entrycontskip



reply via email to

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