texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Wed, 25 Aug 2021 10:30:25 -0400 (EDT)

branch: master
commit 1a73810c71f1427f169feadaca8597ee1adfeb36
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Aug 25 16:30:10 2021 +0200

    * tp/Texinfo/Common.pm (%default_parser_state_configuration)
    (%default_parser_customization_values, @variable_other_settables)
    (@parser_options), tp/Texinfo/Convert/Text.pm (converter),
    tp/Texinfo/ParserNonXS.pm (%parser_state_configuration),
    (_setup_parser, simple_parser), texi2any.pl,
    tp/Texinfo/XS/parsetexi/Parsetexi.pm (%parser_default_configuration)
    (parser): rename 'expanded_formats' key as 'EXPANDED_FORMATS' in
    the configuration setting and in the parsers.
    Move %default_parser_state_configuration out of Common.pm to
    ParserNonXS.pm, renaming it %parser_state_configuration.
    Put the keys that are actually parser options in
    %default_parser_customization_values (EXPANDED_FORMATS and
    documentlanguage).  Remove correspondingly @parser_options.
    Do not set defaults for parse configuration in texi2any.pl
    and in Parsetexi.pm according to %default_parser_state_configuration.
    Do not set $parser_options for keys that are alreay in configuration.
---
 ChangeLog                                          |  19 +
 doc/texinfo.texi                                   |   2 +-
 tp/Texinfo/Common.pm                               |  62 +--
 tp/Texinfo/Convert/Converter.pm                    |   2 +
 tp/Texinfo/Convert/Text.pm                         |   4 +-
 tp/Texinfo/ParserNonXS.pm                          |  47 +-
 tp/Texinfo/XS/parsetexi/Parsetexi.pm               |   5 +-
 tp/t/16raw.t                                       |  22 +-
 tp/t/50value.t                                     |   2 +-
 tp/t/55conditionals.t                              |  20 +-
 tp/t/57invalid_nestings.t                          |   4 +-
 tp/t/60macro.t                                     |   2 +-
 tp/t/92formatting.t                                |  14 +-
 tp/t/converters_tests.t                            |  10 +-
 tp/t/html_tests.t                                  |   2 +-
 tp/t/languages.t                                   |   4 +-
 tp/t/latex_tests.t                                 |  12 +
 tp/t/nodenormalization.t                           |   2 +-
 tp/t/plaintext_tests.t                             |   6 +-
 tp/t/results/latex_tests/indices.pl                | 524 ++++++++++++++++++++-
 .../latex_tests/indices/res_latex/indices.tex      |  11 +
 tp/t/test_utils.pl                                 |   6 +-
 tp/t/xml_tests.t                                   |   6 +-
 tp/tests/layout/list-of-tests                      |   2 +-
 tp/texi2any.pl                                     |  51 +-
 25 files changed, 684 insertions(+), 157 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 530d7e2..7fc3de7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2021-08-25  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Common.pm (%default_parser_state_configuration)
+       (%default_parser_customization_values, @variable_other_settables)
+       (@parser_options), tp/Texinfo/Convert/Text.pm (converter),
+       tp/Texinfo/ParserNonXS.pm (%parser_state_configuration),
+       (_setup_parser, simple_parser), texi2any.pl,
+       tp/Texinfo/XS/parsetexi/Parsetexi.pm (%parser_default_configuration)
+       (parser): rename 'expanded_formats' key as 'EXPANDED_FORMATS' in
+       the configuration setting and in the parsers.
+       Move %default_parser_state_configuration out of Common.pm to
+       ParserNonXS.pm, renaming it %parser_state_configuration.
+       Put the keys that are actually parser options in
+       %default_parser_customization_values (EXPANDED_FORMATS and
+       documentlanguage).  Remove correspondingly @parser_options.
+       Do not set defaults for parse configuration in texi2any.pl
+       and in Parsetexi.pm according to %default_parser_state_configuration.
+       Do not set $parser_options for keys that are alreay in configuration.
+
 2021-08-24  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (output_internal_links):
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index 51f1277..4cd50d9 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -7810,7 +7810,7 @@ any cross-referencing will simply use a bare number.
 Specifies a cross-reference label for this float.  If given, this
 float is automatically given a number, and will appear in any
 @code{@@listoffloats} output (@pxref{@code{@@listoffloats}}).  Cross
-references to @var{label} are allowed.
+references to @var{label} are allowed, (for example see @ref{fig:ex1}).
 
 @cindex Floats @subentry making unnumbered
 @cindex Unnumbered float, creating
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 73d3911..4c9d7c3 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -98,50 +98,11 @@ sub __p($$) {
   return Locale::Messages::dpgettext($messages_textdomain, $context, $msgid);
 }
 
-# these are the default values for the parser state that may be 
-# initialized to values given by the user.
-# They are defined here, because they are used below and we 
-# don't want Texinfo::Common to use Texinfo::Parser.
-our %default_parser_state_configuration = (
-  'expanded_formats' => [],
-  'include_directories' => [ '.' ],
-  # these are the user-added indices.  May be an array reference on names
-  # or an hash reference in the same format than %index_names below
-  'indices' => [],
-  # the following are dynamically modified during the document parsing.
-  'aliases' => {},            # key is a command name value is the alias
-  'documentlanguage' => undef,
-                              # Current documentlanguage set by 
-                              # @documentlanguage
-  'explained_commands' => {}, # the key is a command name, either acronym
-                              # or abbr, the value is a hash.  The key hash 
-                              # is a normalized first argument of the 
-                              # corresponding command, the value is the 
-                              # contents array of the previous command with
-                              # this first arg and a second arg.
-  'labels'          => {},    # keys are normalized label names, as described
-                              # in the `HTML Xref' node.  Value should be
-                              # a node/anchor or float in the tree.
-  'targets' => [],            # array of elements used to build 'labels'
-  'macros' => {},             # the key is the user-defined macro name.  The 
-                              # value is the reference on a macro element 
-                              # as obtained by parsing the @macro
-  'merged_indices' => {},     # the key is merged in the value
-  'sections_level' => 0,      # modified by raise/lowersections
-  'values' => {'txicommandconditionals' => 1},
-                              # the key is the name, the value the @set name 
-                              # argument.  A Texinfo tree may also be used.
-  'info' => {
-    'novalidate' => 0,        # same as setting @novalidate.
-    'input_encoding_name' => 'utf-8',
-    'input_perl_encoding' => 'utf-8'
-  },
-  'in_gdt' => 0 # whether we are being called by gdt
-);
-
 
 # Customization variables obeyed by the parser, and the default values.
 our %default_parser_customization_values = (
+  'documentlanguage' => undef,
+  'EXPANDED_FORMATS' => [],
   '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.
@@ -214,6 +175,7 @@ our %document_settable_unique_at_commands = (
   'evenfooting'       => undef,
   'oddheading'        => undef,
   'oddfooting'        => undef,
+  # FIXME add afourpaper and similar?
 );
 
 my @command_line_settables = (
@@ -224,10 +186,6 @@ my @command_line_settables = (
   'VERBOSE'
 );
 
-# documented in the Texinfo::Parser pod section
-# all are lower cased in texi2any.pl
-my @parser_options = map {uc($_)} (keys(%default_parser_state_configuration));
-
 our @variable_string_settables = (
 'AFTER_ABOUT',
 'AFTER_BODY_OPEN',
@@ -361,7 +319,7 @@ my @variable_other_settables = (
   'MISC_BUTTONS', 'CHAPTER_BUTTONS', 'BUTTONS_NAME',
   'BUTTONS_EXAMPLE', 'SPECIAL_ELEMENTS_NAME', 'SPECIAL_ELEMENTS_CLASS',
   'ACTIVE_ICONS', 'PASSIVE_ICONS',
-  'CSS_FILES', 'CSS_REFS', 
+  'CSS_FILES', 'CSS_REFS', 'EXPANDED_FORMATS',
   'GLOBAL_COMMANDS',
 );
 
@@ -369,7 +327,7 @@ my %valid_options;
 foreach my $var (keys(%document_settable_at_commands), 
          keys(%document_settable_unique_at_commands),
          @command_line_settables, @variable_string_settables, 
-         @variable_other_settables, @parser_options) {
+         @variable_other_settables) {
   $valid_options{$var} = 1;
 }
 
@@ -395,7 +353,6 @@ my %customization_variable_classes = (
   'command_line_settables' => \@command_line_settables,
   'variable_string_settables' => \@variable_string_settables,
   'variable_other_settables' => \@variable_other_settables,
-  'parser_options' => \@parser_options,
 );
 
 my %valid_tree_transformations;
@@ -516,6 +473,12 @@ our %line_commands = (
   'setchapternewpage' => 1, # off on odd
 
   # only relevant in TeX, and special
+  #'everyheading'      => 'line',  # @*heading @*footing use @|
+  #'everyfooting'      => 'line',  # + @thispage @thissectionname
+  #'evenheading'       => 'line',  # @thissectionnum @thissection
+  #'evenfooting'       => 'line',  # @thischaptername @thischapternum
+  #'oddheading'        => 'line',  # @thischapter @thistitle @thisfile
+  #'oddfooting'        => 'line',
   'everyheading'      => 'lineraw',  # @*heading @*footing use @|
   'everyfooting'      => 'lineraw',  # + @thispage @thissectionname
   'evenheading'       => 'lineraw',  # @thissectionnum @thissection
@@ -837,9 +800,6 @@ foreach my $def_command(keys %def_map) {
   $command_index{$def_command.'x'} = $command_index{$def_command};
 }
 
-#print STDERR "".Data::Dumper->Dump([\%def_aliases]);
-#print STDERR "".Data::Dumper->Dump([\%def_prepended_content]);
-
 $block_commands{'multitable'} = 'multitable';
 $block_item_commands{'multitable'} = 1;
 
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index ea34036..05d3589 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -230,6 +230,8 @@ sub converter(;$)
       } else {
         $converter->{$key} = $conf->{$key};
       }
+      # configuration set here, in general coming from command-line
+      # will not be reset by set_conf.
       $converter->{'set'}->{$key} = 1;
     }
   }
diff --git a/tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm
index b66c6f4..53561e3 100644
--- a/tp/Texinfo/Convert/Text.pm
+++ b/tp/Texinfo/Convert/Text.pm
@@ -631,8 +631,8 @@ sub converter($)
         }
       }
     }
