texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Common.pm (%default_customization_va


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Common.pm (%default_customization_values), (%default_parser_customization_values), (%default_structure_customization_values), * tp/Texinfo/XS/parsetexi/Parsetexi.pm (%parser_default_configuration), (parser), * tp/Texinfo/ParserNonXS.pm (%parser_default_configuration), * tp/texi2any.pl: split %default_customization_values in two, as %default_parser_customization_values and %default_structure_customization_values differentiating parser options and options for Texinfo::Structurin [...]
Date: Tue, 23 Feb 2021 17:40:54 -0500

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

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new ce73f0a  * tp/Texinfo/Common.pm (%default_customization_values), 
(%default_parser_customization_values), 
(%default_structure_customization_values), * 
tp/Texinfo/XS/parsetexi/Parsetexi.pm (%parser_default_configuration), (parser), 
* tp/Texinfo/ParserNonXS.pm (%parser_default_configuration), * tp/texi2any.pl: 
split %default_customization_values in two, as 
%default_parser_customization_values and 
%default_structure_customization_values differentiating parser options and 
options for  [...]
ce73f0a is described below

commit ce73f0a203e8e84b90a4a63614bf96c02038bde1
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Feb 23 23:40:35 2021 +0100

    * tp/Texinfo/Common.pm (%default_customization_values),
    (%default_parser_customization_values),
    (%default_structure_customization_values),
    * tp/Texinfo/XS/parsetexi/Parsetexi.pm (%parser_default_configuration),
    (parser),
    * tp/Texinfo/ParserNonXS.pm (%parser_default_configuration),
    * tp/texi2any.pl:
    split %default_customization_values in two, as
    %default_parser_customization_values and
    %default_structure_customization_values differentiating
    parser options and options for Texinfo::Structuring.
    * tp/Texinfo/Structuring.pm (_complete_check_menus_directions),
    (complete_node_tree_with_menus, nodes_tree),
    * tp/t/test_utils.pl (test), tp/texi2any.pl: rename
    _complete_check_menus_directions() as complete_node_tree_with_menus(),
    call _check_referenced_nodes in that function and do not call
    _complete_check_menus_directions in nodes_tree.
    Call Texinfo::Structuring::set_menus_node_directions() and
    Texinfo::Structuring::complete_node_tree_with_menus() in
    texi2any.pl only if 'FORMAT_MENU' is set to 'menu'.
    * tp/texi2any.pl: call $converter_class->converter_defaults()
    with $cmdline_options argument to pass TEXI2HTML customization
    variable for HTML output.
---
 ChangeLog                                          | 26 ++++++++++++++++++++++
 tp/Texinfo/Common.pm                               | 10 ++++++---
 tp/Texinfo/ParserNonXS.pm                          |  3 ++-
 tp/Texinfo/Structuring.pm                          | 24 ++++++++++++--------
 tp/Texinfo/XS/parsetexi/Parsetexi.pm               |  5 +++--
 tp/t/test_utils.pl                                 |  2 ++
 .../Copying-and-indices.html                       |  5 ++---
 .../index_special_region_html/index.html           |  5 ++---
 .../Copying-and-indices.html                       |  5 ++---
 .../index.html                                     |  5 ++---
 .../Copying-and-indices.html                       |  5 ++---
 .../index_special_region_no_region_html/index.html |  5 ++---
 tp/texi2any.pl                                     | 20 +++++++++++++----
 13 files changed, 83 insertions(+), 37 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8a1195e..449e556 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2021-02-23  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Common.pm (%default_customization_values),
+       (%default_parser_customization_values),
+       (%default_structure_customization_values),
+       * tp/Texinfo/XS/parsetexi/Parsetexi.pm (%parser_default_configuration),
+       (parser),
+       * tp/Texinfo/ParserNonXS.pm (%parser_default_configuration),
+       * tp/texi2any.pl:
+       split %default_customization_values in two, as
+       %default_parser_customization_values and 
+       %default_structure_customization_values differentiating
+       parser options and options for Texinfo::Structuring.
+       * tp/Texinfo/Structuring.pm (_complete_check_menus_directions),
+       (complete_node_tree_with_menus, nodes_tree),
+       * tp/t/test_utils.pl (test), tp/texi2any.pl: rename 
+       _complete_check_menus_directions() as complete_node_tree_with_menus(),
+       call _check_referenced_nodes in that function and do not call
+       _complete_check_menus_directions in nodes_tree.
+       Call Texinfo::Structuring::set_menus_node_directions() and
+       Texinfo::Structuring::complete_node_tree_with_menus() in
+       texi2any.pl only if 'FORMAT_MENU' is set to 'menu'.
+       * tp/texi2any.pl: call $converter_class->converter_defaults()
+       with $cmdline_options argument to pass TEXI2HTML customization
+       variable for HTML output.
+
 2021-02-23  Gavin Smith  <gavinsmith0123@gmail.com>
 
        pretest 6.7.90
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 1987ad0..5b34792 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -140,9 +140,8 @@ our %default_parser_state_configuration = (
 );
 
 
-# Customization variables obeyed by the parser and other modules, and the 
-# default values.
-our %default_customization_values = (
+# Customization variables obeyed by the parser, and the default values.
+our %default_parser_customization_values = (
   'DEBUG' => 0,     # if >= 10, tree is printed in texi2any.pl after parsing.
                     # If >= 100 tree is printed every line.
   'FORMAT_MENU' => 'menu',           # if not 'menu' no menu error related.
@@ -154,6 +153,11 @@ our %default_customization_values = (
   # Texinfo::Common::_convert_text_options
   'ENABLE_ENCODING' => 1,     # output accented and special characters
                               # based on @documentencoding
+);
+
+# Customization variables set in the parser for other modules, and the
+# default values.
+our %default_structure_customization_values = (
   # following are used in Texinfo::Structuring
   'USE_UP_NODE_FOR_ELEMENT_UP' => 0, # Use node up for Up if there is no 
                                      # section up.
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index a0784df..62cbde5 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -105,7 +105,8 @@ sub N__($)
 
 my %parser_default_configuration = (
     %Texinfo::Common::default_parser_state_configuration,
-    %Texinfo::Common::default_customization_values,
+    %Texinfo::Common::default_parser_customization_values,
+    %Texinfo::Common::default_structure_customization_values,
     'clickstyle' => 'arrow',
     'kbdinputstyle' => 'distinct',
     # this is not really used, but this allows to have an 
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index fe36e2f..5a73db8 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -557,9 +557,11 @@ sub _section_direction_associated_node($$)
 # complete automatic directions with menus (and first node
 # for Top node).
 # Checks on structure related to menus.
-sub _complete_check_menus_directions($)
+sub complete_node_tree_with_menus($$)
 {
   my $self = shift;
+  my $top_node = shift;
+
   return undef unless ($self->{'nodes'} and @{$self->{'nodes'}});
   # Go through all the nodes
   foreach my $node (@{$self->{'nodes'}}) {
@@ -684,6 +686,7 @@ sub _complete_check_menus_directions($)
       # FIXME check that node_up is not an external node (except for Top)?
     }
   }
+  _check_referenced_nodes($self, $top_node);
 }
 
 
@@ -785,11 +788,6 @@ sub nodes_tree($)
   $top_node = $self->{'nodes'}->[0] if (!$top_node);
   $self->{'structuring'}->{'top_node'} = $top_node;
 
-  _complete_check_menus_directions($self);
-
-  if ($self->get_conf('FORMAT_MENU') ne 'sectiontoc') {
-    _check_referenced_nodes($self, $top_node);
-  }
   return $top_node;
 }
 
@@ -1711,6 +1709,7 @@ Texinfo::Structuring - information on Texinfo::Parser tree
   my $sections_root = sectioning_structure ($parser, $tree);
   set_menus_node_directions($parser);
   my $top_node = nodes_tree($parser);
+  complete_node_tree_with_menus($parser, $top_node);
   number_floats($parser->floats_information());
   associate_internal_references($parser);
   my $elements;
@@ -1743,9 +1742,10 @@ In most case, it also requires a parser object to do 
that job.  Thanks to
 C<sectioning_structure> the hierarchy of sectioning commands is determined.
 The directions implied by menus are determined with
 C<set_menus_node_directions>.  The node tree is analysed with C<nodes_tree>.
-Floats get their standard numbering with C<number_floats> and internal
-references are matched up with nodes, floats or anchors with
-C<associate_internal_references>.
+Nodes directions are completed with menu directions with
+C<complete_node_tree_with_menus>.  Floats get their standard numbering with
+C<number_floats> and internal references are matched up with nodes, floats or
+anchors with C<associate_internal_references>.
 
 It is also possible to group the top-level contents of the tree, which consist
 in nodes and sectioning commands into elements that group together a node and
@@ -1866,6 +1866,12 @@ Up, next and previous directions for the node.
 
 =back
 
+=item complete_node_tree_with_menus($parser, $top_node)
+
+Complete nodes directions with menu directions.  Check consistency
+of menus, sectionning and nodes direction structures.  Check that
+all the nodes are referenced (in menu, @*ref or node direction).
+
 =item number_floats($float_information)
 
 Number the floats as described in the Texinfo manual.  Sets
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.pm 
b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
index aa578bd..ee88072 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
@@ -51,7 +51,7 @@ sub get_conf($$)
 
 my %parser_default_configuration =
   (%Texinfo::Common::default_parser_state_configuration,
-   %Texinfo::Common::default_customization_values);
+   %Texinfo::Common::default_parser_customization_values);
 
 use Storable qw(dclone); # standard in 5.007003
 
@@ -122,7 +122,8 @@ sub parser (;$$)
       } elsif ($key eq 'DEBUG') {
         set_debug($conf->{$key}) if $conf->{'key'};
       } elsif ($key eq 'in_gdt'
-               or $key eq 'ENABLE_ENCODING') {
+               or $key eq 'ENABLE_ENCODING'
+               or 
defined($Texinfo::Common::default_structure_customization_values{$key})) {
         # no action needed
       } else {
         warn "ignoring parser configuration value \"$key\"\n";
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 399cc2c..8c978a2 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -789,6 +789,8 @@ sub test($$)
   Texinfo::Structuring::set_menus_node_directions($parser);
   my $top_node = Texinfo::Structuring::nodes_tree($parser);
 
+  Texinfo::Structuring::complete_node_tree_with_menus($parser, $top_node);
+
   my ($errors, $error_nrs) = $parser->errors();
   my $index_names = $parser->indices_information();
   # FIXME maybe it would be good to compare $merged_index_entries?
diff --git 
a/tp/tests/indices/res_parser_info/index_special_region_html/Copying-and-indices.html
 
b/tp/tests/indices/res_parser_info/index_special_region_html/Copying-and-indices.html
index 045a80c..cf3e627 100644
--- 
a/tp/tests/indices/res_parser_info/index_special_region_html/Copying-and-indices.html
+++ 
b/tp/tests/indices/res_parser_info/index_special_region_html/Copying-and-indices.html
@@ -22,7 +22,6 @@ domain.
 <link href="index.html" rel="index" title="Top">
 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
 <link href="index.html" rel="up" title="Top">
-<link href="index.html" rel="prev" title="Top">
 <style type="text/css">
 <!--
 a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
@@ -50,7 +49,7 @@ ul.no-bullet {list-style: none}
 <div class="appendix" id="Copying-and-indices">
 <div class="header">
 <p>
-Previous: <a href="index.html" accesskey="p" rel="prev">Top</a>, Up: <a 
href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>][<a href="index.html" title="Index" 
rel="index">Index</a>]</p>
+Up: <a href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>][<a href="index.html" title="Index" 
rel="index">Index</a>]</p>
 </div>
 <span id="Copying-and-indices-1"></span><h2 class="appendix">Appendix A 
