texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Tue, 8 Nov 2022 03:29:25 -0500 (EST)

branch: master
commit 0bcb18119b1c441011259aa67f0bb4bfd84951cf
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Nov 1 10:16:26 2022 +0100

    * doc/texi2any_api.texi (Common Customization of Special Elements)
    (Special Elements Information Customization)
    (Special Element Body Formatting Functions), tp/Texinfo/Common.pm
    (@variable_other_settables), tp/Texinfo/Config.pm
    (_GNUT_initialize_special_element_info)
    (texinfo_register_special_element_info,
    GNUT_get_special_element_info), tp/Texinfo/Convert/HTML.pm
    (special_element_info, _translate_names, converter_initialize):
    hange information on special elements to be set with a function,
    texinfo_register_special_element_info in Texinfo::Config, retrieved in
    the converted with GNUT_get_special_element_info, instead of using
    customization variables.  Use the special_element_info function to
    retrieve the special elements information in the HTML Converter,
    translating special element headings only when needed.  Allow special
    element heading and targets to be undef.
    Remove SPECIAL_ELEMENTS_HEADING, SPECIAL_ELEMENTS_CLASS,
    SPECIAL_ELEMENTS_DIRECTIONS, special_elements_targets,
    special_elements_file_string and special_elements_order customozation
    variables.
---
 ChangeLog                                          |  22 +
 doc/texi2any_api.texi                              | 256 ++++++----
 tp/Texinfo/Common.pm                               |   2 -
 tp/Texinfo/Config.pm                               |  40 ++
 tp/Texinfo/Convert/HTML.pm                         | 237 ++++++---
 tp/t/init/special_element_customization.pm         |  73 +++
 tp/t/init_files_tests.t                            |  19 +
 .../init_files_tests/customize_special_element.pl  | 540 +++++++++++++++++++++
 .../res_html/Chapter-fr.html                       |  37 ++
 .../res_html/Chapter.html                          |  37 ++
 .../res_html/customize_special_element_fot.html    |  40 ++
 .../customize_special_element/res_html/index.html  |  68 +++
 12 files changed, 1209 insertions(+), 162 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4d4014c6d9..406cb35309 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2022-11-01  Patrice Dumas  <pertusus@free.fr>
+
+       * doc/texi2any_api.texi (Common Customization of Special Elements)
+       (Special Elements Information Customization)
+       (Special Element Body Formatting Functions), tp/Texinfo/Common.pm
+       (@variable_other_settables), tp/Texinfo/Config.pm
+       (_GNUT_initialize_special_element_info)
+       (texinfo_register_special_element_info,
+       GNUT_get_special_element_info), tp/Texinfo/Convert/HTML.pm
+       (special_element_info, _translate_names, converter_initialize):
+       hange information on special elements to be set with a function,
+       texinfo_register_special_element_info in Texinfo::Config, retrieved in
+       the converted with GNUT_get_special_element_info, instead of using
+       customization variables.  Use the special_element_info function to
+       retrieve the special elements information in the HTML Converter,
+       translating special element headings only when needed.  Allow special
+       element heading and targets to be undef.
+       Remove SPECIAL_ELEMENTS_HEADING, SPECIAL_ELEMENTS_CLASS,
+       SPECIAL_ELEMENTS_DIRECTIONS, special_elements_targets,
+       special_elements_file_string and special_elements_order customozation
+       variables.
+
 2022-10-31  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (_prepare_special_elements): for
diff --git a/doc/texi2any_api.texi b/doc/texi2any_api.texi
index 429fa277e9..6da5fe2e72 100644
--- a/doc/texi2any_api.texi
+++ b/doc/texi2any_api.texi
@@ -525,7 +525,8 @@ The formatting of the output produced by ``indicator'' and 
font
 commands (e.g., @code{@@code}, @code{@@t}),
 and other simple commands with
 arguments (e.g., @code{@@asis}, @code{@@clicksequence},
-@code{@@sup}, @code{@@verb}) can be changed with 
@code{texinfo_register_style_command_formatting}:
+@code{@@sup}, @code{@@verb}) can be changed with
+@code{texinfo_register_style_command_formatting}:
 
 @defun texinfo_register_style_command_formatting ($command_name, @
                                      $html_element, $in_quotes, $context)
@@ -551,10 +552,12 @@ For example, to set @code{@@sansserif@{argument@}} to be 
formatted as
 and as a quoted string in string context, use:
 
 @example
-texinfo_register_style_command_formatting('sansserif', 'code', 0, 'normal');
+texinfo_register_style_command_formatting('sansserif', 'code', 0,
+                                          'normal');
 texinfo_register_style_command_formatting('sansserif', 'code', 0,
                                           'preformatted');
-texinfo_register_style_command_formatting('sansserif', undef, 1, 'string');
+texinfo_register_style_command_formatting('sansserif', undef, 1,
+                                          'string');
 @end example
 
 To output the formatted argument of @code{@@t} as is:
@@ -971,7 +974,7 @@ with HTML elements (preformatted and normal contexts).
 A Texinfo tree element representing the direction.
 
 @item target
-A string representing target of the direction, typically used as id
+A string representing the target of the direction, typically used as id
 attribute in the element unit corresponding to the direction, and in href
 attribute.
 
@@ -2287,82 +2290,6 @@ and the call of the formatting functions are documented 
in the following section
 the manual, depending on where they are relevant.
 
 
-@node Special Element Body Formatting Functions
-@subsection Special Element Body Formatting Functions
-
-To register body formating user defined functions for special element
-(@pxref{Output Element Units}), the special elements varieties are used, as
-described in @ref{Special Elements Varieties}.
-
-@float Table, Special Elements Varieties
-@multitable {Short table of contents} {Special Element Variety}
-@headitem Special Element @tab Special Element Variety
-@item Table of contents @tab @code{contents}
-@item Short table of contents @tab @code{shortcontents}
-@item Footnotes @tab @code{footnotes}
-@item About @tab @code{about}
-@end multitable
-@caption{Association of special elements names with their special element 
variety}
-@end float
-
-Special element body formatting user defined functions are registered with
-@code{texinfo_register_formatting_special_element_body}:
-
-@defun texinfo_register_formatting_special_element_body 
($special_element_variety, @
-                            \@ampchar{}handler)
-@var{$special_element_variety} is the element variety
-(@pxref{Special Elements Varieties}).  @var{\&handler} is the user defined
-function reference.
-@end defun
-
-The call of the user defined functions is:
-@deftypefn {Function Reference} @var{$text} special_element_body 
(@var{$converter}, @
-                                @var{$special_element_variety}, 
@var{\%element})
-@var{$converter} is a converter object. @var{$special_element_variety} is the
-element variety.  @var{\%element} is the Texinfo element.
-
-The @var{$text} returned is the formatted special element body.
-@end deftypefn
-
-To call a special element body formatting function from user defined code, the
-function reference should first be retrieved using
-@code{special_element_body_formatting}:
-
-@deftypefun {@var{\&special_element_body_formatting} =} 
@var{$converter}->special_element_body_formatting @
-                                              (@var{$special_element_variety})
-@var{$special_element_variety} is the special element variety.  Returns the
-conversion function reference for @var{$variety}, or @samp{undef} if there is 
none,
-which should not happen for the special elements described in this manual.
-@end deftypefun
-
-For example:
-@example
-@group
-my $footnotes_element_body
- = &@{$converter->special_element_body_formatting('footnotes')@}(
-                                   $converter, 'footnotes', $element);
-@end group
-@end example
-
-It is possible to have access to the default conversion function reference.
-The function used is:
-
-@deftypefun {@var{\&default_special_element_body_formatting} =} @
-               @var{$converter}->defaults_special_element_body_formatting @
-                                               (@var{$special_element_variety})
-@var{$special_element_variety} is the special element variety.  Returns the
-default conversion function reference for @var{$special_element_variety}, or
-@code{undef} if there is none, which should not happen for the special elements
-described in this manual.
-@end deftypefun
-
-@xref{Customizing Footnotes} for more on the footnotes special element body
-formatting.  @xref{Contents and Short Table of Contents Customization}
-for more on the @code{contents} and @code{shortcontents} special elements
-body formatting.  @xref{About Element Customization} for more
-on the @code{about} special element body formatting.
-
-
 @node Mandatory Conversion Function Calls
 @chapter Mandatory Conversion Function Calls
 