-    if (!$expanded_formats and $converter->{'parser'}->{'expanded_formats'}) {
-      $expanded_formats = $converter->{'parser'}->{'expanded_formats'};
+    if (!$expanded_formats and $converter->{'parser'}->{'EXPANDED_FORMATS'}) {
+      $expanded_formats = $converter->{'parser'}->{'EXPANDED_FORMATS'};
     }
   }
   if ($expanded_formats) {
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 7710c3d..7aca82e 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -105,8 +105,45 @@ sub N__($)
   return $_[0];
 }
 
+# these are the default values for the parser state
+my %parser_state_configuration = (
+  'include_directories' => [ '.' ],
+  # these are the user-added indices.  May be an array reference on names
+  # or an hash reference in the same format than %index_names below
+  'indices' => [],
+  # the following are dynamically modified during the document parsing.
+  'aliases' => {},            # key is a command name value is the alias
+  'explained_commands' => {}, # the key is a command name, either acronym
+                              # or abbr, the value is a hash.  The key hash 
+                              # is a normalized first argument of the 
+                              # corresponding command, the value is the 
+                              # contents array of the previous command with
+                              # this first arg and a second arg.
+  'labels'          => {},    # keys are normalized label names, as described
+                              # in the `HTML Xref' node.  Value should be
+                              # a node/anchor or float in the tree.
+  'targets' => [],            # array of elements used to build 'labels'
+  'macros' => {},             # the key is the user-defined macro name.  The 
+                              # value is the reference on a macro element 
+                              # as obtained by parsing the @macro
+  'merged_indices' => {},     # the key is merged in the value
+  'sections_level' => 0,      # modified by raise/lowersections
+  'values' => {'txicommandconditionals' => 1},
+                              # the key is the name, the value the @set name 
+                              # argument.  A Texinfo tree may also be used.
+                              # The txicommandconditionals is a special value
+                              # that is set to mark that @ifcommandnotdefined
+                              # is implemented
+  'info' => {
+    'novalidate' => 0,        # same as setting @novalidate.
+    'input_encoding_name' => 'utf-8',
+    'input_perl_encoding' => 'utf-8'
+  },
+  'in_gdt' => 0 # whether we are being called by gdt
+);
+
 my %parser_default_configuration = (
-    %Texinfo::Common::default_parser_state_configuration,
+    %parser_state_configuration,
     %Texinfo::Common::default_parser_customization_values,
     %Texinfo::Common::default_structure_customization_values,
     'clickstyle' => 'arrow',
@@ -118,7 +155,7 @@ my %parser_default_configuration = (
 
 # the other possible keys for the parser state are:
 #
-# expanded_formats_hash   each key comes from expanded_formats value is 1
+# expanded_formats_hash   each key comes from EXPANDED_FORMATS value is 1
 # index_names             a structure holding the link between index 
 #                         names, merged indices,
 #                         initial value is %index_names in Texinfo::Common.
@@ -672,7 +709,7 @@ sub _setup_parser {
 
   # turn the array to a hash for speed.  Not sure it really matters for such
   # a small array.
-  foreach my $expanded_format(@{$parser->{'expanded_formats'}}) {
+  foreach my $expanded_format(@{$parser->{'EXPANDED_FORMATS'}}) {
     $parser->{'expanded_formats_hash'}->{$expanded_format} = 1;
   }
 
@@ -722,7 +759,7 @@ sub simple_parser(;$)
 
   # turn the array to a hash for speed.  Not sure it really matters for such
   # a small array.
-  foreach my $expanded_format(@{$parser->{'expanded_formats'}}) {
+  foreach my $expanded_format(@{$parser->{'EXPANDED_FORMATS'}}) {
     $parser->{'expanded_formats_hash'}->{$expanded_format} = 1;
   }
 
@@ -5862,7 +5899,7 @@ C<@synindex>).  These options are described below in 
L</Texinfo Parser options>.
 
 =over
 
-=item expanded_formats
+=item EXPANDED_FORMATS
 
 An array reference of the output formats for which C<@ifI<FORMAT>> 
 conditional blocks should be expanded.  Default is empty.
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.pm 
b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
index ee88072..d972758 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
@@ -50,8 +50,7 @@ sub get_conf($$)
 }
 
 my %parser_default_configuration =
-  (%Texinfo::Common::default_parser_state_configuration,
-   %Texinfo::Common::default_parser_customization_values);
+  (%Texinfo::Common::default_parser_customization_values);
 
 use Storable qw(dclone); # standard in 5.007003
 
@@ -95,7 +94,7 @@ sub parser (;$$)
            store_value ($v, "<<UNKNOWN VALUE>>");
          }
        }
-      } elsif ($key eq 'expanded_formats') {
+      } elsif ($key eq 'EXPANDED_FORMATS') {
         clear_expanded_formats ();
 
         for my $f (@{$conf->{$key}}) {
diff --git a/tp/t/16raw.t b/tp/t/16raw.t
index 7b426bb..cd6d894 100644
--- a/tp/t/16raw.t
+++ b/tp/t/16raw.t
@@ -27,7 +27,7 @@ in  v---erbatim`` <>
 in verbatim2
 @end verbatim
 ',
-{'expanded_formats' => ['tex', 'html']}
+{'EXPANDED_FORMATS' => ['tex', 'html']}
 ],
 ['misc_raw_comments','
 @html @c comment space
@@ -41,7 +41,7 @@ in verbatim @c in verbatim
 in verbatim2
 @end verbatim
 ',
-{'expanded_formats' => ['tex', 'html']}
+{'EXPANDED_FORMATS' => ['tex', 'html']}
 ],
 ['raw_in_para',
 'para
@@ -64,7 +64,7 @@ in tex2
 
 End.
 ',
-{'expanded_formats' => ['tex', 'html']}
+{'EXPANDED_FORMATS' => ['tex', 'html']}
 ],
 ['raw_in_example',
 '@example
@@ -94,7 +94,7 @@ $$
 @end example
 
 ',
-{'expanded_formats' => ['tex', 'html']}
+{'EXPANDED_FORMATS' => ['tex', 'html']}
 ],
 ['braces_in_tex',
 '
@@ -118,7 +118,7 @@ $$
 @end example
 
 ',
-{'expanded_formats' => ['tex']}
+{'EXPANDED_FORMATS' => ['tex']}
 ],
 ['lone_braces_in_html',
 '@html
@@ -129,7 +129,7 @@ $$
 {
 @end html
 ',
-{'expanded_formats' => ['html']}
+{'EXPANDED_FORMATS' => ['html']}
 ],
 ['verbatim_and_verbatiminclude',
 '@verbatim
@@ -283,7 +283,7 @@ Before the opening command @verbatim
 in block
 @end verbatim. A symbol after the closing command.
 ',
-{'expanded_formats' => ['tex', 'html']}
+{'EXPANDED_FORMATS' => ['tex', 'html']}
 ],
 ['inlinefmt',
 'A @inlinefmt{plaintext, plaintext `` @lbracechar{} } a.  Now html
@@ -306,7 +306,7 @@ A @inlineraw{plaintext, plaintext
 in <i>@acronym{HTML}</i>}.
 @end example
 ',
-{'expanded_formats' => ['plaintext', 'html']}
+{'EXPANDED_FORMATS' => ['plaintext', 'html']}
 ],
 ['raw_in_style',
 '@code{
@@ -319,7 +319,7 @@ in html
 @html
 in html
 @end html
-}',{'expanded_formats' => ['html']}, {'expanded_formats' => ['html']}
+}',{'EXPANDED_FORMATS' => ['html']}, {'expanded_formats' => ['html']}
 ],
 ['verbatim_in_brace_command',
 '@samp{
@@ -356,7 +356,7 @@ This is some html
 
 This is some \LaTeX{}
 ',
-{'expanded_formats' => ['tex']}
+{'EXPANDED_FORMATS' => ['tex']}
 ],
 ['verbatim_not_closed',
 '@verbatim
@@ -389,7 +389,7 @@ some verbatim @
 '
 @tex in tex @end tex
 ',
-{'expanded_formats' => ['tex']}
+{'EXPANDED_FORMATS' => ['tex']}
 ],
 );
 
