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 (%sectioning_heading_comma


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Common.pm (%sectioning_heading_commands), tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm, tp/Texinfo/Convert/Texinfo.pm (root_heading_command_to_texinfo), tp/Texinfo/Convert/Text.pm, tp/Texinfo/ParserNonXS.pm, tp/Texinfo/Structuring.pm, tp/Texinfo/Transformations.pm, tp/init/book.pm: rename %sectioning_commands in Texinfo::Common as %sectioning_heading_commands and root_element_command_to_texinfo() as roo [...]
Date: Sun, 06 Feb 2022 11:14:38 -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 5fd141839c * tp/Texinfo/Common.pm (%sectioning_heading_commands), 
tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, 
tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm, 
tp/Texinfo/Convert/Texinfo.pm (root_heading_command_to_texinfo), 
tp/Texinfo/Convert/Text.pm, tp/Texinfo/ParserNonXS.pm, 
tp/Texinfo/Structuring.pm, tp/Texinfo/Transformations.pm, tp/init/book.pm: 
rename %sectioning_commands in Texinfo::Common as %sectioning_heading_commands 
and root_element_comman [...]
5fd141839c is described below

commit 5fd141839cda52af9859a451b1b5750d487eb9d8
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Feb 6 17:14:26 2022 +0100

    * tp/Texinfo/Common.pm (%sectioning_heading_commands),
    tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm,
    tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm,
    tp/Texinfo/Convert/Texinfo.pm (root_heading_command_to_texinfo),
    tp/Texinfo/Convert/Text.pm, tp/Texinfo/ParserNonXS.pm,
    tp/Texinfo/Structuring.pm, tp/Texinfo/Transformations.pm,
    tp/init/book.pm:
    rename %sectioning_commands in Texinfo::Common as
    %sectioning_heading_commands and root_element_command_to_texinfo() as
    root_heading_command_to_texinfo() in Texinfo::Convert::Texinfo.
---
 ChangeLog                       | 13 +++++++++++++
 tp/Texinfo/Common.pm            | 16 ++++------------
 tp/Texinfo/Convert/DocBook.pm   |  2 +-
 tp/Texinfo/Convert/HTML.pm      | 18 +++++++++---------
 tp/Texinfo/Convert/LaTeX.pm     | 15 +++++++++++----
 tp/Texinfo/Convert/Plaintext.pm |  6 +++---
 tp/Texinfo/Convert/Texinfo.pm   |  8 ++++----
 tp/Texinfo/Convert/Text.pm      |  2 +-
 tp/Texinfo/ParserNonXS.pm       |  8 ++++----
 tp/Texinfo/Structuring.pm       |  4 ++--
 tp/Texinfo/Transformations.pm   | 19 ++++++++++++-------
 tp/init/book.pm                 |  9 +++++----
 12 files changed, 69 insertions(+), 51 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3019207549..16f604959f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2022-02-06  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Common.pm (%sectioning_heading_commands),
+       tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm,
+       tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm,
+       tp/Texinfo/Convert/Texinfo.pm (root_heading_command_to_texinfo),
+       tp/Texinfo/Convert/Text.pm, tp/Texinfo/ParserNonXS.pm,
+       tp/Texinfo/Structuring.pm, tp/Texinfo/Transformations.pm,
+       tp/init/book.pm:
+       rename %sectioning_commands in Texinfo::Common as
+       %sectioning_heading_commands and root_element_command_to_texinfo() as
+       root_heading_command_to_texinfo() in Texinfo::Convert::Texinfo.
+
 2022-02-06  Patrice Dumas  <pertusus@free.fr>
 
        * doc/tp_api/Makefile.am: the documentation is referred to in
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 762e7bc0b3..74c2f837f8 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -1068,7 +1068,7 @@ our %level_to_structuring_command;
 }
 
 
-our %sectioning_commands;
+our %sectioning_heading_commands;
 
 foreach my $sectioning_command (keys (%command_structuring_level)) {
   $line_commands{$sectioning_command} = 'line';
@@ -1077,7 +1077,7 @@ foreach my $sectioning_command (keys 
(%command_structuring_level)) {
   } else {
     $root_commands{$sectioning_command} = 1;
   }
-  $sectioning_commands{$sectioning_command} = 1;
+  $sectioning_heading_commands{$sectioning_command} = 1;
 }
 
 
