texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Chapter list for -c CONTENTS_OUTPUT_LOCATION=inli


From: Gavin D. Smith
Subject: branch master updated: Chapter list for -c CONTENTS_OUTPUT_LOCATION=inline
Date: Tue, 21 Dec 2021 16:28:03 -0500

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 d94128e  Chapter list for -c CONTENTS_OUTPUT_LOCATION=inline
d94128e is described below

commit d94128ef20d8f16612fd56615075509959218b11
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue Dec 21 21:27:51 2021 +0000

    Chapter list for -c CONTENTS_OUTPUT_LOCATION=inline
    
    * tp/Texinfo/Convert/HTML.pm (_convert_heading_command):
    Output top-level list of chapters for Top node even if
    CONTENTS_OUTPUT_LOCATION is 'inline'.  If @contents appeared
    at the end of the document, then there would be no list of chapters
    at the start at all, so risk having an unnecessary list.  Suppress
    the list only when CONTENTS_OUTPUT_LOCATION is 'after_top' (the
    default).  Report from Benno Schulenberg 2021-10-18.
---
 ChangeLog                                        | 12 ++++++++++++
 tp/Texinfo/Convert/HTML.pm                       |  6 +-----
 tp/t/results/sectioning/chapter_between_nodes.pl |  3 +++
 tp/t/results/sectioning/contents_in_html_text.pl |  4 ++++
 4 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e518659..67dadf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2021-12-21  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Chapter list for -c CONTENTS_OUTPUT_LOCATION=inline
+
+       * tp/Texinfo/Convert/HTML.pm (_convert_heading_command):
+       Output top-level list of chapters for Top node even if
+       CONTENTS_OUTPUT_LOCATION is 'inline'.  If @contents appeared
+       at the end of the document, then there would be no list of chapters
+       at the start at all, so risk having an unnecessary list.  Suppress
+       the list only when CONTENTS_OUTPUT_LOCATION is 'after_top' (the
+       default).  Report from Benno Schulenberg 2021-10-18.
+
 2021-12-21  Brendan O'Dea  <bod@debian.org>  (tiny change)
 
        * install-info/install-info.c (parse_input): Allocate all
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index e601235..7dbbbdc 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -2821,11 +2821,7 @@ sub _convert_heading_command($$$$$)
   }
   if (not $table_of_contents_was_output
       and $self->get_conf('FORMAT_MENU') eq 'sectiontoc'
-      and $sectioning_commands{$cmdname}
-      and ($cmdname ne 'top'
-           or (not ($self->_has_contents_or_shortcontents()
-                   and $self->get_conf('CONTENTS_OUTPUT_LOCATION')
-                       eq 'inline')))) {
+      and $sectioning_commands{$cmdname}) {
     $result .= _mini_toc($self, $element);
   }
   return $result;
diff --git a/tp/t/results/sectioning/chapter_between_nodes.pl 
b/tp/t/results/sectioning/chapter_between_nodes.pl
index 3edba08..509e1ad 100644
--- a/tp/t/results/sectioning/chapter_between_nodes.pl
+++ b/tp/t/results/sectioning/chapter_between_nodes.pl
@@ -781,6 +781,9 @@ Next: <a href="#section-node" accesskey="n" 
rel="next">section</a> &nbsp; [<a hr
 <p>Top node
 </p>
 
+<ul class="section-toc">
+<li><a href="#Chapter" accesskey="1">Chapter</a></li>
+</ul>
 <div class="chapter" id="Chapter">
 <h2 class="chapter">1 Chapter</h2>
 
diff --git a/tp/t/results/sectioning/contents_in_html_text.pl 
b/tp/t/results/sectioning/contents_in_html_text.pl
index 0fd9ce4..ab2785f 100644
--- a/tp/t/results/sectioning/contents_in_html_text.pl
+++ b/tp/t/results/sectioning/contents_in_html_text.pl
@@ -318,6 +318,10 @@ $result_floats{'contents_in_html_text'} = {};
 $result_converted{'html_text'}->{'contents_in_html_text'} = '<div class="top" 
id="top">
 <h1 class="top">top</h1>
 
+<ul class="section-toc">
+<li><a href="#Chap1" accesskey="1">Chap1</a></li>
+<li><a href="#Chap2" accesskey="2">Chap2</a></li>
+</ul>
 <div class="chapter" id="Chap1">
 <h2 class="chapter">1 Chap1</h2>
 



reply via email to

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