@@ -3348,9 +3275,160 @@ Return the total number of element units associated 
with the file.
 @end deftypefun
 
 
+@node Common Customization of Special Elements
+@chapter Common Customization of Special Elements
+
+Some customization is relevant for all the special elements
+(@pxref{Output Element Units}).  The formatting of special elements bodies
+is also handled the same for all the special elements formatted as separate
+elements (@pxref{Output Element Units}).
+To specify a special element in those contexts, the special elements varieties
+are used, as described in
+@ref{Special Elements Varieties}.
+
+@float Table, Special Elements Varieties
+@multitable {Short table of contents} {Special Element Variety}
+@headitem Special Element @tab Special Element Variety
+@item Table of contents @tab @code{contents}
+@item Short table of contents @tab @code{shortcontents}
+@item Footnotes @tab @code{footnotes}
+@item About @tab @code{about}
+@end multitable
+@caption{Association of special elements names with their special element 
variety}
+@end float
+
+
+@node Special Elements Information Customization
+@section Special Elements Information Customization
+
+The following items are common to all the special elements:
+
+@table @code
+@item class
+String for special element HTML class attributes.
+
+@item direction
+Direction corresponding to the special element. @xref{Directions}.
+
+@item heading
+Special element heading Texinfo code.
+
+@item heading_tree
+Special element heading Texinfo tree.
+
+@item order
+Index determining the sorting order of special elements.
+
+@item file_string
+File string portion prepended to the special element file names, such as
+@samp{_toc}.
+
+@item target
+A string representing the target of the special element, typically used
+as id attribute and in href attribute.
+
+@end table
+
+The heading string is set with @code{heading}, and should be a Texinfo code
+string.  @code{heading_tree} cannot be set directly, but can be retrieved.
+It is determined from @code{heading} after translation and conversion to
+a Texinfo tree.
+
+To set the information, use @code{texinfo_register_special_element_info}
+in an init file:
+
+@defun texinfo_register_special_element_info ($item_type, @
+                           $special_element_variety, $value)
+Set @var{$item_type} information for the special element variety
+@var{$special_element_variety} to @var{$value}.  @var{$value} may be
+@samp{undef}, or an empty string, but only @code{heading} and
+@code{target} should be set to that value as a non-empty value is
+needed for the other items for formatting.
+@end defun
+
+To retrieve the information for formatting, use @code{special_element_info}:
+
+@deftypefun {@var{$list_or_value} =} @var{$converter}->special_element_info @
+                  (@var{$item_type}, @var{$special_element_variety})
+@var{$item_type} is the type of information to be retrieved as described above.
+If @var{$special_element_variety} is @samp{undef}, the list of the special 
elements
+varieties with information for the @var{$item_type} is returned.  If
+@var{$special_element_variety} is a special element variety, the corresponding
+value is returned.
+
+The value returned is translated and converted to a Texinfo tree
+for @samp{heading_tree}.
+@end deftypefun
+
+
+@node Special Element Body Formatting Functions
+@section Special Element Body Formatting Functions
+
+To register body formating user defined functions for special element
+(@pxref{Output Element Units}), the special elements varieties are used, as
+described in @ref{Special Elements Varieties}.
+Special element body formatting user defined functions are registered with
+@code{texinfo_register_formatting_special_element_body}:
+
+@defun texinfo_register_formatting_special_element_body 
($special_element_variety, @
+                            \@ampchar{}handler)
+@var{$special_element_variety} is the element variety
+(@pxref{Special Elements Varieties}).  @var{\&handler} is the user defined
+function reference.
+@end defun
+
+The call of the user defined functions is:
+@deftypefn {Function Reference} @var{$text} special_element_body 
(@var{$converter}, @
+                                @var{$special_element_variety}, 
@var{\%element})
+@var{$converter} is a converter object. @var{$special_element_variety} is the
+element variety.  @var{\%element} is the Texinfo element.
+
+The @var{$text} returned is the formatted special element body.
+@end deftypefn
+
+To call a special element body formatting function from user defined code, the
+function reference should first be retrieved using
+@code{special_element_body_formatting}:
+
+@deftypefun {@var{\&special_element_body_formatting} =} 
@var{$converter}->special_element_body_formatting @
+                                              (@var{$special_element_variety})
+@var{$special_element_variety} is the special element variety.  Returns the
+conversion function reference for @var{$variety}, or @samp{undef} if there is 
none,
+which should not happen for the special elements described in this manual.
+@end deftypefun
+
+For example:
+@example
+@group
+my $footnotes_element_body
+ = &@{$converter->special_element_body_formatting('footnotes')@}(
+                                   $converter, 'footnotes', $element);
+@end group
+@end example
+
+It is possible to have access to the default conversion function reference.
+The function used is:
+
+@deftypefun {@var{\&default_special_element_body_formatting} =} @
+               @var{$converter}->defaults_special_element_body_formatting @
+                                               (@var{$special_element_variety})
+@var{$special_element_variety} is the special element variety.  Returns the
+default conversion function reference for @var{$special_element_variety}, or
+@code{undef} if there is none, which should not happen for the special elements
+described in this manual.
+@end deftypefun
+
+@xref{Customizing Footnotes} for more on footnotes
+formatting.  @xref{Contents and Short Table of Contents Customization}
+for more on the @code{contents} and @code{shortcontents} formatting.
+@xref{About Element Customization} for more on the @code{about} special
+element body formatting.
+
+
 @node Customizing Footnotes@comma{} Tables of Contents and About
 @chapter Customizing Footnotes, Tables of Contents and About
 
+
 @node Customizing Footnotes
 @section Customizing Footnotes
 