diff --git a/tp/t/50value.t b/tp/t/50value.t
index 70b6e66..b9a4eeb 100644
--- a/tp/t/50value.t
+++ b/tp/t/50value.t
@@ -289,7 +289,7 @@ After page on it\'s own line.
 @set bye_macro @bye
 
 @value{bye_macro}',
-{'expanded_formats' => []}
+{'EXPANDED_FORMATS' => []}
 ],
 ['value_in_invalid_documentencoding',
 '@set badvalue bad
diff --git a/tp/t/55conditionals.t b/tp/t/55conditionals.t
index 8072d74..ffeb0d6 100644
--- a/tp/t/55conditionals.t
+++ b/tp/t/55conditionals.t
@@ -126,7 +126,7 @@ This is iftex text.
 @ifnottex
 This is ifnottex text.
 @end ifnottex
-', { 'expanded_formats' => ['info', 'html'] }],
+', { 'EXPANDED_FORMATS' => ['info', 'html'] }],
 ['commands_in_ifset',
 '
 @ifset notset
@@ -331,20 +331,20 @@ This is ignored
 @ifplaintext
 this text will only appear in plain text.
 @end ifplaintext
-', {'expanded_formats' => ['info']}
+', {'EXPANDED_FORMATS' => ['info']}
 ],
 ['plaintext_ifinfo',
 '
 @ifinfo
 this text will appear only in Info and plain text.
 @end ifinfo
-', {'expanded_formats' => ['plaintext']}
+', {'EXPANDED_FORMATS' => ['plaintext']}
 ],
 ['ifnotinfo_exception',
 '@ifnotinfo
 in ifnotinfo
 @end ifnotinfo
-', {'expanded_formats' => ['plaintext']}
+', {'EXPANDED_FORMATS' => ['plaintext']}
 ],
 ['info_ifinfo_ifnotplaintext',
 '@ifinfo
@@ -352,7 +352,7 @@ in ifnotinfo
 This will be in Info, but not plain text.
 @end ifnotplaintext
 @end ifinfo
-', {'expanded_formats' => ['info']}
+', {'EXPANDED_FORMATS' => ['info']}
 ],
 ['plaintext_ifinfo_ifnotplaintext',
 '@ifinfo
@@ -360,7 +360,7 @@ This will be in Info, but not plain text.
 This will be in Info, but not plain text.
 @end ifnotplaintext
 @end ifinfo
-', {'expanded_formats' => ['plaintext']}
+', {'EXPANDED_FORMATS' => ['plaintext']}
 ],
 ['text_on_conditional_line_expanded',
 '@ifnothtml text following ifnothtml,
@@ -372,13 +372,13 @@ a
 '@ifnothtml text following ifnothtml,
 a
 @end ifnothtml
-', {'expanded_formats' => ['html']}
+', {'EXPANDED_FORMATS' => ['html']}
 ],
 ['additional_space_in_end_conditional',
 '@ifnothtml
 not html
 @end  ifnothtml
-', {'expanded_formats' => ['html']}
+', {'EXPANDED_FORMATS' => ['html']}
 ],
 ['additional_space_in_end_conditional_expanded',
 '@ifnothtml
@@ -486,8 +486,8 @@ strongalias @@alias is wrongly not defined
 );
 
 for my $test (@test_cases) {
-  if (!defined $test->[2]->{'expanded_formats'}) {
-    $test->[2]->{'expanded_formats'} = [];
+  if (!defined $test->[2]->{'EXPANDED_FORMATS'}) {
+    $test->[2]->{'EXPANDED_FORMATS'} = [];
   }
 }
 
diff --git a/tp/t/57invalid_nestings.t b/tp/t/57invalid_nestings.t
index e336420..11ef21a 100644
--- a/tp/t/57invalid_nestings.t
+++ b/tp/t/57invalid_nestings.t
@@ -31,13 +31,13 @@ my @test_cases = (
 ['raw_block_on_line',
 '@cindex @tex
 ',
-{'expanded_formats' => ['tex']}
+{'EXPANDED_FORMATS' => ['tex']}
 ],
 ['ignored_text',
 '@node before ignore @ifinfo
 in ifinfo
 @end ifinfo on the node line',
-{'expanded_formats' => []}
+{'EXPANDED_FORMATS' => []}
 ],
 ['in_table',
 '
diff --git a/tp/t/60macro.t b/tp/t/60macro.t
index 30fcd29..f74b42b 100644
--- a/tp/t/60macro.t
+++ b/tp/t/60macro.t
@@ -522,7 +522,7 @@ Call macroseven
 @macroseven{aaa}
 
 ',
-{'expanded_formats' => []}
+{'EXPANDED_FORMATS' => []}
 ],
 ['expansion_order',
 '@macro bidule{arg}
diff --git a/tp/t/92formatting.t b/tp/t/92formatting.t
index 18f5157..fb52727 100644
--- a/tp/t/92formatting.t
+++ b/tp/t/92formatting.t
@@ -20,7 +20,7 @@ my @test_cases = (
 ],
 ['texi_cond',
   undef, {'test_file' => 'cond.texi',
-    'expanded_formats' => ['html', 'info'],
+    'EXPANDED_FORMATS' => ['html', 'info'],
   },
 ],
 ['cond',
@@ -30,37 +30,37 @@ my @test_cases = (
 ['cond_xml',
   undef, {'test_file' => 'cond.texi',
     'test_formats' => ['xml'],
-    'expanded_formats' => ['xml'],
+    'EXPANDED_FORMATS' => ['xml'],
   },
 ],
 ['cond_no-ifhtml_no-ifinfo_no-iftex',
   undef, {'test_file' => 'cond.texi',
-    'expanded_formats' => [],
+    'EXPANDED_FORMATS' => [],
   },
 ],
 ['cond_ifhtml_ifinfo_iftex',
   undef, {'test_file' => 'cond.texi',
-    'expanded_formats' => ['html', 'info', 'tex'],
+    'EXPANDED_FORMATS' => ['html', 'info', 'tex'],
   },
   {'expanded_formats' => ['html', 'info', 'tex'], },
 ],
 ['cond_info',
   undef, {'test_file' => 'cond.texi',
     'test_formats' => ['info'],
-    'expanded_formats' => ['info', 'plaintext'],
+    'EXPANDED_FORMATS' => ['info', 'plaintext'],
   },
 ],
 ['cond_info_no-ifhtml_no-ifinfo_no-iftex',
   undef, {'test_file' => 'cond.texi',
     'test_formats' => ['info'],
-    'expanded_formats' => [],
+    'EXPANDED_FORMATS' => [],
   },
   {'expanded_formats' => []}
 ],
 ['cond_info_ifhtml_ifinfo_iftex',
   undef, {'test_file' => 'cond.texi',
     'test_formats' => ['info'],
-    'expanded_formats' => ['info', 'html', 'tex'],
+    'EXPANDED_FORMATS' => ['info', 'html', 'tex'],
   },
   {'expanded_formats' => ['info', 'html', 'tex'],}
 ],
diff --git a/tp/t/converters_tests.t b/tp/t/converters_tests.t
index 287db5f..5652b09 100644
--- a/tp/t/converters_tests.t
+++ b/tp/t/converters_tests.t
@@ -631,18 +631,18 @@ fff2
 '],
 ['raw_block_commands',
 $raw_commands_text,
-{'expanded_formats' => ['tex', 'docbook', 'html', 'xml', 'latex']}
+{'EXPANDED_FORMATS' => ['tex', 'docbook', 'html', 'xml', 'latex']}
 ],
 ['raw_block_commands_expand_tex',
 $raw_commands_text,
-{'expanded_formats' => ['tex', 'docbook', 'html', 'xml', 'latex']},
+{'EXPANDED_FORMATS' => ['tex', 'docbook', 'html', 'xml', 'latex']},
 {'expanded_formats' => ['tex']},
 ],
 ['inline',
 $inline_text,
 ],
 ['inline_expand_tex',
-$inline_text, {'expanded_formats' => ['tex']},
+$inline_text, {'EXPANDED_FORMATS' => ['tex']},
 {'expanded_formats' => ['tex']},
 ],
 ['inlinefmtifelse',
@@ -664,7 +664,7 @@ $inline_text, {'expanded_formats' => ['tex']},
 
 @inlinefmtifelse{latex,if latex,else latex}.
 ',
-{'expanded_formats' => []}
+{'EXPANDED_FORMATS' => []}
 ],
 ['inlineifsetifclear',
 '@inlineifclear{aaa, iclear first }.
@@ -968,7 +968,7 @@ Macro not unmacroed @othermacro{}.
 
 Macros that should not be defined: @mymacro{}. @macroarg{with arg}.
 
-', {'expanded_formats' => ['html']}, {'expanded_formats' => ['html']}
+', {'EXPANDED_FORMATS' => ['html']}, {'expanded_formats' => ['html']}
 ], 
 );
 
diff --git a/tp/t/html_tests.t b/tp/t/html_tests.t
index 6854dd3..a0c7430 100644
--- a/tp/t/html_tests.t
+++ b/tp/t/html_tests.t
@@ -196,7 +196,7 @@ in detaildescription
 aa
 @end tex
 @end copying
-', {'expanded_formats' => ['tex']},
+', {'EXPANDED_FORMATS' => ['tex']},
 {'expanded_formats' => ['tex']}
 ],
 ['titles',
diff --git a/tp/t/languages.t b/tp/t/languages.t
index b07c8ce..c31cbae 100644
--- a/tp/t/languages.t
+++ b/tp/t/languages.t
@@ -141,7 +141,7 @@ $multiple_lang_chapters_text, {}, {'SPLIT' => 0}],
 ['multiple_lang_chapters_texi2html',
 $multiple_lang_chapters_text, 
 {'test_input_file_name' => 'multiple_lang_chapters.texi',
-'expanded_formats' => ['html']}, 
+'EXPANDED_FORMATS' => ['html']}, 
 {'SPLIT' => 0, 'TEXI2HTML' => 1, 'TEST' => 1}],
 );
 
@@ -149,7 +149,7 @@ $multiple_lang_chapters_text,
 my @latex_file_tests = (
 ['multiple_lang_chapters_latex',
 $multiple_lang_chapters_text,
-{'expanded_formats' => ['latex']}
+{'EXPANDED_FORMATS' => ['latex']}
 ]
 );
 
diff --git a/tp/t/latex_tests.t b/tp/t/latex_tests.t
index 825c62e..9165276 100644
--- a/tp/t/latex_tests.t
+++ b/tp/t/latex_tests.t
@@ -528,6 +528,8 @@ New para
 ['indices',
 '@setfilename indices.info
 
+@set txiindexbackslashignore
+
 @node Top
 @top top section
 
@@ -535,8 +537,18 @@ New para
 @chapter Index
 
 @cindex @math{a!"@@b} "!@@ @"a @"{o} @subentry @sortas{a!"@@b} 
sub@math{a!"@@b} sub "!@@ @"a @"{o} @seealso{@math{a!"@@b} "!@@ @"a @"{o}}
+@cindex \cmd
+@cindex totocmd @sortas{\cmd}
+
+@clear txiindexbackslashignore
+
+@cindex \some\command{} for @file{file} @c comment
+
+@findex the @r{person} index @file{aa}
 
 @printindex cp
+
+@printindex fn
 ']
 
 );
diff --git a/tp/t/nodenormalization.t b/tp/t/nodenormalization.t
index a7c0e6a..4de4496 100644
--- a/tp/t/nodenormalization.t
+++ b/tp/t/nodenormalization.t
@@ -28,7 +28,7 @@ Locale::Messages::bindtextdomain ('texinfo_document', 
't/locales');
 my $parser = Texinfo::Parser::parser({'TEST' => 1,
                                       'include_directories' => [
                                           $srcdir.'t/include/'],
-                                      'expanded_formats' => ['html', 'tex']});
+                                      'EXPANDED_FORMATS' => ['html', 'tex']});
 
 my $invalid_line = '@noindent Text @titlefont{in titlefont} @anchor{in 
anchor}@footnote{footnote} @exdent exdent';
 
diff --git a/tp/t/plaintext_tests.t b/tp/t/plaintext_tests.t
index b3045a9..80d1f77 100644
--- a/tp/t/plaintext_tests.t
+++ b/tp/t/plaintext_tests.t
@@ -90,14 +90,14 @@ Before samp. @samp{a}. after samp, w @w{in   w. after dot}  
afterw
 html
 @end html
 after.
-',{'expanded_formats' => ['html']}, {'expanded_formats' => ['html']}
+',{'EXPANDED_FORMATS' => ['html']}, {'expanded_formats' => ['html']}
 ],
 ['isolated_html_expanded',
 '
 @html
 html
 @end html
-',{'expanded_formats' => ['html']}, {'expanded_formats' => ['html']}
+',{'EXPANDED_FORMATS' => ['html']}, {'expanded_formats' => ['html']}
 ],
 ['star_at_command_formatting',
 '@macro mymacro
@@ -477,7 +477,7 @@ GGG
 HHH
 @end tex
 bbbbbbbbb1 bbbbbbbbbbb2 bbbbbbbbbb3 bbbbbbbbbbbbbb4.
-', {'expanded_formats' => ['tex']}, {'expanded_formats' => ['tex']}
+', {'EXPANDED_FORMATS' => ['tex']}, {'expanded_formats' => ['tex']}
 ],
 ['paragraphindent',
 'First
diff --git a/tp/t/results/latex_tests/indices.pl 
b/tp/t/results/latex_tests/indices.pl
index 9addc50..aab2861 100644
--- a/tp/t/results/latex_tests/indices.pl
+++ b/tp/t/results/latex_tests/indices.pl
@@ -43,6 +43,36 @@ $result_trees{'indices'} = {
           'text' => '
 ',
           'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'parent' => {},
+              'text' => 'txiindexbackslashignore',
+              'type' => 'misc_arg'
+            },
+            {
+              'parent' => {},
+              'text' => '',
+              'type' => 'misc_arg'
+            }
+          ],
+          'cmdname' => 'set',
+          'extra' => {
+            'arg_line' => ' txiindexbackslashignore
+',
+            'misc_args' => [
+              'txiindexbackslashignore',
+              ''
+            ]
+          },
+          'parent' => {}
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
         }
       ],
       'parent' => {},