Copying and indices</h2>
 
@@ -168,7 +167,7 @@ domain is something you should allready know
 <hr>
 <div class="header">
 <p>
-Previous: <a href="index.html" accesskey="p" rel="prev">Top</a>, Up: <a 
href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>][<a href="index.html" title="Index" 
rel="index">Index</a>]</p>
+Up: <a href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>][<a href="index.html" title="Index" 
rel="index">Index</a>]</p>
 </div>
 
 
diff --git 
a/tp/tests/indices/res_parser_info/index_special_region_html/index.html 
b/tp/tests/indices/res_parser_info/index_special_region_html/index.html
index ac5b109..1317699 100644
--- a/tp/tests/indices/res_parser_info/index_special_region_html/index.html
+++ b/tp/tests/indices/res_parser_info/index_special_region_html/index.html
@@ -21,7 +21,6 @@ domain.
 <link href="#Top" rel="start" title="Top">
 <link href="#Top" rel="index" title="Top">
 <link href="#SEC_Contents" rel="contents" title="Table of Contents">
-<link href="Copying-and-indices.html" rel="next" title="Copying and indices">
 <style type="text/css">
 <!--
 a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
@@ -52,7 +51,7 @@ ul.no-bullet {list-style: none}
 <div class="top" id="Top">
 <div class="header">
 <p>