@@ -3425,8 +3503,8 @@ Returns the footnotes formatted.  In the default case, 
the function reference
 calls @code{format_footnotes_sequence} and also sets up a header with
 @code{format_heading_text} (@pxref{Basic Formatting Customization}), using the
 customization variables @code{FOOTNOTE_END_HEADER_LEVEL} and
-@code{SPECIAL_ELEMENTS_HEADING} with the @code{footnotes} special element
-variety key.
+the special @code{footnotes} element @code{heading} information
+(@pxref{Special Elements Information Customization}).
 @end deftypefn
 
 
@@ -3720,20 +3798,6 @@ Header and Footer Formatting}).  The conversion for 
these elements with type
 @code{special_element_type} can be be replaced by user defined functions for a
 precise control of conversion (@pxref{Type Tree Element Conversion Functions}).
 
-Specific customization variable hashes taking
-special element varieties as keys are used in special elements formatting:
-
-@vtable @code
-@item SPECIAL_ELEMENTS_HEADING
-heading text of the special element.
-
-@item SPECIAL_ELEMENTS_CLASS
-string for special element HTML class attributes.
-
-@item SPECIAL_ELEMENTS_DIRECTIONS
-direction corresponding to the special element. @xref{Directions}.
-
-@end vtable
 
 @node Beginning and Ending Files
 @chapter Beginning and Ending Files
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 168059e83d..a7489155ea 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -438,8 +438,6 @@ my @variable_other_settables = (
   'CHAPTER_FOOTER_BUTTONS', 'SECTION_FOOTER_BUTTONS',
   'NODE_FOOTER_BUTTONS',
   'MISC_BUTTONS', 'CHAPTER_BUTTONS',
-  'SPECIAL_ELEMENTS_HEADING', 'SPECIAL_ELEMENTS_CLASS',
-  'SPECIAL_ELEMENTS_DIRECTIONS',
   'ACTIVE_ICONS', 'PASSIVE_ICONS',
   # set from command line
   'CSS_FILES',            # --css-include
diff --git a/tp/Texinfo/Config.pm b/tp/Texinfo/Config.pm
index 928431807d..623f3224a5 100644
--- a/tp/Texinfo/Config.pm
+++ b/tp/Texinfo/Config.pm
@@ -404,6 +404,7 @@ my $GNUT_style_commands_formatting_info = {};
 my $GNUT_accent_command_formatting_info = {};
 my $GNUT_types_formatting_info = {};
 my $GNUT_direction_string_info = {};
+my $GNUT_special_element_info = {};
 
 # called from init files
 sub texinfo_register_file_id_setting_function($$)
@@ -510,6 +511,7 @@ my @all_possible_formatting_context = 
($default_formatting_context,
 
 sub _GNUT_initialize_no_arg_commands_formatting_strings()
 {
+  $GNUT_no_arg_commands_formatting_strings = {};
   foreach my $possible_formatting_context (@all_possible_formatting_context) {
     $GNUT_no_arg_commands_formatting_strings->{$possible_formatting_context} = 
{};
   }
@@ -519,6 +521,7 @@ _GNUT_initialize_no_arg_commands_formatting_strings();
 
 sub _GNUT_initialize_style_commands_formatting_info()
 {
+  $GNUT_style_commands_formatting_info = {};
   foreach my $possible_formatting_context (@all_possible_formatting_context) {
     $GNUT_style_commands_formatting_info->{$possible_formatting_context} = {};
   }
@@ -526,6 +529,19 @@ sub _GNUT_initialize_style_commands_formatting_info()
 
 _GNUT_initialize_style_commands_formatting_info();
 
+my @all_special_element_info_types = ('class', 'direction', 'heading', 'order',
+                             'file_string', 'target');
+
+sub _GNUT_initialize_special_element_info()
+{
+  $GNUT_special_element_info = {};
+  foreach my $possible_type (@all_special_element_info_types) {
+    $GNUT_special_element_info->{$possible_type} = {};
+  }
+}
+
+_GNUT_initialize_special_element_info();
+
 # $translated_string is supposed to be already formatted.
 # It may also be relevant to be able to pass a 'tree'
 # directly (it is actually handled by the converter code).
@@ -698,6 +714,29 @@ sub GNUT_get_direction_string_info()
   return { %$GNUT_direction_string_info };
 }
 
+sub texinfo_register_special_element_info($$$)
+{
+  my $type = shift;
+  my $variety = shift;
+  my $thing = shift;
+
+  if (not defined($GNUT_special_element_info->{$type})) {
+    _GNUT_document_warn(
+         sprintf(__("%s: unknown special element information type %s\n"),
+                  'texinfo_register_special_element_info', $type));
+    return 0;
+  }
+  $GNUT_special_element_info->{$type}->{$variety} = {}
+    if (not exists($GNUT_special_element_info->{$type}->{$variety}));
+  $GNUT_special_element_info->{$type}->{$variety} = $thing;
+  return 1;
+}
+
+sub GNUT_get_special_element_info()
+{
+  return { %$GNUT_special_element_info };
+}
+
 
 # Not needed from the main program, as the init files should affect all
 # the manuals, but needed for tests, to have isolated tests.
@@ -716,6 +755,7 @@ sub GNUT_reinitialize_init_files()
   _GNUT_initialize_stage_handlers();
   _GNUT_initialize_no_arg_commands_formatting_strings();
   _GNUT_initialize_style_commands_formatting_info();
+  _GNUT_initialize_special_element_info();
 }
 
 
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 9e7beab9de..3373ae0071 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -1044,7 +1044,9 @@ sub command_text($$;$)
         my $special_element_variety
            = $command->{'extra'}->{'special_element_variety'};
         $tree
-          = 
$self->get_conf('SPECIAL_ELEMENTS_HEADING')->{$special_element_variety};
+          = $self->special_element_info('heading_tree',
+                                        $special_element_variety);
+        $tree = {} if (!defined($tree));
         $explanation = "command_text $special_element_variety";
       } elsif ($command->{'cmdname'} and ($command->{'cmdname'} eq 'node'
                                           or $command->{'cmdname'} eq 
'anchor')) {
@@ -1149,11 +1151,11 @@ sub command_name_special_element_information($$)
     return (undef, undef, undef, undef);
   }
   my $special_element_direction
-    = 
$self->get_conf('SPECIAL_ELEMENTS_DIRECTIONS')->{$special_element_variety};
+    = $self->special_element_info('direction', $special_element_variety);
   my $special_element
     = $self->special_direction_element($special_element_direction);
   my $class_base
-    = $self->get_conf('SPECIAL_ELEMENTS_CLASS')->{$special_element_variety};
+    = $self->special_element_info('class', $special_element_variety);
   return ($special_element_variety, $special_element, $class_base,
           $special_element_direction);
 }
@@ -1430,6 +1432,39 @@ sub direction_string($$$;$)
   return 
$self->{'directions_strings'}->{$string_type}->{$direction}->{$context};
 }
 
