texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Gavin D. Smith
Date: Tue, 1 Aug 2023 10:52:45 -0400 (EDT)

branch: master
commit 65bab3f699fc75a08b08e1f2daa0623f4dabdbcf
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue Aug 1 14:51:01 2023 +0100

    * tp/Texinfo/Convert/Plaintext.pm <AUTO_MENU_DESCRIPTION_FILLCOLUMN>
    If AUTO_MENU_DESCRIPTION_FILLCOLUMN not set, increase the text width
    by 10% as existing Info menus often go beyond 72 columns in width.
---
 ChangeLog                                              | 6 ++++++
 tp/Texinfo/Convert/Plaintext.pm                        | 4 ++++
 tp/t/results/menu/nodedescription_descriptions.pl      | 9 ++++-----
 tp/t/results/menu/nodedescriptionblock_descriptions.pl | 4 ++--
 4 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ab90f58ddf..2ddf24c6ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-08-01  Gavin Smith <gavinsmith0123@gmail.com>
+
+       * tp/Texinfo/Convert/Plaintext.pm <AUTO_MENU_DESCRIPTION_FILLCOLUMN>
+       If AUTO_MENU_DESCRIPTION_FILLCOLUMN not set, increase the text width
+       by 10% as existing Info menus often go beyond 72 columns in width.
+
 2023-08-01  Gavin Smith <gavinsmith0123@gmail.com>
 
        * doc/texinfo.tex (\nodedescription, \nodedescriptionblock):
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 9e63373064..d356209a03 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -3512,6 +3512,10 @@ sub _convert($$)
             if (defined($self->get_conf('AUTO_MENU_DESCRIPTION_FILLCOLUMN'))) {
               $text_element_context->{'max'}
                  = $self->get_conf('AUTO_MENU_DESCRIPTION_FILLCOLUMN');
+            } else {
+              # e.g. 72 -> 79
+              $text_element_context->{'max'}
+                 = int($text_element_context->{'max'} * 1.1);
             }
 
             push @{$self->{'text_element_context'}}, $text_element_context;
diff --git a/tp/t/results/menu/nodedescription_descriptions.pl 
b/tp/t/results/menu/nodedescription_descriptions.pl
index dd04a8bc31..49dd517e9c 100644
--- a/tp/t/results/menu/nodedescription_descriptions.pl
+++ b/tp/t/results/menu/nodedescription_descriptions.pl
@@ -1927,11 +1927,10 @@ 
$result_converted{'plaintext'}->{'nodedescription_descriptions'} = 'test of node
 * name of other: other.        other comes here
 
 * name of last: last. desc of last
-* a somewhat long node without description nor following space:: not as
-                               long as the node
-* a very long node without description with little space left for::
-                               starting the desciption with a somewhat
-                               long word
+* a somewhat long node without description nor following space:: not as long as
+                               the node
+* a very long node without description with little space left for:: starting
+                               the desciption with a somewhat long word
 * very very long node extending past the max columns and without description::
                                Not long
 
diff --git a/tp/t/results/menu/nodedescriptionblock_descriptions.pl 
b/tp/t/results/menu/nodedescriptionblock_descriptions.pl
index 79edb7aaa3..808fb01295 100644
--- a/tp/t/results/menu/nodedescriptionblock_descriptions.pl
+++ b/tp/t/results/menu/nodedescriptionblock_descriptions.pl
@@ -1915,8 +1915,8 @@ 
$result_converted{'plaintext'}->{'nodedescriptionblock_descriptions'} = 'test of
 
                                    a quotation in description
 
-* a somewhat long node without description nor following space:: not as
-                               long as the node
+* a somewhat long node without description nor following space:: not as long as
+                               the node
 * node double nodedescriptionblock:: block desc 1
 
 1 Toto



reply via email to

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