-Next: <a href="Copying-and-indices.html" accesskey="n" rel="next">Copying and 
indices</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>][<a href="#Top" title="Index" 
rel="index">Index</a>]</p>
+ &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>][<a href="#Top" title="Index" 
rel="index">Index</a>]</p>
 </div>
 <span id="Top-1"></span><h1 class="top">Top</h1>
 <div class="Contents_element" id="SEC_Contents">
@@ -137,7 +136,7 @@ domain is something you should allready know
 <hr>
 <div class="header">
 <p>
-Next: <a href="Copying-and-indices.html" accesskey="n" rel="next">Copying and 
indices</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>][<a href="#Top" title="Index" 
rel="index">Index</a>]</p>
+ &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>][<a href="#Top" title="Index" 
rel="index">Index</a>]</p>
 </div>
 
 
diff --git 
a/tp/tests/indices/res_parser_info/index_special_region_no_insertcopying_html/Copying-and-indices.html
 
b/tp/tests/indices/res_parser_info/index_special_region_no_insertcopying_html/Copying-and-indices.html
index 49faa29..5a6e6bd 100644
--- 
a/tp/tests/indices/res_parser_info/index_special_region_no_insertcopying_html/Copying-and-indices.html
+++ 
b/tp/tests/indices/res_parser_info/index_special_region_no_insertcopying_html/Copying-and-indices.html
@@ -21,7 +21,6 @@ domain.
 <link href="index.html" rel="start" title="Top">
 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
 <link href="index.html" rel="up" title="Top">