+my %default_translated_special_element_info;
+
+# if SPECIAL_ELEMENT_VARIETY is not set, return all the varieties
+sub special_element_info($$;$) {
+  my $self = shift;
+  my $type = shift;
+  my $special_element_variety = shift;
+
+  if ($self->{'translated_special_element_info'}->{$type}) {
+    my $translated_special_element_info
+      = $self->{'translated_special_element_info'}->{$type}->[1];
+    if (not defined($special_element_variety)) {
+      return keys(%{$translated_special_element_info});
+    }
+
+    if (not exists($self->{'special_element_info'}->{$type}
+                                    ->{$special_element_variety})) {
+      my $special_element_heading = $translated_special_element_info
+                                            ->{$special_element_variety};
+      my $translated_tree;
+      if (defined($special_element_heading)) {
+        $translated_tree = $self->gdt($special_element_heading);
+      }
+      $self->{'special_element_info'}->{$type}->{$special_element_variety}
+        = $translated_tree;
+    }
+  }
+  if (not defined($special_element_variety)) {
+    return keys(%{$self->{'special_element_info'}->{$type}});
+  }
+  return $self->{'special_element_info'}->{$type}->{$special_element_variety};
+}
+
 # API for misc conversion and formatting functions
 
 # it is considered 'top' only if element corresponds to @top or
@@ -1740,8 +1775,6 @@ sub convert_tree_new_formatting_context($$;$$$)
   return $result;
 }
 