@@ -84,7 +114,7 @@ $result_trees{'indices'} = {
       },
       'line_nr' => {
         'file_name' => '',
-        'line_nr' => 3,
+        'line_nr' => 5,
         'macro' => ''
       },
       'parent' => {}
@@ -121,7 +151,7 @@ $result_trees{'indices'} = {
       'level' => 0,
       'line_nr' => {
         'file_name' => '',
-        'line_nr' => 4,
+        'line_nr' => 6,
         'macro' => ''
       },
       'parent' => {}
@@ -163,7 +193,7 @@ $result_trees{'indices'} = {
       },
       'line_nr' => {
         'file_name' => '',
-        'line_nr' => 6,
+        'line_nr' => 8,
         'macro' => ''
       },
       'parent' => {}
@@ -222,7 +252,7 @@ $result_trees{'indices'} = {
                   'contents' => [],
                   'line_nr' => {
                     'file_name' => '',
-                    'line_nr' => 9,
+                    'line_nr' => 11,
                     'macro' => ''
                   },
                   'parent' => {}
@@ -256,7 +286,7 @@ $result_trees{'indices'} = {
                   'contents' => [],
                   'line_nr' => {
                     'file_name' => '',
-                    'line_nr' => 9,
+                    'line_nr' => 11,
                     'macro' => ''
                   },
                   'parent' => {}
@@ -282,7 +312,7 @@ $result_trees{'indices'} = {
                   'contents' => [],
                   'line_nr' => {
                     'file_name' => '',
-                    'line_nr' => 9,
+                    'line_nr' => 11,
                     'macro' => ''
                   },
                   'parent' => {}
@@ -339,7 +369,7 @@ $result_trees{'indices'} = {
                       'contents' => [],
                       'line_nr' => {
                         'file_name' => '',
-                        'line_nr' => 9,
+                        'line_nr' => 11,
                         'macro' => ''
                       },
                       'parent' => {}
@@ -378,7 +408,7 @@ $result_trees{'indices'} = {
                       'contents' => [],
                       'line_nr' => {
                         'file_name' => '',
-                        'line_nr' => 9,
+                        'line_nr' => 11,
                         'macro' => ''
                       },
                       'parent' => {}
@@ -412,7 +442,7 @@ $result_trees{'indices'} = {
                       'contents' => [],
                       'line_nr' => {
                         'file_name' => '',
-                        'line_nr' => 9,
+                        'line_nr' => 11,
                         'macro' => ''
                       },
                       'parent' => {}
@@ -438,7 +468,7 @@ $result_trees{'indices'} = {
                       'contents' => [],
                       'line_nr' => {
                         'file_name' => '',
-                        'line_nr' => 9,
+                        'line_nr' => 11,
                         'macro' => ''
                       },
                       'parent' => {}
@@ -477,7 +507,7 @@ $result_trees{'indices'} = {
                               'contents' => [],
                               'line_nr' => {
                                 'file_name' => '',
-                                'line_nr' => 9,
+                                'line_nr' => 11,
                                 'macro' => ''
                               },
                               'parent' => {}
@@ -511,7 +541,7 @@ $result_trees{'indices'} = {
                               'contents' => [],
                               'line_nr' => {
                                 'file_name' => '',
-                                'line_nr' => 9,
+                                'line_nr' => 11,
                                 'macro' => ''
                               },
                               'parent' => {}
@@ -537,7 +567,7 @@ $result_trees{'indices'} = {
                               'contents' => [],
                               'line_nr' => {
                                 'file_name' => '',
-                                'line_nr' => 9,
+                                'line_nr' => 11,
                                 'macro' => ''
                               },
                               'parent' => {}
@@ -551,7 +581,7 @@ $result_trees{'indices'} = {
                       'contents' => [],
                       'line_nr' => {
                         'file_name' => '',
-                        'line_nr' => 9,
+                        'line_nr' => 11,
                         'macro' => ''
                       },
                       'parent' => {}
@@ -574,7 +604,7 @@ $result_trees{'indices'} = {
               },
               'line_nr' => {
                 'file_name' => '',
-                'line_nr' => 9,
+                'line_nr' => 11,
                 'macro' => ''
               },
               'parent' => {}
@@ -582,7 +612,7 @@ $result_trees{'indices'} = {
           },
           'line_nr' => {
             'file_name' => '',
-            'line_nr' => 9,
+            'line_nr' => 11,
             'macro' => ''
           },
           'parent' => {},
@@ -590,6 +620,322 @@ $result_trees{'indices'} = {
         },
         {},
         {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => '\\cmd'
+                }
+              ],
+              'extra' => {
+                'spaces_after_argument' => '
+'
+              },
+              'parent' => {},
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'cindex',
+          'extra' => {
+            'index_entry' => {
+              'command' => {},
+              'content' => [],
+              'content_normalized' => [],
+              'in_code' => 0,
+              'index_at_command' => 'cindex',
+              'index_name' => 'cp',
+              'index_type_command' => 'cindex',
+              'key' => '\\cmd',
+              'node' => {},
+              'number' => 2
+            },
+            'spaces_before_argument' => ' '
+          },
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 12,
+            'macro' => ''
+          },
+          'parent' => {},
+          'type' => 'index_entry_command'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => 'totocmd'
+                },
+                {
+                  'parent' => {},
+                  'text' => ' ',
+                  'type' => 'empty_spaces_before_argument'
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => '\\cmd'
+                        }
+                      ],
+                      'parent' => {},
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'sortas',
+                  'contents' => [],
+                  'line_nr' => {
+                    'file_name' => '',
+                    'line_nr' => 13,
+                    'macro' => ''
+                  },
+                  'parent' => {}
+                }
+              ],
+              'extra' => {
+                'spaces_after_argument' => '
+'
+              },
+              'parent' => {},
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'cindex',
+          'extra' => {
+            'index_entry' => {
+              'command' => {},
+              'content' => [],
+              'content_normalized' => [],
+              'in_code' => 0,
+              'index_at_command' => 'cindex',
+              'index_name' => 'cp',
+              'index_type_command' => 'cindex',
+              'key' => '\\cmd',
+              'node' => {},
+              'number' => 3,
+              'sortas' => '\\cmd'
+            },
+            'sortas' => '\\cmd',
+            'spaces_before_argument' => ' '
+          },
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 13,
+            'macro' => ''
+          },
+          'parent' => {},
+          'type' => 'index_entry_command'
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'parent' => {},
+              'text' => 'txiindexbackslashignore',
+              'type' => 'misc_arg'
+            }
+          ],
+          'cmdname' => 'clear',
+          'extra' => {
+            'arg_line' => ' txiindexbackslashignore
+',
+            'misc_args' => [
+              'txiindexbackslashignore'
+            ]
+          },
+          'parent' => {}
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => '\\some\\command for '
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => 'file'
+                        }
+                      ],
+                      'parent' => {},
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'file',
+                  'contents' => [],
+                  'line_nr' => {
+                    'file_name' => '',
+                    'line_nr' => 17,
+                    'macro' => ''
+                  },
+                  'parent' => {}
+                }
+              ],
+              'extra' => {
+                'comment_at_end' => {
+                  'args' => [
+                    {
+                      'parent' => {},
+                      'text' => ' comment
+',
+                      'type' => 'misc_arg'
+                    }
+                  ],
+                  'cmdname' => 'c',
+                  'extra' => {
+                    'misc_args' => [
+                      ' comment
+'
+                    ]
+                  },
+                  'parent' => {}
+                },
+                'spaces_after_argument' => ' '
+              },
+              'parent' => {},
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'cindex',
+          'extra' => {
+            'index_entry' => {
+              'command' => {},
+              'content' => [],
+              'content_normalized' => [],
+              'in_code' => 0,
+              'index_at_command' => 'cindex',
+              'index_name' => 'cp',
+              'index_type_command' => 'cindex',
+              'key' => '\\some\\command for file',
+              'node' => {},
+              'number' => 4
+            },
+            'spaces_before_argument' => ' '
+          },
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 17,
+            'macro' => ''
+          },
+          'parent' => {},
+          'type' => 'index_entry_command'
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => 'the '
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => 'person'
+                        }
+                      ],
+                      'parent' => {},
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'r',
+                  'contents' => [],
+                  'line_nr' => {
+                    'file_name' => '',
+                    'line_nr' => 19,
+                    'macro' => ''
+                  },
+                  'parent' => {}
+                },
+                {
+                  'parent' => {},
+                  'text' => ' index '
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => 'aa'
+                        }
+                      ],
+                      'parent' => {},
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'file',
+                  'contents' => [],
+                  'line_nr' => {
+                    'file_name' => '',
+                    'line_nr' => 19,
+                    'macro' => ''
+                  },
+                  'parent' => {}
+                }
+              ],
+              'extra' => {
+                'spaces_after_argument' => '
+'
+              },
+              'parent' => {},
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'findex',
+          'extra' => {
+            'index_entry' => {
+              'command' => {},
+              'content' => [],
+              'content_normalized' => [],
+              'in_code' => 1,
+              'index_at_command' => 'findex',
+              'index_name' => 'fn',
+              'index_type_command' => 'findex',
+              'key' => 'the person index aa',
+              'node' => {},
+              'number' => 1
+            },
+            'spaces_before_argument' => ' '
+          },
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 19,
+            'macro' => ''
+          },
+          'parent' => {},
+          'type' => 'index_entry_command'
+        },
+        {
           'parent' => {},
           'text' => '
 ',
@@ -621,7 +967,44 @@ $result_trees{'indices'} = {
           },
           'line_nr' => {
             'file_name' => '',
-            'line_nr' => 11,
+            'line_nr' => 21,
+            'macro' => ''
+          },
+          'parent' => {}
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => 'fn'
+                }
+              ],
+              'extra' => {
+                'spaces_after_argument' => '
+'
+              },
+              'parent' => {},
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'printindex',
+          'extra' => {
+            'misc_args' => [
+              'fn'
+            ],
+            'spaces_before_argument' => ' '
+          },
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 23,
             'macro' => ''
           },
           'parent' => {}