-<link href="index.html" rel="prev" title="Top">
 <style type="text/css">
 <!--
 a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
@@ -49,7 +48,7 @@ ul.no-bullet {list-style: none}
 <div class="appendix" id="Copying-and-indices">
 <div class="header">
 <p>
-Previous: <a href="index.html" accesskey="p" rel="prev">Top</a>, Up: <a 
href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
+Up: <a href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
 </div>
 <span id="Copying-and-indices-1"></span><h2 class="appendix">Appendix A 
Copying and indices</h2>
 
@@ -121,7 +120,7 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">Top</a>, Up: <a href="in
 <hr>
 <div class="header">
 <p>
-Previous: <a href="index.html" accesskey="p" rel="prev">Top</a>, Up: <a 
href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
+Up: <a href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
 </div>
 
 
diff --git 
a/tp/tests/indices/res_parser_info/index_special_region_no_insertcopying_html/index.html
 
b/tp/tests/indices/res_parser_info/index_special_region_no_insertcopying_html/index.html
index 08cee4f..e7be0c4 100644
--- 
a/tp/tests/indices/res_parser_info/index_special_region_no_insertcopying_html/index.html
+++ 
b/tp/tests/indices/res_parser_info/index_special_region_no_insertcopying_html/index.html
@@ -20,7 +20,6 @@ domain.
 
 <link href="#Top" rel="start" title="Top">
 <link href="#SEC_Contents" rel="contents" title="Table of Contents">
-<link href="Copying-and-indices.html" rel="next" title="Copying and indices">
 <style type="text/css">
 <!--
 a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
@@ -51,7 +50,7 @@ ul.no-bullet {list-style: none}
 <div class="top" id="Top">
 <div class="header">
 <p>
-Next: <a href="Copying-and-indices.html" accesskey="n" rel="next">Copying and 
indices</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
+ &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
 </div>
 <span id="Top-1"></span><h1 class="top">Top</h1>
 <div class="Contents_element" id="SEC_Contents">
@@ -90,7 +89,7 @@ and titlepage, and various wrong index entries.
 <hr>
 <div class="header">
 <p>
-Next: <a href="Copying-and-indices.html" accesskey="n" rel="next">Copying and 
indices</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
+ &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
 </div>
 
 
diff --git 
a/tp/tests/indices/res_parser_info/index_special_region_no_region_html/Copying-and-indices.html
 
b/tp/tests/indices/res_parser_info/index_special_region_no_region_html/Copying-and-indices.html
index 49faa29..5a6e6bd 100644
--- 
a/tp/tests/indices/res_parser_info/index_special_region_no_region_html/Copying-and-indices.html
+++ 
b/tp/tests/indices/res_parser_info/index_special_region_no_region_html/Copying-and-indices.html
@@ -21,7 +21,6 @@ domain.
 <link href="index.html" rel="start" title="Top">
 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
 <link href="index.html" rel="up" title="Top">