-my %SPECIAL_ELEMENTS_HEADING;
-
 my %defaults = (
   'AVOID_MENU_REDUNDANCY' => 0,
   'CONTENTS_OUTPUT_LOCATION' => 'after_top',
@@ -1795,28 +1828,10 @@ my %defaults = (
                              [ 'Prev', 
\&_default_panel_button_dynamic_direction_node_footer ],
                              [ 'Up', 
\&_default_panel_button_dynamic_direction_node_footer ],
                              ' ', 'Contents', 'Index'],
-  'special_elements_targets'   => {
-                             'shortcontents' => 'SEC_Shortcontents',
-                             'contents' => 'SEC_Contents',
-                             'footnotes' => 'SEC_Footnotes',
-                             'about' => 'SEC_About',
-                            },
-  'special_elements_file_string' => {
-                              'contents' => '_toc',
-                              'shortcontents' => '_ovr',
-                              'footnotes' => '_fot',
-                              'about' => '_abt',
-                            },
   'frame_pages_file_string' => {
                               'Frame' => '_frame',
                               'Toc_Frame' => '_toc_frame',
                               },
-  'special_elements_order'  => {
-                              'contents' => 20,
-                              'shortcontents' => 30,
-                              'footnotes' => 10,
-                              'about' => 40,
-                            },
   'DOCTYPE'              => '<!DOCTYPE html>',
   'FRAMESET_DOCTYPE'     => '<!DOCTYPE html>',
   'DEFAULT_RULE'         => '<hr>',
@@ -1839,19 +1854,6 @@ my %defaults = (
   
   'ACTIVE_ICONS'         => undef,
   'PASSIVE_ICONS'        => undef,
-  'SPECIAL_ELEMENTS_HEADING' => \%SPECIAL_ELEMENTS_HEADING,
-  'SPECIAL_ELEMENTS_CLASS' => {
-    'about'       => 'about',
-    'contents'    => 'contents',
-    'shortcontents'    => 'shortcontents',
-    'footnotes'   => 'footnotes',
-  },
-  'SPECIAL_ELEMENTS_DIRECTIONS' => {
-     'about'       => 'About',
-     'contents'    => 'Contents',
-     'shortcontents'    => 'Overview',
-     'footnotes'   => 'Footnotes',
-  },
   'COPIABLE_LINKS' => 1,
 
   'converted_format'   => 'html',
@@ -1865,14 +1867,62 @@ foreach my $buttons ('SECTION_FOOTER_BUTTONS', 
'CHAPTER_FOOTER_BUTTONS') {
   $defaults{$buttons} = [@{$defaults{'SECTION_FOOTER_BUTTONS'}}];
 }
 
+my %default_special_element_info = (
+
+  'class' => {
+    'about'       => 'about',
+    'contents'    => 'contents',
+    'shortcontents'    => 'shortcontents',
+    'footnotes'   => 'footnotes',
+  },
+
+  'direction' => {
+     'about'       => 'About',
+     'contents'    => 'Contents',
+     'shortcontents'    => 'Overview',
+     'footnotes'   => 'Footnotes',
+   },
+
+   'order' => {
+     'contents' => 20,
+     'shortcontents' => 30,
+     'footnotes' => 10,
+     'about' => 40,
+   },
+
+   'file_string' => {
+     'contents' => '_toc',
+     'shortcontents' => '_ovr',
+     'footnotes' => '_fot',
+     'about' => '_abt',
+   },
+
+   'target' => {
+     'shortcontents' => 'SEC_Shortcontents',
+     'contents' => 'SEC_Contents',
+     'footnotes' => 'SEC_Footnotes',
+     'about' => 'SEC_About',
+   },
+);
+
+%default_translated_special_element_info = (
+
+   'heading' => {
+     'about'       => Texinfo::Common::gdt('About This Document'),
+     'contents'    => Texinfo::Common::gdt('Table of Contents'),
+     'shortcontents'    => Texinfo::Common::gdt('Short Table of Contents'),
+     'footnotes'   => Texinfo::Common::gdt('Footnotes'),
+   },
+);
 
 my @global_directions = ('First', 'Last', 'Index', 'Top');
 my %global_and_special_directions;
 foreach my $global_direction (@global_directions) {
   $global_and_special_directions{$global_direction} = 1;
 }
-foreach my $special_element_variety (keys 
%{$defaults{'SPECIAL_ELEMENTS_DIRECTIONS'}}) {
-  
$global_and_special_directions{$defaults{'SPECIAL_ELEMENTS_DIRECTIONS'}->{$special_element_variety}}
 = 1;
+foreach my $special_direction (values(
+                   %{$default_special_element_info{'direction'}})) {
+  $global_and_special_directions{$special_direction} = 1;
 }
 
 my %default_converted_directions_strings = (
@@ -2070,18 +2120,15 @@ sub _translate_names($)
     $self->{'directions_strings'}->{$string_type} = {};
   }
 
-  %SPECIAL_ELEMENTS_HEADING = (
-    'about'       => $self->gdt('About This Document'),
-    'contents'    => $self->gdt('Table of Contents'),
-    'shortcontents'    => $self->gdt('Short Table of Contents'),
-    'footnotes'   => $self->gdt('Footnotes'),
-  );
+  foreach my $type (keys(%default_translated_special_element_info)) {
+    $self->{'special_element_info'}->{$type.'_tree'} = {};
+  }
 
   # delete the tree and formatted results for special elements
   # such that they are redone with the new tree when needed.
-  foreach my $special_element_variety (keys (%SPECIAL_ELEMENTS_HEADING)) {
+  foreach my $special_element_variety 
($self->special_element_info('direction')) {
     my $special_element_direction
-     = 
$self->get_conf('SPECIAL_ELEMENTS_DIRECTIONS')->{$special_element_variety};
+     = $self->special_element_info('direction', $special_element_variety);
     my $special_element
      = $self->special_direction_element($special_element_direction);
     if ($special_element and
@@ -5415,16 +5462,21 @@ sub _contents_inline_element($$$)
     my $heading;
     if ($special_element) {
       my $id = $self->command_id($special_element);
-      if ($id ne '') {
+      if (defined($id) and $id ne '') {
         $result .= " id=\"$id\"";
       }
       $heading = $self->command_text($special_element);
     } else {
       # happens when called as convert() and not output()
       #cluck "$cmdname special element not defined";
-      $heading = 
$self->convert_tree($self->get_conf('SPECIAL_ELEMENTS_HEADING')
-                                                    
->{$special_element_variety},
-                                     "convert $cmdname special heading");
+      my $heading_tree = $self->special_element_info('heading_tree',
+                                             $special_element_variety);
+      if (defined($heading_tree)) {
+        $heading = $self->convert_tree($heading_tree,
+                                       "convert $cmdname special heading");
+      } else {
+        $heading = '';
+      }
     }
     $result .= ">\n";
     $result .= &{$self->formatting_function('format_heading_text')}($self,
@@ -6445,7 +6497,7 @@ sub _convert_special_element_type($$$$)
 
   my $id = $self->command_id($element);
   my $class_base
-    = $self->get_conf('SPECIAL_ELEMENTS_CLASS')->{$special_element_variety};
+    = $self->special_element_info('class', $special_element_variety);
   $result .= $self->html_attribute_class('div', ["element-${class_base}"]);
   if ($id ne '') {
     $result .= " id=\"$id\"";
@@ -7031,6 +7083,10 @@ sub _load_htmlxref_files {
 #  translated_direction_strings
 #
 #    API exists
+#  special_element_info
+#  translated_special_element_info
+#
+#    API exists
 #  elements_in_file_count    # the number of tree unit elements in file
 #  file_counters             # begin at elements_in_file_count decrease
 #                            # each time the tree unit element is closed
@@ -7412,6 +7468,48 @@ sub converter_initialize($)
     }
   }
 
+  my $customized_special_element_info
+    = Texinfo::Config::GNUT_get_special_element_info();
+
+  $self->{'special_element_info'} = {};
+  foreach my $type (keys(%default_special_element_info)) {
+    $self->{'special_element_info'}->{$type} = {};
+    foreach my $special_element_variety
+                      (keys(%{$default_special_element_info{$type}})) {
+      if (exists($customized_special_element_info->{$type})
+          and exists($customized_special_element_info
+                          ->{$type}->{$special_element_variety})) {
+        $self->{'special_element_info'}->{$type}->{$special_element_variety}
+         = 
$customized_special_element_info->{$type}->{$special_element_variety};
+      } else {
+        $self->{'special_element_info'}->{$type}->{$special_element_variety}
+          = $default_special_element_info{$type}->{$special_element_variety};
+      }
+    }
+  }
+
+  $self->{'translated_special_element_info'} = {};
+  foreach my $type (keys(%default_translated_special_element_info)) {
+    $self->{'special_element_info'}->{$type} = {};
+    $self->{'special_element_info'}->{$type.'_tree'} = {};
+    $self->{'translated_special_element_info'}->{$type.'_tree'} = [$type];
+    foreach my $special_element_variety
+                      
(keys(%{$default_translated_special_element_info{$type}})) {
+      if (exists($customized_special_element_info->{$type})
+          and exists($customized_special_element_info
+                          ->{$type}->{$special_element_variety})) {
+        $self->{'translated_special_element_info'}->{$type.'_tree'}
+                                               
->[1]->{$special_element_variety}
+         = 
$customized_special_element_info->{$type}->{$special_element_variety};
+      } else {
+        $self->{'translated_special_element_info'}->{$type.'_tree'}
+                                               
->[1]->{$special_element_variety}
+          = $default_translated_special_element_info{$type}
+                                                   
->{$special_element_variety};
+      }
+    }
+  }
+
   my $customized_special_element_body
      = Texinfo::Config::GNUT_get_formatting_special_element_body_references();
 
@@ -8251,14 +8349,14 @@ sub _prepare_special_elements($$$$)
 
   my $special_elements = [];
   # sort special elements according to their index order from
-  # 'special_elements_order'.
+  # special_element_info 'order'.
   # First reverse the hash, using arrays in case some elements are at the
   # same index, and sort to get alphabetically sorted special element
   # varieties that are at the same index.
   my %special_elements_indices;
   foreach my $special_element_variety
-      (sort(keys(%{$self->{'special_elements_order'}}))) {
-    my $index = $self->{'special_elements_order'}->{$special_element_variety};
+      (sort($self->special_element_info('order'))) {
+    my $index = $self->special_element_info('order', $special_element_variety);
     $special_elements_indices{$index} = []
       if (not exists ($special_elements_indices{$index}));
     push @{$special_elements_indices{$index}}, $special_element_variety;
@@ -8278,18 +8376,21 @@ sub _prepare_special_elements($$$$)
                    'structure' => {'directions' => {}}};
     $element->{'structure'}->{'directions'}->{'This'} = $element;
     my $special_element_direction
-     = 
$self->get_conf('SPECIAL_ELEMENTS_DIRECTIONS')->{$special_element_variety};
+     = $self->special_element_info('direction', $special_element_variety);
     $self->{'special_elements_directions'}->{$special_element_direction}
      = $element;
     push @$special_elements, $element;
 
-    my $target = 
$self->{'special_elements_targets'}->{$special_element_variety};
+    my $target
+        = $self->special_element_info('target', $special_element_variety);
     my $default_filename;
     if ($self->get_conf('SPLIT') or !$self->get_conf('MONOLITHIC')
         # in general $document_name not defined means called through convert
         and defined($document_name)) {
-      $default_filename = $document_name.
-        $self->{'special_elements_file_string'}->{$special_element_variety};
+      my $special_element_file_string =
+         $self->special_element_info('file_string', $special_element_variety);
+      $special_element_file_string = '' if 
(!defined($special_element_file_string));
+      $default_filename = $document_name . $special_element_file_string;
       $default_filename .= '.'.$extension if (defined($extension));
     } else {
       $default_filename = undef;
@@ -8394,10 +8495,11 @@ sub _prepare_contents_elements($)
                         'extra' => {'special_element_variety'
                                              => $special_element_variety}};
         my $special_element_direction
-         = 
$self->get_conf('SPECIAL_ELEMENTS_DIRECTIONS')->{$special_element_variety};
+         = $self->special_element_info('direction', $special_element_variety);
         $self->{'special_elements_directions'}->{$special_element_direction}
          = $contents_element;
-        my $target = 
$self->{'special_elements_targets'}->{$special_element_variety};
+        my $target
+         = $self->special_element_info('target', $special_element_variety);
         my $filename;
         if 
(defined($self->{'file_id_setting'}->{'special_element_target_file_name'})) {
           ($target, $filename)
@@ -9284,14 +9386,21 @@ sub _default_format_footnotes_segment($)
   my $foot_lines
     = &{$self->formatting_function('format_footnotes_sequence')}($self);
   return '' if ($foot_lines eq '');
-  my $class = $self->get_conf('SPECIAL_ELEMENTS_CLASS')->{'footnotes'};
+  my $class = $self->special_element_info('class', 'footnotes');
   my $result = $self->html_attribute_class('div', [$class.'-segment']).">\n";
   $result .= $self->get_conf('DEFAULT_RULE') . "\n"
      if (defined($self->get_conf('DEFAULT_RULE'))
          and $self->get_conf('DEFAULT_RULE') ne '');
-  my $footnote_heading
-    = 
$self->convert_tree($self->get_conf('SPECIAL_ELEMENTS_HEADING')->{'footnotes'},
-                          'convert footnotes special heading');
+  my $footnote_heading_tree = $self->special_element_info('heading_tree',
+                                                          'footnotes');
+  my $footnote_heading;
+  if (defined($footnote_heading_tree)) {
+    $footnote_heading
+      = $self->convert_tree($footnote_heading_tree,
+                            'convert footnotes special heading');
+  } else {
+    $footnote_heading = '';
+  }
   my $level = $self->get_conf('FOOTNOTE_END_HEADER_LEVEL');
   $result .= &{$self->formatting_function('format_heading_text')}($self, undef,
                           [$class.'-heading'], $footnote_heading, $level)."\n";
diff --git a/tp/t/init/special_element_customization.pm 
b/tp/t/init/special_element_customization.pm
new file mode 100644
index 0000000000..8466ba2ac2
--- /dev/null
+++ b/tp/t/init/special_element_customization.pm
@@ -0,0 +1,73 @@
+
+use utf8;
+use strict;
+
+texinfo_register_special_element_info('target', 'shortcontents', undef);
+texinfo_register_special_element_info('target', 'contents', 't_contents');
+texinfo_register_special_element_info('target', 'footnotes', 't_footnotes');
+
+texinfo_register_special_element_info('heading', 'shortcontents', undef);
+texinfo_register_special_element_info('heading', 'contents',
+                                          'The @emph{Table of Contents}');
+texinfo_register_special_element_info('heading', 'footnotes',
+                                                 'The @emph{Footnotes}');
+# does not work in the test suite
+texinfo_set_from_init_file('footnotestyle', 'separate');
+
+my %translations = (
+  'fr' => {
+           'The @emph{Table of Contents}' => {'' 
+                             => '@result{} La @emph{Table des mati@`eres}',},
+           'The @emph{Overview}' => {'' 
+                             => '@result{} La @emph{Liste des chapitres}',},
+           'The @emph{Footnotes}' => {'' 
+                             => '@result{} Les @emph{Notes de bas de page}',},
+          },
+  'de' => {
+           'The @emph{Table of Contents}' => {'' 
+                              => '@result{} Das @emph{Inhaltsverzeichnis}',},
+           'The @emph{Overview}' => {''         
+                             => '@result{} Das @emph{Liste der Kapitel}',},
+           'The @emph{Footnotes}' => {''
+                             => '@result{} Les @emph{Fußnoten}',},
+          },
+);
+
+
+sub _texi2any_tests_special_element_translate_string($$$;$$$)
+{
+  my ($self, $string, $lang, $replaced_substrings,
+                              $translation_context, $type) = @_;
+  $translation_context = '' if (!defined($translation_context));
+  if (exists($translations{$lang})
+      and exists($translations{$lang}->{$string})
+      and exists($translations{$lang}->{$string}->{$translation_context})) {
+    my $translation = $translations{$lang}->{$string}->{$translation_context};
+    return $self->replace_convert_substrings($translation, 
$replaced_substrings,
+                                             $type);
+  }
+  return undef;
+}
+
+texinfo_register_formatting_function('format_translate_string',
+                           \&_texi2any_tests_special_element_translate_string);
+
+# avoid doing twice if there are more than one manual processed
+my $button_added;
+sub _texi2any_tests_special_element_add_button
+{
+  my ($self, $tree, $stage) = @_;
+
+  if (!$button_added) {
+    my @section_buttons = @{$self->get_conf('SECTION_BUTTONS')};
+    push @section_buttons, (' ', 'Overview');
+    $self->set_conf('SECTION_BUTTONS', \@section_buttons);
+    $button_added = 1;
+  }
+}
+
+texinfo_register_handler('setup', 
\&_texi2any_tests_special_element_add_button);
+
+
+
+1;
diff --git a/tp/t/init_files_tests.t b/tp/t/init_files_tests.t
index 61280eacc1..01815cde82 100644
--- a/tp/t/init_files_tests.t
+++ b/tp/t/init_files_tests.t
@@ -65,6 +65,25 @@ my @file_tests = (
 @node Other
 ',{'init_files' => ['undef_node_file_name.init'],
 }, {'VERBOSE' => 1}],
+['customize_special_element',
+'
+@footnotestyle separate
+
+@contents
+@shortcontents
+
+@node Top
+@top top
+
+@node Chapter
+@chapter chap
+
+@documentlanguage fr
+@node Chapter fr
+@chapter chap fr
+
+Text@footnote{In footnote}.
+', {'init_files' => ['special_element_customization.pm']}],
 ['documentation_examples',
 '
 @settitle @email{someone@@example.com, me} @sansserif{in--title} @error{}
diff --git a/tp/t/results/init_files_tests/customize_special_element.pl 
b/tp/t/results/init_files_tests/customize_special_element.pl
new file mode 100644
index 0000000000..1adfc3d1b0
--- /dev/null
+++ b/tp/t/results/init_files_tests/customize_special_element.pl
@@ -0,0 +1,540 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
+   %result_indices %result_sectioning %result_nodes %result_menus
+   %result_floats %result_converted %result_converted_errors 
+   %result_elements %result_directions_text %result_indices_sort_strings);
+
+use utf8;
+
+$result_trees{'customize_special_element'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'separate'
+                }
+              ],
+              'extra' => {
+                'spaces_after_argument' => '
+'
+              },
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'footnotestyle',
+          'extra' => {
+            'misc_args' => [
+              'separate'
+            ],
+            'spaces_before_argument' => ' '
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 2,
+            'macro' => ''
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'text' => '
+',
+              'type' => 'misc_arg'
+            }
+          ],
+          'cmdname' => 'contents',
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 4,
+            'macro' => ''
+          }
+        },
+        {
+          'args' => [
+            {
+              'text' => '
+',
+              'type' => 'misc_arg'
+            }
+          ],
+          'cmdname' => 'shortcontents',
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 5,
+            'macro' => ''
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'type' => 'before_node_section'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'Top'
+            }
+          ],
+          'extra' => {
+            'spaces_after_argument' => '
+'
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'node_content' => [
+          {}
+        ],
+        'nodes_manuals' => [
+          {
+            'node_content' => [
+              {}
+            ],
+            'normalized' => 'Top'
+          }
+        ],
+        'normalized' => 'Top',
+        'spaces_before_argument' => ' '
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 7,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'top'
+            }
+          ],
+          'extra' => {
+            'spaces_after_argument' => '
+'
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'top',
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'extra' => {
+        'spaces_before_argument' => ' '
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 8,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'Chapter'
+            }
+          ],
+          'extra' => {
+            'spaces_after_argument' => '
+'
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'node_content' => [
+          {}
+        ],
+        'nodes_manuals' => [
+          {
+            'node_content' => [
+              {}
+            ],
+            'normalized' => 'Chapter'
+          }
+        ],
+        'normalized' => 'Chapter',
+        'spaces_before_argument' => ' '
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 10,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'chap'
+            }
+          ],
+          'extra' => {
+            'spaces_after_argument' => '
+'
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'chapter',
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'fr'
+                }
+              ],
+              'extra' => {
+                'spaces_after_argument' => '
+'
+              },
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'documentlanguage',
+          'extra' => {
+            'spaces_before_argument' => ' ',
+            'text_arg' => 'fr'
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 13,
+            'macro' => ''
+          }
+        }
+      ],
+      'extra' => {
+        'spaces_before_argument' => ' '
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 11,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'Chapter fr'
+            }
+          ],
+          'extra' => {
+            'spaces_after_argument' => '
+'
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'node_content' => [
+          {}
+        ],
+        'nodes_manuals' => [
+          {
+            'node_content' => [
+              {}
+            ],
+            'normalized' => 'Chapter-fr'
+          }
+        ],
+        'normalized' => 'Chapter-fr',
+        'spaces_before_argument' => ' '
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 14,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'chap fr'
+            }
+          ],
+          'extra' => {
+            'spaces_after_argument' => '
+'
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'chapter',
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'contents' => [
+            {
+              'text' => 'Text'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'In footnote'
+                        }
+                      ],
+                      'type' => 'paragraph'
+                    }
+                  ],
+                  'type' => 'brace_command_context'
+                }
+              ],
+              'cmdname' => 'footnote',
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 17,
+                'macro' => ''
+              }
+            },
+            {
+              'text' => '.
+'
+            }
+          ],
+          'type' => 'paragraph'
+        }
+      ],
+      'extra' => {
+        'spaces_before_argument' => ' '
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 15,
+        'macro' => ''
+      }
+    }
+  ],
+  'type' => 'document_root'
+};
+$result_trees{'customize_special_element'}{'contents'}[1]{'extra'}{'node_content'}[0]
 = 