@@ -633,7 +1016,7 @@ $result_trees{'indices'} = {
       'level' => 1,
       'line_nr' => {
         'file_name' => '',
-        'line_nr' => 7,
+        'line_nr' => 9,
         'macro' => ''
       },
       'number' => 1,
@@ -646,6 +1029,10 @@ 
$result_trees{'indices'}{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]
 $result_trees{'indices'}{'contents'}[0]{'contents'}[0]{'args'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[0]{'contents'}[0];
 $result_trees{'indices'}{'contents'}[0]{'contents'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[0];
 $result_trees{'indices'}{'contents'}[0]{'contents'}[1]{'parent'} = 
$result_trees{'indices'}{'contents'}[0];
+$result_trees{'indices'}{'contents'}[0]{'contents'}[2]{'args'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[0]{'contents'}[2];
+$result_trees{'indices'}{'contents'}[0]{'contents'}[2]{'args'}[1]{'parent'} = 
$result_trees{'indices'}{'contents'}[0]{'contents'}[2];
+$result_trees{'indices'}{'contents'}[0]{'contents'}[2]{'parent'} = 
$result_trees{'indices'}{'contents'}[0];
+$result_trees{'indices'}{'contents'}[0]{'contents'}[3]{'parent'} = 
$result_trees{'indices'}{'contents'}[0];
 $result_trees{'indices'}{'contents'}[0]{'parent'} = $result_trees{'indices'};
 $result_trees{'indices'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[1]{'args'}[0];
 $result_trees{'indices'}{'contents'}[1]{'args'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[1];
@@ -729,14 +1116,69 @@ 
$result_trees{'indices'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'ext
 
$result_trees{'indices'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'parent'}
 = $result_trees{'indices'}{'contents'}[4];
 $result_trees{'indices'}{'contents'}[4]{'contents'}[1]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
 $result_trees{'indices'}{'contents'}[4]{'contents'}[2] = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'};
+$result_trees{'indices'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[3]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[3];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[3]{'extra'}{'index_entry'}{'command'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[3];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[3]{'extra'}{'index_entry'}{'content'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'contents'};
+$result_trees{'indices'}{'contents'}[4]{'contents'}[3]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'contents'};
+$result_trees{'indices'}{'contents'}[4]{'contents'}[3]{'extra'}{'index_entry'}{'node'}
 = $result_trees{'indices'}{'contents'}[3];
 $result_trees{'indices'}{'contents'}[4]{'contents'}[3]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
 
$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[2]{'args'}[0]{'parent'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[2];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0];
 $result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'extra'}{'index_entry'}{'command'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'extra'}{'index_entry'}{'content'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'};
+$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'args'}[0]{'contents'};
+$result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'extra'}{'index_entry'}{'node'}
 = $result_trees{'indices'}{'contents'}[3];
 $result_trees{'indices'}{'contents'}[4]{'contents'}[4]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[5]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[6]{'args'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[6];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[6]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[7]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'contents'}[1];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'extra'}{'comment_at_end'}{'args'}[0]{'parent'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'extra'}{'comment_at_end'};
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'extra'}{'comment_at_end'}{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[8];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'extra'}{'index_entry'}{'command'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[8];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'extra'}{'index_entry'}{'content'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'contents'};
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'contents'};
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'extra'}{'index_entry'}{'node'}
 = $result_trees{'indices'}{'contents'}[3];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[8]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[9]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[1]{'args'}[0]{'parent'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[1];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[1]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[2]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[3]{'args'}[0]{'parent'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[3];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'}[3]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[10];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'extra'}{'index_entry'}{'command'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[10];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'extra'}{'index_entry'}{'content'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'};
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'args'}[0]{'contents'};
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'extra'}{'index_entry'}{'node'}
 = $result_trees{'indices'}{'contents'}[3];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[10]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[11]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[12]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[12]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[12]{'args'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[12];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[12]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[13]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[14]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'indices'}{'contents'}[4]{'contents'}[14]{'args'}[0];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[14]{'args'}[0]{'parent'} = 
$result_trees{'indices'}{'contents'}[4]{'contents'}[14];
+$result_trees{'indices'}{'contents'}[4]{'contents'}[14]{'parent'} = 
$result_trees{'indices'}{'contents'}[4];
 $result_trees{'indices'}{'contents'}[4]{'parent'} = $result_trees{'indices'};
 
 $result_texis{'indices'} = '@setfilename indices.info
 
+@set txiindexbackslashignore
+
 @node Top
 @top top section
 
@@ -744,12 +1186,23 @@ $result_texis{'indices'} = '@setfilename indices.info
 @chapter Index
 
 @cindex @math{a!"@@b} "!@@ @"a @"{o} @subentry @sortas{a!"@@b} 
sub@math{a!"@@b} sub "!@@ @"a @"{o} @seealso{@math{a!"@@b} "!@@ @"a @"{o}}
+@cindex \\cmd
+@cindex totocmd @sortas{\\cmd}
+
+@clear txiindexbackslashignore
+
+@cindex \\some\\command for @file{file} @c comment
+
+@findex the @r{person} index @file{aa}
 
 @printindex cp
+
+@printindex fn
 ';
 
 
 $result_texts{'indices'} = '
+
 top section
 ***********
 
@@ -757,6 +1210,10 @@ top section
 *******
 
 
+
+
+
+
 ';
 
 $result_sectioning{'indices'} = {
@@ -848,7 +1305,26 @@ $result_menus{'indices'} = {
   }
 };
 
-$result_errors{'indices'} = [];
+$result_errors{'indices'} = [
+  {
+    'error_line' => ':17: misplaced {
+',
+    'file_name' => '',
+    'line_nr' => 17,
+    'macro' => '',
+    'text' => 'misplaced {',
+    'type' => 'error'
+  },
+  {
+    'error_line' => ':17: misplaced }
+',
+    'file_name' => '',
+    'line_nr' => 17,
+    'macro' => '',
+    'text' => 'misplaced }',
+    'type' => 'error'
+  }
+];
 
 
 $result_floats{'indices'} = {};
@@ -856,12 +1332,22 @@ $result_floats{'indices'} = {};
 
 
 $result_converted{'latex'}->{'indices'} = '
+
 \\chapter{Index}
 \\label{anchor:chapter}%
 
 \\index[cp]{$a"!"""@b$ """!"@ \\"{a} \\"{o}!a"!"""@b@sub$a"!"""@b$ sub """!"@ 
\\"{a} \\"{o}|seealso{$a"!"""@b$ """!"@ \\"{a} \\"{o}}}%
+\\index[cp]{\\textbackslash{}cmd}%
+\\index[cp]{\\textbackslash{}cmd@totocmd}%
+
+
+\\index[cp]{\\textbackslash{}some\\textbackslash{}command for \\texttt{file}}%
+
+\\index[fn]{the person index aa@\\texttt{the \\textrm{person} index 
\\texttt{aa}}}%
 
 \\printindex[cp]
+
+\\printindex[fn]
 ';
 
 1;
diff --git a/tp/t/results/latex_tests/indices/res_latex/indices.tex 
b/tp/t/results/latex_tests/indices/res_latex/indices.tex
index be60eb1..3b737ef 100644
--- a/tp/t/results/latex_tests/indices/res_latex/indices.tex
+++ b/tp/t/results/latex_tests/indices/res_latex/indices.tex
@@ -21,6 +21,7 @@
 \usepackage[utf8]{inputenc}
 
 \makeindex[name=cp]%
+\makeindex[name=fn]%
 
 % command used in \description format for indicateurl
 
\newcommand\GNUTexinfotablestyleindicateurl[1]{\ifstrempty{#1}{}{`\texttt{#1}'}}%
@@ -94,11 +95,21 @@ roundcorner=10pt}
 \GNUTexinfosetsingleheader{}%
 
 
+
 \begin{document}
 \chapter{Index}
 \label{anchor:chapter}%
 
 \index[cp]{$a"!"""@b$ """!"@ \"{a} \"{o}!a"!"""@b@sub$a"!"""@b$ sub """!"@ 
\"{a} \"{o}|seealso{$a"!"""@b$ """!"@ \"{a} \"{o}}}%
+\index[cp]{\textbackslash{}cmd}%
+\index[cp]{\textbackslash{}cmd@totocmd}%
+
+
+\index[cp]{\textbackslash{}some\textbackslash{}command for \texttt{file}}%
+
+\index[fn]{the person index aa@\texttt{the \textrm{person} index \texttt{aa}}}%
 
 \printindex[cp]
+
+\printindex[fn]
 \end{document}
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index bff80ac..a1ed7a0 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -751,12 +751,12 @@ sub test($$)
   $parser_options = shift @$test_case if (@$test_case);
   $converter_options = shift @$test_case if (@$test_case);
 
-  if (!defined $parser_options->{'expanded_formats'}) {
-    $parser_options->{'expanded_formats'} = [
+  if (!defined $parser_options->{'EXPANDED_FORMATS'}) {
+    $parser_options->{'EXPANDED_FORMATS'} = [
       'docbook', 'html', 'xml', 'info', 'plaintext', 'latex'];
     #  'tex' is missed out here so that @ifnottex is expanded
     # in the tests.  Put
-    #   {'expanded_formats' => ['tex']}
+    #   {'EXPANDED_FORMATS' => ['tex']}
     # where you need @tex expanded in the t/*.t files.
   }
 
diff --git a/tp/t/xml_tests.t b/tp/t/xml_tests.t
index 488ff34..5e9f666 100644
--- a/tp/t/xml_tests.t
+++ b/tp/t/xml_tests.t
@@ -206,7 +206,7 @@ Para
 <in />
 @end xml
 ',
-{'expanded_formats' => ['tex', 'xml']}
+{'EXPANDED_FORMATS' => ['tex', 'xml']}
 ],
 ['raw_and_comments',
 '@tex  @c comment
@@ -218,7 +218,7 @@ Para
 <in />
 @end xml  @comment end xml comment
 ',
-{'expanded_formats' => ['tex', 'xml']}
+{'EXPANDED_FORMATS' => ['tex', 'xml']}
 ],
 ['node_no_section',
 '@node Top
@@ -299,7 +299,7 @@ T
 @end deffn
 
 ',
-{'expanded_formats' => ['tex'] }
+{'EXPANDED_FORMATS' => ['tex'] }
 ],
 ['spaces_info_lost',
 '@display  text on display line 
diff --git a/tp/tests/layout/list-of-tests b/tp/tests/layout/list-of-tests
index 5e6c89e..16c5452 100644
--- a/tp/tests/layout/list-of-tests
+++ b/tp/tests/layout/list-of-tests
@@ -15,7 +15,7 @@ formatting_html_nodes formatting.texi --html --split node 
--node-files -c 'TOP_F
 formatting_html_no_texi2html formatting.texi --html --no-split -c 
TEXI2HTML=undef
 formatting_info formatting.texi --info
 formatting_plaintext formatting.texi -c FORMAT_MENU=nomenu --plaintext
-#formatting_latex formatting.texi --latex
+formatting_latex formatting.texi --latex
 
 formatting_mathjax formatting.texi --html -c HTML_MATH=mathjax
 #formatting_mediawiki formatting.texi --init mediawiki.pm
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index cab90e8..d3f7d99 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -449,9 +449,17 @@ my @conf_dirs = ();
 my @include_dirs = ();
 my @prepend_dirs = ();
 
-# options for all the files
-my $parser_options = {'expanded_formats' => [], 
-                              'values' => {'txicommandconditionals' => 1}};
+# $cmdline_options are common to main program and Texinfo::Config
+# namespace, set by set_from_cmdline for text values.
+# There is in addition $parser_options for parser
+# related informations for informations that are not set through
+# set_from_cmdline.  The configuration text values are later on
+# copied over to the parser if they are parser options, with
+# format specific options also set if not already in the configuration.
+# Some parser options (as well as parser generated informations) are 
selectively
+# copied to converters either here or in converter initialization.
+my $parser_options = {'EXPANDED_FORMATS' => [],
+                      'values' => {'txicommandconditionals' => 1}};
 
 Texinfo::Config::_load_config($converter_default_options, $cmdline_options);
 
@@ -460,11 +468,11 @@ sub set_expansion($$) {
   my $set = shift;
   $set = 1 if (!defined($set));
   if ($set) {
-    push @{$parser_options->{'expanded_formats'}}, $region
-      unless (grep {$_ eq $region} @{$parser_options->{'expanded_formats'}});
+    push @{$parser_options->{'EXPANDED_FORMATS'}}, $region
+      unless (grep {$_ eq $region} @{$parser_options->{'EXPANDED_FORMATS'}});
   } else {
-    @{$parser_options->{'expanded_formats'}} = 
-      grep {$_ ne $region} @{$parser_options->{'expanded_formats'}};
+    @{$parser_options->{'EXPANDED_FORMATS'}} =
+      grep {$_ ne $region} @{$parser_options->{'EXPANDED_FORMATS'}};
     @{$default_expanded_format} 
        = grep {$_ ne $region} @{$default_expanded_format};
   }
@@ -893,7 +901,6 @@ There is NO WARRANTY, to the extent permitted by law.\n"), 
"2021";
                      push @texi2dvi_args, '--verbose'; },
  'document-language=s' => sub {
                       set_from_cmdline('documentlanguage', $_[1]); 
-                      $parser_options->{'documentlanguage'} = $_[1];
                       my @messages 
                        = Texinfo::Common::warn_unknown_language($_[1]);
                       foreach my $message (@messages) {
@@ -946,9 +953,9 @@ There is NO WARRANTY, to the extent permitted by law.\n"), 
"2021";
  },
  'fill-column|f=i' => sub {set_from_cmdline('FILLCOLUMN',$_[1]);},
  'enable-encoding' => sub {set_from_cmdline('ENABLE_ENCODING',$_[1]);
-                     $parser_options->{'ENABLE_ENCODING'} = $_[1];},
+                     },
  'disable-encoding' => sub {set_from_cmdline('ENABLE_ENCODING', 0);
-                     $parser_options->{'ENABLE_ENCODING'} = 0;},
+                     },
  'internal-links=s' => sub {set_from_cmdline('INTERNAL_LINKS', $_[1]);},
  'force|F' => sub {set_from_cmdline('FORCE', $_[1]);},
  'commands-in-node-names' => sub { ;},
@@ -967,7 +974,6 @@ There is NO WARRANTY, to the extent permitted by law.\n"), 
"2021";
  'ps' => sub {$format = set_format($_[0].'');},
  'pdf' => sub {$format = set_format($_[0].'');},
  'debug=i' => sub {set_from_cmdline('DEBUG', $_[1]); 
-                   $parser_options->{'DEBUG'} = $_[1];
                    push @texi2dvi_args, '--'.$_[0]; },
 );
 
@@ -1084,8 +1090,8 @@ if (get_conf('SPLIT') and 
!$formats_table{$format}->{'split'}) {
 }
 
 foreach my $expanded_format (@{$default_expanded_format}) {
-  push @{$parser_options->{'expanded_formats'}}, $expanded_format 
-    unless (grep {$_ eq $expanded_format} 
@{$parser_options->{'expanded_formats'}});
+  push @{$parser_options->{'EXPANDED_FORMATS'}}, $expanded_format
+    unless (grep {$_ eq $expanded_format} 
@{$parser_options->{'EXPANDED_FORMATS'}});
 }
 
 my $converter_class;
@@ -1127,6 +1133,10 @@ if (defined($formats_table{$format}->{'module'})) {
 no warnings 'once';
 my @parser_settable_options = 
keys(%Texinfo::Common::default_parser_customization_values);
 push @parser_settable_options, 
keys(%Texinfo::Common::default_structure_customization_values);
+# Copy some of the customization variables into the parser options.
+# Here customization options set on the command line and set by
+# the converter associated with the output format, command line
+# taking precedence.
 foreach my $parser_settable_option (@parser_settable_options) {
   if (defined(get_conf($parser_settable_option))) {
     $parser_options->{$parser_settable_option} 
@@ -1138,16 +1148,7 @@ foreach my $parser_settable_option 
(@parser_settable_options) {
   }
 }
 
-# Copy some of the customization variables into the parser options.
-# The configuration options are upper-cased when considered as 
-# customization variables, and lower-cased when passed to the Parser.
-# The customization variables passed here can only be set in perl
-# customization files, using set_from_init_file().
-foreach my $parser_option (map {uc($_)} 
-                  (keys 
(%Texinfo::Common::default_parser_state_configuration))) {
-  $parser_options->{lc($parser_option)} = get_conf($parser_option)
-    if (defined(get_conf($parser_option)));
-}
+#print STDERR "V ".join('|', sort(keys(%{$parser_options->{'values'}})))."\n";
 
 
 # Main processing, process all the files given on the command line
@@ -1314,7 +1315,7 @@ while(@input_files) {
   if ($formats_table{$format}->{'nodes_tree'}) {
 
     # it is not get_conf('FORMAT_MENU') but $parser_options as
-    # $parser_options is set to the output default and then replaced
+    # $parser_options is set to the output default and then replaced.
     # with get_conf('FORMAT_MENU') if needed.
     # 'FORMAT_MENU' may not be defined in some special cases,
     # for instance if format is structure.
@@ -1348,7 +1349,7 @@ while(@input_files) {
                             %$cmdline_options,
                             %$Texinfo::Config::options };
 
-  $converter_options->{'expanded_formats'} = 
$parser_options->{'expanded_formats'};
+  $converter_options->{'expanded_formats'} = 
$parser_options->{'EXPANDED_FORMATS'};
   $converter_options->{'parser'} = $parser;
   $converter_options->{'output_format'} = $format;
   $converter_options->{'language_config_dirs'} = \@language_config_dirs;



reply via email to

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