@@ -1087,7 +1087,7 @@ foreach my $sectioning_command (keys 
(%command_structuring_level)) {
 our %formatted_misc_commands;
 foreach my $formatted_misc_command ('center', 'page',
    'author', 'subtitle', 'title', 'exdent', 'headitem', 'item',
-   'itemx', 'tab', 'node', keys(%sectioning_commands)) {
+   'itemx', 'tab', 'node', keys(%sectioning_heading_commands)) {
   $formatted_misc_commands{$formatted_misc_command} = 1;
 }
 
@@ -2971,7 +2971,7 @@ C<@r> or C<@slanted>.
 Commands that are at the root of a Texinfo document, namely
 C<@node> and sectioning commands, except heading commands.
 
-=item %sectioning_commands
+=item %sectioning_heading_commands
 
 All the sectioning and heading commands.
 
@@ -3071,14 +3071,6 @@ Return a contents array reference with first parenthesis 
in the
 contents array reference protected.  If I<$contents> is undef
 a fatal error with a backtrace will be emitted.
 
-=item protect_hashchar_at_line_beginning($registrar, 
$configuration_information, $tree)
-
-Protect hash character at beginning of line if the line is a cpp
-line directive.  The I<$registrar> and I<$configuration_information>
-arguments may be undef, if they are defined they are used for
-error reporting in case an hash character could not be protected
-because it appeared in a raw environment.
-
 =item relate_index_entries_to_table_entries_in_tree($tree)
 
 In @*table @-commands, reassociate the index entry information from an index
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index 152b6da240..5583a81599 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -680,7 +680,7 @@ sub _convert($$;$)
               and !Texinfo::Common::is_content_empty($element)) {
             $result .= "<partintro>\n";
           }
-        } elsif ($Texinfo::Common::sectioning_commands{$element->{'cmdname'}}) 
{
+        } elsif 
($Texinfo::Common::sectioning_heading_commands{$element->{'cmdname'}}) {
           if ($element->{'args'} and $element->{'args'}->[0]) {
             my ($arg, $end_line) = 
$self->_convert_argument_and_end_line($element);
             $result .= 
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 3021bd6a76..9749446364 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -80,7 +80,7 @@ my %formattable_misc_commands = 
%Texinfo::Common::formattable_misc_commands;
 my %no_brace_commands = %Texinfo::Common::no_brace_commands;
 my %accent_commands = %Texinfo::Common::accent_commands;
 my %misc_commands = %Texinfo::Common::misc_commands;
-my %sectioning_commands = %Texinfo::Common::sectioning_commands;
+my %sectioning_heading_commands = 
%Texinfo::Common::sectioning_heading_commands;
 my %def_commands = %Texinfo::Common::def_commands;
 my %ref_commands = %Texinfo::Common::ref_commands;
 my %brace_commands = %Texinfo::Common::brace_commands;
@@ -596,7 +596,7 @@ sub _get_target($$)
   } elsif ($command->{'cmdname'}
     # This should only happen for @*heading*, root_commands targets should
     # already be set.
-            and $sectioning_commands{$command->{'cmdname'}}
+            and $sectioning_heading_commands{$command->{'cmdname'}}
             and !$root_commands{$command->{'cmdname'}}) {
     $target = $self->_new_sectioning_command_target($command);
   }
@@ -3454,7 +3454,7 @@ sub _default_format_element_header($$$$)
                    and 
$self->element_is_tree_unit_top($tree_unit->{'structure'}->{'unit_prev'}));
 
     print STDERR "Header ($previous_is_top, $is_top, $first_in_page): "
-      
.Texinfo::Convert::Texinfo::root_element_command_to_texinfo($command)."\n"
+      
.Texinfo::Convert::Texinfo::root_heading_command_to_texinfo($command)."\n"
         if ($self->get_conf('DEBUG'));
 
     if ($is_top) {
@@ -3570,7 +3570,7 @@ sub _convert_heading_command($$$$$)
   }
 
   print STDERR "CONVERT elt heading $element "