$result_trees{'customize_special_element'}{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'customize_special_element'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
 = 
$result_trees{'customize_special_element'}{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'customize_special_element'}{'contents'}[3]{'extra'}{'node_content'}[0]
 = 
$result_trees{'customize_special_element'}{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'customize_special_element'}{'contents'}[3]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
 = 
$result_trees{'customize_special_element'}{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'customize_special_element'}{'contents'}[5]{'extra'}{'node_content'}[0]
 = 
$result_trees{'customize_special_element'}{'contents'}[5]{'args'}[0]{'contents'}[0];
+$result_trees{'customize_special_element'}{'contents'}[5]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
 = 
$result_trees{'customize_special_element'}{'contents'}[5]{'args'}[0]{'contents'}[0];
+
+$result_texis{'customize_special_element'} = '
+@footnotestyle separate
+
+@contents
+@shortcontents
+
+@node Top
+@top top
+
+@node Chapter
+@chapter chap
+
+@documentlanguage fr
+@node Chapter fr
+@chapter chap fr
+
+Text@footnote{In footnote}.
+';
+
+
+$result_texts{'customize_special_element'} = '
+
+
+top
+***
+
+1 chap
+******
+
+2 chap fr
+*********
+
+Text.
+';
+
+$result_sectioning{'customize_special_element'} = {
+  'structure' => {
+    'section_childs' => [
+      {
+        'cmdname' => 'top',
+        'extra' => {
+          'associated_node' => {
+            'cmdname' => 'node',
+            'extra' => {
+              'normalized' => 'Top'
+            },
+            'structure' => {}
+          }
+        },
+        'structure' => {
+          'section_childs' => [
+            {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'associated_node' => {
+                  'cmdname' => 'node',
+                  'extra' => {
+                    'normalized' => 'Chapter'
+                  },
+                  'structure' => {}
+                }
+              },
+              'structure' => {
+                'section_level' => 1,
+                'section_number' => 1,
+                'section_up' => {},
+                'toplevel_prev' => {},
+                'toplevel_up' => {}
+              }
+            },
+            {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'associated_node' => {
+                  'cmdname' => 'node',
+                  'extra' => {
+                    'normalized' => 'Chapter-fr'
+                  },
+                  'structure' => {}
+                }
+              },
+              'structure' => {
+                'section_level' => 1,
+                'section_number' => 2,
+                'section_prev' => {},
+                'section_up' => {},
+                'toplevel_prev' => {},
+                'toplevel_up' => {}
+              }
+            }
+          ],
+          'section_level' => 0,
+          'section_up' => {}
+        }
+      }
+    ],
+    'section_level' => -1
+  }
+};
+$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
 = 