-<link href="index.html" rel="prev" title="Top">
 <style type="text/css">
 <!--
 a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
@@ -49,7 +48,7 @@ ul.no-bullet {list-style: none}
 <div class="appendix" id="Copying-and-indices">
 <div class="header">
 <p>
-Previous: <a href="index.html" accesskey="p" rel="prev">Top</a>, Up: <a 
href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
+Up: <a href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
 </div>
 <span id="Copying-and-indices-1"></span><h2 class="appendix">Appendix A 
Copying and indices</h2>
 
@@ -121,7 +120,7 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">Top</a>, Up: <a href="in
 <hr>
 <div class="header">
 <p>
-Previous: <a href="index.html" accesskey="p" rel="prev">Top</a>, Up: <a 
href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
+Up: <a href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
 </div>
 
 
diff --git 
a/tp/tests/indices/res_parser_info/index_special_region_no_region_html/index.html
 
b/tp/tests/indices/res_parser_info/index_special_region_no_region_html/index.html
index 0964da1..0ba5c45 100644
--- 
a/tp/tests/indices/res_parser_info/index_special_region_no_region_html/index.html
+++ 
b/tp/tests/indices/res_parser_info/index_special_region_no_region_html/index.html
@@ -20,7 +20,6 @@ domain.
 
 <link href="#Top" rel="start" title="Top">
 <link href="#SEC_Contents" rel="contents" title="Table of Contents">
-<link href="Copying-and-indices.html" rel="next" title="Copying and indices">
 <style type="text/css">
 <!--
 a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
@@ -51,7 +50,7 @@ ul.no-bullet {list-style: none}
 <div class="top" id="Top">
 <div class="header">
 <p>
-Next: <a href="Copying-and-indices.html" accesskey="n" rel="next">Copying and 
indices</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
+ &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
 </div>
 <span id="Top-1"></span><h1 class="top">Top</h1>
 
@@ -91,7 +90,7 @@ and titlepage, and various wrong index entries.
 <hr>
 <div class="header">
 <p>
-Next: <a href="Copying-and-indices.html" accesskey="n" rel="next">Copying and 
indices</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
+ &nbsp; [<a href="#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>]</p>
 </div>
 
 
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index 90e5b15..3779f99 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -1070,7 +1070,9 @@ if (defined($formats_table{$format}->{'module'})) {
 
 if (defined($formats_table{$format}->{'module'})) {
   $converter_class = $formats_table{$format}->{'module'};
-  %converter_defaults = $converter_class->converter_defaults();
+  # $cmdline_options is passed to have TEXI2HTML set for conversion to
+  # HTML
+  %converter_defaults = $converter_class->converter_defaults($cmdline_options);
 
   # set FORMAT_MENU to the output format default, if not nomenu
   if (defined(get_conf('FORMAT_MENU'))
@@ -1091,8 +1093,9 @@ if (defined($formats_table{$format}->{'module'})) {
 
 # using no warnings is wrong, but a way to avoid a spurious warning.
 no warnings 'once';
-foreach my $parser_settable_option (
-                keys(%Texinfo::Common::default_customization_values)) {
+my @parser_settable_options = 
keys(%Texinfo::Common::default_parser_customization_values);
+push @parser_settable_options, 
keys(%Texinfo::Common::default_structure_customization_values);
+foreach my $parser_settable_option (@parser_settable_options) {
   if (defined(get_conf($parser_settable_option))) {
     $parser_options->{$parser_settable_option} 
        = get_conf($parser_settable_option);
@@ -1277,8 +1280,17 @@ while(@input_files) {
 
   my $top_node;
   if ($formats_table{$format}->{'nodes_tree'}) {
-    Texinfo::Structuring::set_menus_node_directions($parser);
+
+    # it is not get_conf('FORMAT_MENU') but $parser_options as
+    # $parser_options is set to the output default and then replaced
+    # with get_conf('FORMAT_MENU') is needed
+    if ($parser_options->{'FORMAT_MENU'} eq 'menu') {
+      Texinfo::Structuring::set_menus_node_directions($parser);
+    }
     $top_node = Texinfo::Structuring::nodes_tree($parser);
+    if ($parser_options->{'FORMAT_MENU'} eq 'menu') {
+      Texinfo::Structuring::complete_node_tree_with_menus($parser, $top_node);
+    }
   }
   if ($formats_table{$format}->{'floats'}) {
     Texinfo::Structuring::number_floats($floats);



reply via email to

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