-        
.Texinfo::Convert::Texinfo::root_element_command_to_texinfo($element)."\n"
+        
.Texinfo::Convert::Texinfo::root_heading_command_to_texinfo($element)."\n"
           if ($self->get_conf('DEBUG'));
   my $tree_unit;
   if ($Texinfo::Common::root_commands{$element->{'cmdname'}}
@@ -3651,7 +3651,7 @@ sub _convert_heading_command($$$$$)
   if ($do_heading) {
     if ($self->get_conf('TOC_LINKS')
         and $Texinfo::Common::root_commands{$cmdname}
-        and $Texinfo::Common::sectioning_commands{$cmdname}) {
+        and $Texinfo::Common::sectioning_heading_commands{$cmdname}) {
       my $content_href = $self->command_contents_href($element, 'contents');
       if ($content_href ne '') {
         $heading = "<a href=\"$content_href\">$heading</a>";
@@ -3699,13 +3699,13 @@ sub _convert_heading_command($$$$$)
   }
   if (not $table_of_contents_was_output
       and $self->get_conf('FORMAT_MENU') eq 'sectiontoc'
-      and $sectioning_commands{$cmdname}) {
+      and $Texinfo::Common::sectioning_heading_commands{$cmdname}) {
     $result .= _mini_toc($self, $element);
   }
   return $result;
 }
 
-foreach my $command (keys(%sectioning_commands), 'node') {
+foreach my $command (keys(%sectioning_heading_commands), 'node') {
   $default_commands_conversion{$command} = \&_convert_heading_command;
 }
 
@@ -7286,7 +7286,7 @@ sub _new_sectioning_command_target($$)
   # These are undefined if the $target is set to ''.
   my $target_contents;
   my $target_shortcontents;
-  if ($Texinfo::Common::sectioning_commands{$command->{'cmdname'}}) {
+  if ($sectioning_heading_commands{$command->{'cmdname'}}) {
     if ($target ne '') {
       my $target_base_contents = $target;
       $target_base_contents =~ s/^g_t//;
@@ -7392,7 +7392,7 @@ sub _set_root_commands_targets_node_files($$)
         # The target may already be set for the top node tree unit.
         next if (!defined($root_element->{'cmdname'})
                  or $self->{'targets'}->{$root_element});
-        if ($Texinfo::Common::sectioning_commands{$root_element->{'cmdname'}}) 
{
+        if ($sectioning_heading_commands{$root_element->{'cmdname'}}) {
           $self->_new_sectioning_command_target($root_element);
         }
       }
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index dd3cd7f3ca..09a0ee9797 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -76,6 +76,12 @@
 #
 #   \mbox{-}\nobreak\hspace{0pt}
 #
+# Note that the texinfo.tex code do more, for instance turs off normal
+# hyphenation, sets plainfrenchspacing (see \tclose), and sets line breaks
+# at _ and - with several special cases, such as no break right after one
+# or two hyphen, no breake between __ or hyphen.  See near \global\def\code
+# in texinfo.tex.
+#
 #
 # RELEVANT BUT NOT DECISIVE
 #
@@ -222,7 +228,7 @@ foreach my $command (keys 
(%Texinfo::Common::brace_commands)) {
 }
 my %accent_commands = %Texinfo::Common::accent_commands;
 my %misc_commands = %Texinfo::Common::misc_commands;
-my %sectioning_commands = %Texinfo::Common::sectioning_commands;
+my %sectioning_heading_commands = 
%Texinfo::Common::sectioning_heading_commands;
 my %def_commands = %Texinfo::Common::def_commands;
 my %ref_commands = %Texinfo::Common::ref_commands;
 my %block_commands = %Texinfo::Common::block_commands;
@@ -2044,8 +2050,9 @@ sub _convert($$)
          or (defined($type) and $type eq 'ignored_top_node_paragraph')) {
       delete $self->{'formatting_context'}->[-1]->{'in_skipped_node_top'};
     }
-    elsif (! defined($cmdname) or (not ($informative_commands{$cmdname}
-                                        or $sectioning_commands{$cmdname}))) {
+    elsif (! defined($cmdname)
+           or (not ($informative_commands{$cmdname}
+                    or $sectioning_heading_commands{$cmdname}))) {
       return '';
     }
   }
@@ -2885,7 +2892,7 @@ sub _convert($$)
           $result .= "\\label{$node_label}%\n";
         }
       }
-    } elsif ($sectioning_commands{$cmdname}) {
+    } elsif ($sectioning_heading_commands{$cmdname}) {
       if ($cmdname eq 'appendix' and not $self->{'appendix_done'}) {
         $result .= "\\appendix\n";
         $self->{'appendix_done'} = 1;
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index a58d580e0b..9fad4ac035 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -88,7 +88,7 @@ foreach my $command (keys (%Texinfo::Common::brace_commands)) 
{
 }
 my %accent_commands = %Texinfo::Common::accent_commands;
 my %misc_commands = %Texinfo::Common::misc_commands;
-my %sectioning_commands = %Texinfo::Common::sectioning_commands;
+my %sectioning_heading_commands = 
%Texinfo::Common::sectioning_heading_commands;
 my %def_commands = %Texinfo::Common::def_commands;
 my %ref_commands = %Texinfo::Common::ref_commands;
 my %block_commands = %Texinfo::Common::block_commands;
@@ -2437,7 +2437,7 @@ sub _convert($$)
       $self->{'current_node'} = $element;
       $result .= $self->format_node($element);
       $self->{'format_context'}->[-1]->{'paragraph_count'} = 0;
-    } elsif ($sectioning_commands{$command}) {
+    } elsif ($sectioning_heading_commands{$command}) {
       # use settitle for empty @top
       # ignore @part
       my $contents;
@@ -3247,7 +3247,7 @@ sub _convert($$)
     } elsif (($command eq 'multitable')) {
       $self->{'document_context'}->[-1]->{'in_multitable'}--;
     } elsif ($root_commands{$command}
-        and $sectioning_commands{$command}
+        and $sectioning_heading_commands{$command}
         and $command ne 'part') {
       # add menu if missing
       my $node = $self->{'current_node'};
diff --git a/tp/Texinfo/Convert/Texinfo.pm b/tp/Texinfo/Convert/Texinfo.pm
index 00e9cbdb19..ec513b610a 100644
--- a/tp/Texinfo/Convert/Texinfo.pm
+++ b/tp/Texinfo/Convert/Texinfo.pm
@@ -47,8 +47,8 @@ my %brace_commands           = 
%Texinfo::Common::brace_commands;
 my %block_commands           = %Texinfo::Common::block_commands;
 my %def_commands             = %Texinfo::Common::def_commands;
 
-# used in root_element_command_to_texinfo
-my %sectioning_commands = %Texinfo::Common::sectioning_commands;
+# used in root_heading_command_to_texinfo
+my %sectioning_heading_commands = 
%Texinfo::Common::sectioning_heading_commands;
 
 my @ignored_types = ('spaces_inserted', 'bracketed_inserted',
 'command_as_argument_inserted');
@@ -73,14 +73,14 @@ sub node_extra_to_texi($)
 }
 
 # for debugging.
-sub root_element_command_to_texinfo($)
+sub root_heading_command_to_texinfo($)
 {
   my $element = shift;
   my $tree;
   if ($element->{'cmdname'}) {
     if ($element->{'cmdname'} eq 'node') {
       $tree = $element->{'extra'}->{'node_content'};
-    } elsif ($sectioning_commands{$element->{'cmdname'}}) {
+    } elsif ($sectioning_heading_commands{$element->{'cmdname'}}) {
       $tree = $element->{'args'}->[0]->{'contents'};
     }
   } else {
diff --git a/tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm
index f561bb0e7a..b1819070df 100644
--- a/tp/Texinfo/Convert/Text.pm
+++ b/tp/Texinfo/Convert/Text.pm
@@ -535,7 +535,7 @@ sub _convert($;$)
         } else {
           $result = _convert($element->{'args'}->[0], $options);
         }
-        if ($Texinfo::Common::sectioning_commands{$element->{'cmdname'}}) {
+        if 
($Texinfo::Common::sectioning_heading_commands{$element->{'cmdname'}}) {
           $result = heading($element, $result, $options->{'converter'},
                             $options->{'NUMBER_SECTIONS'});
         } else {
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 025a682148..8278d83778 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -257,7 +257,7 @@ my %item_container_commands   = 
%Texinfo::Common::item_container_commands;
 my %item_line_commands        = %Texinfo::Common::item_line_commands;
 my %deprecated_commands       = %Texinfo::Common::deprecated_commands;
 my %root_commands             = %Texinfo::Common::root_commands;
-my %sectioning_commands       = %Texinfo::Common::sectioning_commands;
+my %sectioning_heading_commands     = 
%Texinfo::Common::sectioning_heading_commands;
 my %command_index             = %Texinfo::Common::command_index;
 my %ref_commands              = %Texinfo::Common::ref_commands;
 my %region_commands           = %Texinfo::Common::region_commands;
@@ -433,7 +433,7 @@ my %simple_text_commands;
 foreach my $line_command(keys(%line_commands)) {
   if ($line_commands{$line_command} =~ /^\d+$/
       or ($line_commands{$line_command} eq 'line'
-          and !($sectioning_commands{$line_command}
+          and !($sectioning_heading_commands{$line_command}
                 or $def_commands{$line_command}
                 or $headings_specification_commands{$line_command}))
       or $line_commands{$line_command} eq 'text') {
@@ -443,7 +443,7 @@ foreach my $line_command(keys(%line_commands)) {
 
 my %simple_text_headings_commands = (%headings_specification_commands);
 
-my %full_line_commands_no_refs = (%sectioning_commands,
+my %full_line_commands_no_refs = (%sectioning_heading_commands,
                                   %def_commands);
 
 delete $simple_text_commands{'center'};
@@ -4635,7 +4635,7 @@ sub _parse_texi($$$)
               }
               push @{$current->{'contents'}}, $misc;
               $misc->{'parent'} = $current;
-              if ($sectioning_commands{$command}) {
+              if ($sectioning_heading_commands{$command}) {
                 if ($self->{'sections_level'}) {
                   $current->{'contents'}->[-1]->{'extra'}->{'sections_level'}
                     = $self->{'sections_level'};
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index 01bb9a9bd5..b1f7c7df02 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -291,7 +291,7 @@ sub _print_sectioning_tree($)
 {
   my $current = shift;
   my $result = ' ' x $current->{'structure'}->{'section_level'}
-     . 
Texinfo::Convert::Texinfo::root_element_command_to_texinfo($current)."\n";
+     . 
Texinfo::Convert::Texinfo::root_heading_command_to_texinfo($current)."\n";
   foreach my $child (@{$current->{'structure'}->{'section_childs'}}) {
     $result .= _print_sectioning_tree($child);
   }
@@ -1257,7 +1257,7 @@ sub root_or_external_element_cmd_texi($)
     $result .= "(type $element->{'type'})" if (defined($element->{'type'}));
     return $result;
   }
-  return 
Texinfo::Convert::Texinfo::root_element_command_to_texinfo($command_element);
+  return 
Texinfo::Convert::Texinfo::root_heading_command_to_texinfo($command_element);
 }
 
 # Used for debugging and in test suite, but not generally useful. Not
diff --git a/tp/Texinfo/Transformations.pm b/tp/Texinfo/Transformations.pm
index ab9f1921c2..5d40db3d0c 100644
--- a/tp/Texinfo/Transformations.pm
+++ b/tp/Texinfo/Transformations.pm
@@ -304,10 +304,10 @@ sub _reassociate_to_node($$$$)
             {'contents' => $current->{'extra'}->{'index_entry'}->{'content'}})
          .") not in previous node $previous_node\n";
       print STDERR "  previous node: "
-        
.Texinfo::Convert::Texinfo::root_element_command_to_texinfo($previous_node)."\n";
+        
.Texinfo::Convert::Texinfo::root_heading_command_to_texinfo($previous_node)."\n";
       if ($current->{'extra'}->{'index_entry'}->{'node'}) {
         print STDERR "  current node: ".
-         Texinfo::Convert::Texinfo::root_element_command_to_texinfo(
+         Texinfo::Convert::Texinfo::root_heading_command_to_texinfo(
                             
$current->{'extra'}->{'index_entry'}->{'node'})."\n";
       } else {
         print STDERR "  current node not set\n";
@@ -848,7 +848,7 @@ Texinfo::Transformations - transformations of 
Texinfo::Parser.pm tree
 =head1 DISCLAIMER
 
 The Texinfo Perl module main purpose is to be used in C<texi2any> to convert
-Texinfo to other formats.  There no promise of API stability.
+Texinfo to other formats.  There is no promise of API stability.
 
 =head1 DESCRIPTION
 
@@ -924,10 +924,15 @@ should also hold configuration information.
 
 =item protect_hashchar_at_line_beginning ($registrar, 
$configuration_information, $tree)
 
-Protect hash (#) character at the beginning of line such that they would
-not be considered as lines to be processed by the CPP processor.
-I<$registrar> is a L<Texinfo::Report> in which the errors
-and warnings encountered while parsing are registered.
+Protect hash (#) character at the beginning of line such that they would not be
+considered as lines to be processed by the CPP processor.  The I<$registrar>
+and I<$configuration_information> arguments may be undef.  If defined, the
+I<$registrar> argument should be a L<Texinfo::Report> object in which the
+errors and warnings encountered while parsing are registered.  If defined,
+I<$configuration_information> should give access to configuration through
+C<get_conf>.  If both I<$registrar> and I<$configuration_information> are
+defined they are used for error reporting in case an hash character could not
+be protected because it appeared in a raw environment.
 
 =item regenerate_master_menu ($translations, $labels)
 
diff --git a/tp/init/book.pm b/tp/init/book.pm
index bc948f6cb2..7bb16f5029 100644
--- a/tp/init/book.pm
+++ b/tp/init/book.pm
@@ -85,7 +85,7 @@ sub book_print_up_toc($$)
   # this happens for example for top tree unit
   return '' if !(@up_commands);
   my $up = shift @up_commands;
-  #print STDERR "$up 
".Texinfo::Convert::Texinfo::root_element_command_to_texinfo($up)."\n";
+  #print STDERR "$up 
".Texinfo::Convert::Texinfo::root_heading_command_to_texinfo($up)."\n";
   $result .= $converter->html_attribute_class('ul', 
[$toc_numbered_mark_class])."><li>"
   . "<a 
href=\"".$converter->command_href($up)."\">".$converter->command_text($up)
    . "</a> </li>\n";
@@ -213,7 +213,7 @@ sub book_convert_heading_command($$$$$)
   }
 
   print STDERR "CONVERT elt heading $element "
-        
.Texinfo::Convert::Texinfo::root_element_command_to_texinfo($element)."\n"
+        
.Texinfo::Convert::Texinfo::root_heading_command_to_texinfo($element)."\n"
           if ($self->get_conf('DEBUG'));
   my $tree_unit;
   if ($Texinfo::Common::root_commands{$element->{'cmdname'}}
@@ -294,7 +294,7 @@ sub book_convert_heading_command($$$$$)
   if ($do_heading) {
     if ($self->get_conf('TOC_LINKS')
         and $Texinfo::Common::root_commands{$cmdname}
-        and $Texinfo::Common::sectioning_commands{$cmdname}) {
+        and $Texinfo::Common::sectioning_heading_commands{$cmdname}) {
       my $content_href = $self->command_contents_href($element, 'contents',
                                         $self->{'current_filename'});
       if ($content_href) {
@@ -335,7 +335,8 @@ sub book_convert_heading_command($$$$$)
   return $result;
 }
 
-foreach my $command (keys(%Texinfo::Common::sectioning_commands), 'node') {
+foreach my $command (keys(%Texinfo::Common::sectioning_heading_commands),
+                                                                  'node') {
   texinfo_register_command_formatting($command,
                                 \&book_convert_heading_command);
 }



reply via email to

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