$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_prev'}
 = 
$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_up'}
 = 
$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[1]{'structure'}{'section_prev'}
 = 
$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0];
+$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[1]{'structure'}{'section_up'}
 = 
$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[1]{'structure'}{'toplevel_prev'}
 = 
$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0];
+$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[1]{'structure'}{'toplevel_up'}
 = 
$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'customize_special_element'}{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
 = $result_sectioning{'customize_special_element'};
+
+$result_nodes{'customize_special_element'} = {
+  'cmdname' => 'node',
+  'extra' => {
+    'associated_section' => {
+      'cmdname' => 'top',
+      'extra' => {},
+      'structure' => {}
+    },
+    'normalized' => 'Top'
+  },
+  'structure' => {
+    'node_next' => {
+      'cmdname' => 'node',
+      'extra' => {
+        'associated_section' => {
+          'cmdname' => 'chapter',
+          'extra' => {},
+          'structure' => {
+            'section_number' => 1
+          }
+        },
+        'normalized' => 'Chapter'
+      },
+      'structure' => {
+        'node_next' => {
+          'cmdname' => 'node',
+          'extra' => {
+            'associated_section' => {
+              'cmdname' => 'chapter',
+              'extra' => {},
+              'structure' => {
+                'section_number' => 2
+              }
+            },
+            'normalized' => 'Chapter-fr'
+          },
+          'structure' => {
+            'node_prev' => {},
+            'node_up' => {}
+          }
+        },
+        'node_prev' => {},
+        'node_up' => {}
+      }
+    }
+  }
+};
+$result_nodes{'customize_special_element'}{'structure'}{'node_next'}{'structure'}{'node_next'}{'structure'}{'node_prev'}
 = $result_nodes{'customize_special_element'}{'structure'}{'node_next'};
+$result_nodes{'customize_special_element'}{'structure'}{'node_next'}{'structure'}{'node_next'}{'structure'}{'node_up'}
 = $result_nodes{'customize_special_element'};
+$result_nodes{'customize_special_element'}{'structure'}{'node_next'}{'structure'}{'node_prev'}
 = $result_nodes{'customize_special_element'};
+$result_nodes{'customize_special_element'}{'structure'}{'node_next'}{'structure'}{'node_up'}
 = $result_nodes{'customize_special_element'};
+
+$result_menus{'customize_special_element'} = {
+  'cmdname' => 'node',
+  'extra' => {
+    'normalized' => 'Top'
+  },
+  'structure' => {}
+};
+
+$result_errors{'customize_special_element'} = [];
+
+
+$result_floats{'customize_special_element'} = {};
+
+
+1;
diff --git 
a/tp/t/results/init_files_tests/customize_special_element/res_html/Chapter-fr.html
 
b/tp/t/results/init_files_tests/customize_special_element/res_html/Chapter-fr.html
new file mode 100644
index 0000000000..33fa9fc74e
--- /dev/null
+++ 
b/tp/t/results/init_files_tests/customize_special_element/res_html/Chapter-fr.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Chapter fr (top)</title>
+
+<meta name="description" content="Chapter fr (top)">
+<meta name="keywords" content="Chapter fr (top)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="index.html" rel="start" title="Top">
+<link href="index.html#t_contents" rel="contents" title="&rArr; La Table des 
mati&egrave;res">
+<link href="index.html" rel="up" title="Top">
+<link href="Chapter.html" rel="prev" title="Chapter">
+
+
+</head>
+
+<body lang="en">
+<div class="chapter-level-extent" id="Chapter-fr">
+<div class="nav-panel">
+<p>
+Pr&eacute;c&eacute;dent: <a href="Chapter.html" accesskey="p" 
rel="prev">chap</a>, Monter: <a href="index.html" accesskey="u" 
rel="up">top</a> &nbsp; [<a href="index.html#t_contents" title="Table des 
mati&egrave;res" rel="contents">Table des mati&egrave;res</a>] &nbsp; </p>
+</div>
+<hr>
+<h2 class="chapter" id="chap-fr">2 chap fr</h2>
+
+<p>Text<a class="footnote" id="DOCF1" 
href="customize_special_element_fot.html#FOOT1"><sup>1</sup></a>.
+</p></div>
+
+
+
+</body>
+</html>
diff --git 
a/tp/t/results/init_files_tests/customize_special_element/res_html/Chapter.html 
b/tp/t/results/init_files_tests/customize_special_element/res_html/Chapter.html
new file mode 100644
index 0000000000..4ded623c89
--- /dev/null
+++ 
b/tp/t/results/init_files_tests/customize_special_element/res_html/Chapter.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Chapter (top)</title>
+
+<meta name="description" content="Chapter (top)">
+<meta name="keywords" content="Chapter (top)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="index.html" rel="start" title="Top">
+<link href="index.html#t_contents" rel="contents" title="&rArr; La Table des 
mati&egrave;res">
+<link href="index.html" rel="up" title="Top">
+<link href="Chapter-fr.html" rel="next" title="Chapter fr">
+<link href="index.html" rel="prev" title="Top">
+
+
+</head>
+
+<body lang="en">
+<div class="chapter-level-extent" id="Chapter">
+<div class="nav-panel">
+<p>
+Next: <a href="Chapter-fr.html" accesskey="n" rel="next">chap fr</a>, 
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#t_contents" title="Table of contents" 
rel="contents">Contents</a>] &nbsp; </p>
+</div>
+<hr>
+<h2 class="chapter" id="chap">1 chap</h2>
+
+</div>
+
+
+
+</body>
+</html>
diff --git 
a/tp/t/results/init_files_tests/customize_special_element/res_html/customize_special_element_fot.html
 
b/tp/t/results/init_files_tests/customize_special_element/res_html/customize_special_element_fot.html
new file mode 100644
index 0000000000..eaa7dd52c3
--- /dev/null
+++ 
b/tp/t/results/init_files_tests/customize_special_element/res_html/customize_special_element_fot.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>&rArr; Les Notes de bas de page (top)</title>
+
+<meta name="description" content="&rArr; Les Notes de bas de page (top)">
+<meta name="keywords" content="&rArr; Les Notes de bas de page (top)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="index.html" rel="start" title="Top">
+<link href="index.html#t_contents" rel="contents" title="&rArr; La Table des 
mati&egrave;res">
+
+
+</head>
+
+<body lang="en">
+<div class="element-footnotes" id="t_footnotes">
+<div class="nav-panel">
+<p>
+ &nbsp; [<a href="index.html#t_contents" title="Table des mati&egrave;res" 
rel="contents">Table des mati&egrave;res</a>]</p>
+</div>
+<hr>
+<h4 class="footnotes-heading">&rArr; Les <em class="emph">Notes de bas de 
page</em></h4>
+
+<h5 class="footnote-body-heading"><a id="FOOT1" 
href="Chapter-fr.html#DOCF1">(1)</a></h5>
+<p>In footnote</p>
+</div><hr>
+<div class="nav-panel">
+<p>
+ &nbsp; [<a href="index.html#t_contents" title="Table des mati&egrave;res" 
rel="contents">Table des mati&egrave;res</a>]</p>
+</div>
+
+
+
+</body>
+</html>
diff --git 
a/tp/t/results/init_files_tests/customize_special_element/res_html/index.html 
b/tp/t/results/init_files_tests/customize_special_element/res_html/index.html
new file mode 100644
index 0000000000..ae78ab3b86
--- /dev/null
+++ 
b/tp/t/results/init_files_tests/customize_special_element/res_html/index.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Top (top)</title>
+
+<meta name="description" content="Top (top)">
+<meta name="keywords" content="Top (top)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="#Top" rel="start" title="Top">
+<link href="#t_contents" rel="contents" title="The Table of Contents">
+<link href="Chapter.html" rel="next" title="Chapter">
+<style type="text/css">
+<!--
+ul.toc-numbered-mark {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en">
+
+
+
+<div class="top-level-extent" id="Top">
+<div class="nav-panel">
+<p>
+Next: <a href="Chapter.html" accesskey="n" rel="next">chap</a> &nbsp; [<a 
href="#t_contents" title="Table of contents" rel="contents">Contents</a>]</p>
+</div>
+<hr>
+<h1 class="top" id="top">top</h1>
+
+<div class="element-contents" id="t_contents">
+<h2 class="contents-heading">The <em class="emph">Table of Contents</em></h2>
+
+<div class="contents">
+
+<ul class="toc-numbered-mark">
+  <li><a id="toc-chap" href="Chapter.html">1 chap</a></li>
+  <li><a id="toc-chap-fr" href="Chapter-fr.html">2 chap fr</a></li>
+</ul>
+</div>
+</div>
+<div class="element-shortcontents">
+
+<div class="shortcontents">
+<ul class="toc-numbered-mark">
+<li><a id="stoc-chap" href="#toc-chap">1 chap</a></li>
+<li><a id="stoc-chap-fr" href="#toc-chap-fr">2 chap fr</a></li>
+</ul>
+</div>
+</div>
+</div>
+<hr>
+<div class="nav-panel">
+<p>
+Next: <a href="Chapter.html" accesskey="n" rel="next">chap</a> &nbsp; [<a 
href="#t_contents" title="Table of contents" rel="contents">Contents</a>]</p>
+</div>
+
+
+
+</body>
+</html>



reply via email to

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