texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/NodeNameNormalization.pm (_p


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/NodeNameNormalization.pm (_parse_float_type): convert float type using NodeNameNormalization.pm convert_to_normalized().
Date: Fri, 23 Dec 2022 12:49:04 -0500

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

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 07b3c3ed06 * tp/Texinfo/Convert/NodeNameNormalization.pm 
(_parse_float_type): convert float type using NodeNameNormalization.pm 
convert_to_normalized().
07b3c3ed06 is described below

commit 07b3c3ed06ba823892f148b72460ac456e06107b
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Dec 23 18:48:51 2022 +0100

    * tp/Texinfo/Convert/NodeNameNormalization.pm (_parse_float_type):
    convert float type using NodeNameNormalization.pm
    convert_to_normalized().
    
    * tp/t/27float.t: new test special_characters_in_float_type.
---
 ChangeLog                                          |   8 +
 tp/TODO                                            |   2 -
 tp/Texinfo/Convert/NodeNameNormalization.pm        |   2 +-
 tp/Texinfo/ParserNonXS.pm                          |   5 +-
 tp/t/27float.t                                     |  18 +-
 .../results/float/comment_space_comand_in_float.pl |  12 +-
 tp/t/results/float/float_with_at_commands.pl       |  14 +-
 tp/t/results/float/listoffloats_with_commands.pl   |   4 +-
 .../float/numbering_captions_listoffloats.pl       |  16 +-
 .../float/special_characters_in_float_type.pl      | 823 +++++++++++++++++++++
 .../misc_commands/comment_space_command_on_line.pl |   6 +-
 11 files changed, 878 insertions(+), 32 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c3ba68bcac..289233e130 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-12-23  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/NodeNameNormalization.pm (_parse_float_type):
+       convert float type using NodeNameNormalization.pm
+       convert_to_normalized().
+
+       * tp/t/27float.t: new test special_characters_in_float_type.
+
 2022-12-23  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/NodeNameNormalization.pm (_parse_float_type)
diff --git a/tp/TODO b/tp/TODO
index 31c772f18c..f2c5616a89 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -13,8 +13,6 @@ Before next release
 Bugs
 ====
 
-check float type normalization, cf float comment_space_comand_in_float test
-
 wrong index lines in printindex
 info tests/layout//out_parser/formatting_info/formatting.info
 for example
diff --git a/tp/Texinfo/Convert/NodeNameNormalization.pm 
b/tp/Texinfo/Convert/NodeNameNormalization.pm
index 5e5d9d38cd..7024ff0555 100644
--- a/tp/Texinfo/Convert/NodeNameNormalization.pm
+++ b/tp/Texinfo/Convert/NodeNameNormalization.pm
@@ -409,7 +409,7 @@ sub _parse_float_type($)
   if ($current->{'args'} and @{$current->{'args'}}
       and $current->{'args'}->[0]->{'contents'}) {
     my $normalized
-      = Texinfo::Convert::Texinfo::convert_to_texinfo(
+      = convert_to_normalized(
         {'contents' => $current->{'args'}->[0]->{'contents'}});
     $current->{'extra'}->{'type'}->{'content'} =
                                     $current->{'args'}->[0]->{'contents'};
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 9e7344909c..8fb8b11f25 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -6787,8 +6787,9 @@ X<C<floats_information>>
 
 I<$float_types> is a hash reference whose keys are normalized float
 types (the first float argument, or the C<@listoffloats> argument).
-The normalization is the same as for node names. The value is the list
-of float tree elements appearing in the texinfo document.
+The normalization is the same as for the first step of node names
+normalization. The value is the list of float tree elements appearing
+in the texinfo document.
 
 =back
 
diff --git a/tp/t/27float.t b/tp/t/27float.t
index eae195a714..c5ba2fc06c 100644
--- a/tp/t/27float.t
+++ b/tp/t/27float.t
@@ -559,7 +559,21 @@ Float
 @end float
 
 @listoffloats Text @ @c listoffloats
-']
+'],
+['special_characters_in_float_type',
+'@node Top
+@top top
+
+@node chap
+@chapter chap
+
+@float A < " `` ` \' \' \\aaa @. --- @var{in var}, L < " `` ` \' \' \\aaa @. 
--- @var{in var}
+F
+@caption{float A < " `` ` \' \' \\aaa @. --- @var{in var}}
+@end float
+
+@listoffloats A < " `` ` \' \' \\aaa @. --- @var{in var}
+'],
 );
 
 my %info_tests = (
@@ -568,10 +582,12 @@ my %info_tests = (
   'cindex_in_caption' => 1,
   'float_copying' => 1,
   'comment_space_comand_in_float' => 1,
+  'special_characters_in_float_type' => 1,
 );
 
 my %latex_tests = (
   'float_in_block_commands' => 1,
+  'special_characters_in_float_type' => 1,
 );
 
 foreach my $test (@test_cases) {
diff --git a/tp/t/results/float/comment_space_comand_in_float.pl 
b/tp/t/results/float/comment_space_comand_in_float.pl
index 006579a740..08355eb038 100644
--- a/tp/t/results/float/comment_space_comand_in_float.pl
+++ b/tp/t/results/float/comment_space_comand_in_float.pl
@@ -133,7 +133,7 @@ $result_trees{'comment_space_comand_in_float'} = {
                 {},
                 {}
               ],
-              'normalized' => 'Text @ '
+              'normalized' => 'Text  '
             }
           },
           'info' => {
@@ -189,7 +189,7 @@ $result_trees{'comment_space_comand_in_float'} = {
                 {},
                 {}
               ],
-              'normalized' => 'Text @ '
+              'normalized' => 'Text  '
             }
           },
           'info' => {
@@ -273,7 +273,7 @@ $result_errors{'comment_space_comand_in_float'} = [];
 
 
 $result_floats{'comment_space_comand_in_float'} = {
-  'Text @ ' => [
+  'Text  ' => [
     {
       'cmdname' => 'float',
       'extra' => {
@@ -287,7 +287,7 @@ $result_floats{'comment_space_comand_in_float'} = {
               'cmdname' => ' '
             }
           ],
-          'normalized' => 'Text @ '
+          'normalized' => 'Text  '
         }
       },
       'info' => {},
@@ -384,11 +384,11 @@ 
$result_converted_errors{'html'}->{'comment_space_comand_in_float'} = [
 
 $result_converted{'xml'}->{'comment_space_comand_in_float'} = '<node 
name="Top" spaces=" "><nodename>Top</nodename></node>
 
-<float name="label-" type="Text @ " number="1" spaces=" " endspaces=" 
"><floattype>Text <spacecmd type="spc"/></floattype><floatname spaces=" ">label 
<spacecmd type="spc"/></floatname><!-- c float -->
+<float name="label-" type="Text  " number="1" spaces=" " endspaces=" 
"><floattype>Text <spacecmd type="spc"/></floattype><floatname spaces=" ">label 
<spacecmd type="spc"/></floatname><!-- c float -->
 <para>Float
 </para></float>
 
-<listoffloats type="Text @ " spaces=" ">Text <spacecmd 
type="spc"/></listoffloats><!-- c listoffloats -->
+<listoffloats type="Text  " spaces=" ">Text <spacecmd 
type="spc"/></listoffloats><!-- c listoffloats -->
 ';
 
 1;
diff --git a/tp/t/results/float/float_with_at_commands.pl 
b/tp/t/results/float/float_with_at_commands.pl
index b829daabe0..f3dda7fea3 100644
--- a/tp/t/results/float/float_with_at_commands.pl
+++ b/tp/t/results/float/float_with_at_commands.pl
@@ -280,7 +280,7 @@ $result_trees{'float_with_at_commands'} = {
                 {},
                 {}
               ],
-              'normalized' => 'entr@\'ee'
+              'normalized' => "entr\x{e9}e"
             }
           },
           'info' => {
@@ -346,7 +346,7 @@ $result_trees{'float_with_at_commands'} = {
                 {},
                 {}
               ],
-              'normalized' => 'entr@\'ee'
+              'normalized' => "entr\x{e9}e"
             }
           },
           'info' => {
@@ -403,7 +403,7 @@ $result_errors{'float_with_at_commands'} = [];
 
 
 $result_floats{'float_with_at_commands'} = {
-  'entr@\'ee' => [
+  "entr\x{e9}e" => [
     {
       'cmdname' => 'float',
       'extra' => {
@@ -426,7 +426,7 @@ $result_floats{'float_with_at_commands'} = {
               'text' => 'e'
             }
           ],
-          'normalized' => 'entr@\'ee'
+          'normalized' => "entr\x{e9}e"
         }
       },
       'info' => {},
@@ -436,7 +436,7 @@ $result_floats{'float_with_at_commands'} = {
     }
   ]
 };
-$result_floats{'float_with_at_commands'}{'entr@\'ee'}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'float_with_at_commands'}{'entr@\'ee'}[0];
+$result_floats{'float_with_at_commands'}{"entr\x{e9}e"}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'float_with_at_commands'}{"entr\x{e9}e"}[0];
 
 
 
@@ -498,7 +498,7 @@ 
$result_converted_errors{'html'}->{'float_with_at_commands'} = [
 
 
 
-$result_converted{'xml'}->{'float_with_at_commands'} = '<float 
name="premi_00e8re-entr_00e9e" type="entr@\'ee" number="1" spaces=" " 
endspaces=" "><floattype>entr<accent type="acute" 
bracketed="off">e</accent>e</floattype><floatname spaces=" ">premi<accent 
type="grave" bracketed="off">e</accent>re entr<accent type="acute" 
bracketed="off">e</accent>e</floatname>
+$result_converted{'xml'}->{'float_with_at_commands'} = '<float 
name="premi_00e8re-entr_00e9e" type="entrée" number="1" spaces=" " endspaces=" 
"><floattype>entr<accent type="acute" 
bracketed="off">e</accent>e</floattype><floatname spaces=" ">premi<accent 
type="grave" bracketed="off">e</accent>re entr<accent type="acute" 
bracketed="off">e</accent>e</floatname>
 
 <para>Ceci est notre premi<accent type="grave" bracketed="off">e</accent>re 
entr<accent type="acute" bracketed="off">e</accent>e.
 </para><caption><para>La premi<accent type="grave" 
bracketed="off">e</accent>re entr<accent type="acute" 
bracketed="off">e</accent>e est importante</para></caption>
@@ -506,7 +506,7 @@ $result_converted{'xml'}->{'float_with_at_commands'} = 
'<float name="premi_00e8r
 </float>
 
 
-<listoffloats type="entr@\'ee" spaces=" ">entr<accent type="acute" 
bracketed="off">e</accent>e</listoffloats>
+<listoffloats type="entrée" spaces=" ">entr<accent type="acute" 
bracketed="off">e</accent>e</listoffloats>
 ';
 
 1;
diff --git a/tp/t/results/float/listoffloats_with_commands.pl 
b/tp/t/results/float/listoffloats_with_commands.pl
index 75726c90f5..8bf9f5f237 100644
--- a/tp/t/results/float/listoffloats_with_commands.pl
+++ b/tp/t/results/float/listoffloats_with_commands.pl
@@ -80,7 +80,7 @@ $result_trees{'listoffloats_with_commands'} = {
                 {},
                 {}
               ],
-              'normalized' => 'th@\'eor@`eme'
+              'normalized' => "th\x{e9}or\x{e8}me"
             }
           },
           'info' => {
@@ -156,7 +156,7 @@ 
$result_converted_errors{'html'}->{'listoffloats_with_commands'} = [
 
 
 
-$result_converted{'xml'}->{'listoffloats_with_commands'} = '<listoffloats 
type="th@\'eor@`eme" spaces=" ">th<accent type="acute" 
bracketed="off">e</accent>or<accent type="grave" 
bracketed="off">e</accent>me</listoffloats>
+$result_converted{'xml'}->{'listoffloats_with_commands'} = '<listoffloats 
type="théorème" spaces=" ">th<accent type="acute" 
bracketed="off">e</accent>or<accent type="grave" 
bracketed="off">e</accent>me</listoffloats>
 ';
 
 1;
diff --git a/tp/t/results/float/numbering_captions_listoffloats.pl 
b/tp/t/results/float/numbering_captions_listoffloats.pl
index 6864cf2910..34b17c9d76 100644
--- a/tp/t/results/float/numbering_captions_listoffloats.pl
+++ b/tp/t/results/float/numbering_captions_listoffloats.pl
@@ -2019,7 +2019,7 @@ $result_trees{'numbering_captions_listoffloats'} = {
                 {},
                 {}
               ],
-              'normalized' => 'th@\'eor@`eme'
+              'normalized' => "th\x{e9}or\x{e8}me"
             }
           },
           'info' => {
@@ -4789,7 +4789,7 @@ $result_trees{'numbering_captions_listoffloats'} = {
                 {},
                 {}
               ],
-              'normalized' => 'th@\'eor@`eme'
+              'normalized' => "th\x{e9}or\x{e8}me"
             }
           },
           'info' => {
@@ -6491,7 +6491,7 @@ $result_floats{'numbering_captions_listoffloats'} = {
       }
     }
   ],
-  'th@\'eor@`eme' => [
+  "th\x{e9}or\x{e8}me" => [
     {
       'cmdname' => 'float',
       'extra' => {
@@ -6521,7 +6521,7 @@ $result_floats{'numbering_captions_listoffloats'} = {
               'text' => 'me'
             }
           ],
-          'normalized' => 'th@\'eor@`eme'
+          'normalized' => "th\x{e9}or\x{e8}me"
         }
       },
       'info' => {},
@@ -6575,8 +6575,8 @@ 
$result_floats{'numbering_captions_listoffloats'}{'Warning'}[0]{'extra'}{'shortc
 
$result_floats{'numbering_captions_listoffloats'}{'Warning'}[1]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'numbering_captions_listoffloats'}{'Warning'}[1];
 
$result_floats{'numbering_captions_listoffloats'}{'Warning'}[1]{'extra'}{'float_section'}
 = 
$result_floats{'numbering_captions_listoffloats'}{''}[5]{'extra'}{'float_section'};
 
$result_floats{'numbering_captions_listoffloats'}{'Warning'}[1]{'extra'}{'shortcaption'}{'extra'}{'float'}
 = $result_floats{'numbering_captions_listoffloats'}{'Warning'}[1];
-$result_floats{'numbering_captions_listoffloats'}{'th@\'eor@`eme'}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'numbering_captions_listoffloats'}{'th@\'eor@`eme'}[0];
-$result_floats{'numbering_captions_listoffloats'}{'th@\'eor@`eme'}[0]{'extra'}{'float_section'}
 = 
$result_floats{'numbering_captions_listoffloats'}{''}[5]{'extra'}{'float_section'};
+$result_floats{'numbering_captions_listoffloats'}{"th\x{e9}or\x{e8}me"}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'numbering_captions_listoffloats'}{"th\x{e9}or\x{e8}me"}[0];
+$result_floats{'numbering_captions_listoffloats'}{"th\x{e9}or\x{e8}me"}[0]{'extra'}{'float_section'}
 = 
$result_floats{'numbering_captions_listoffloats'}{''}[5]{'extra'}{'float_section'};
 
 
 
@@ -7096,7 +7096,7 @@ 
$result_converted{'xml'}->{'numbering_captions_listoffloats'} = '<node name="Top
 <caption spaces=" "><para>An example of float caption, no 
shortcaption&enddots;</para></caption>
 </float>
 
-<float name="theoreme" type="th@\'eor@`eme" number="1.1" spaces=" " 
endspaces=" "><floattype>th<accent type="acute" 
bracketed="off">e</accent>or<accent type="grave" 
bracketed="off">e</accent>me</floattype><floatname spaces=" 
">theoreme</floatname>
+<float name="theoreme" type="théorème" number="1.1" spaces=" " endspaces=" 
"><floattype>th<accent type="acute" bracketed="off">e</accent>or<accent 
type="grave" bracketed="off">e</accent>me</floattype><floatname spaces=" 
">theoreme</floatname>
 <para>A th<accent type="acute" bracketed="off">e</accent>or<accent 
type="grave" bracketed="off">e</accent>me
 </para>
 <caption><para>C A th<accent type="acute" bracketed="off">e</accent>or<accent 
type="grave" bracketed="off">e</accent>me</para></caption>
@@ -7222,7 +7222,7 @@ And (<pxref label="text-in-chapter"><xrefnodename>text in 
chapter</xrefnodename>
 <para>A ref to float without type <ref 
label="label-but-no-type"><xrefnodename>label but no type</xrefnodename></ref>.
 </para>
 <listoffloats type="Text" spaces=" ">Text</listoffloats>
-<listoffloats type="th@\'eor@`eme" spaces=" ">th<accent type="acute" 
bracketed="off">e</accent>or<accent type="grave" 
bracketed="off">e</accent>me</listoffloats>
+<listoffloats type="théorème" spaces=" ">th<accent type="acute" 
bracketed="off">e</accent>or<accent type="grave" 
bracketed="off">e</accent>me</listoffloats>
 
 </unnumbered>
 <bye></bye>
diff --git a/tp/t/results/float/special_characters_in_float_type.pl 
b/tp/t/results/float/special_characters_in_float_type.pl
new file mode 100644
index 0000000000..ecea45dfa9
--- /dev/null
+++ b/tp/t/results/float/special_characters_in_float_type.pl
@@ -0,0 +1,823 @@
+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{'special_characters_in_float_type'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'contents' => [],
+          'type' => 'preamble_before_content'
+        }
+      ],
+      'type' => 'before_node_section'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'Top'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => '
+'
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'node_content' => [
+          {}
+        ],
+        'nodes_manuals' => [
+          {
+            'node_content' => [
+              {}
+            ],
+            'normalized' => 'Top'
+          }
+        ],
+        'normalized' => 'Top'
+      },
+      'info' => {
+        'spaces_before_argument' => ' '
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 1,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'top'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => '
+'
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'top',
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'extra' => {},
+      'info' => {
+        'spaces_before_argument' => ' '
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 2,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'chap'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => '
+'
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'node_content' => [
+          {}
+        ],
+        'nodes_manuals' => [
+          {
+            'node_content' => [
+              {}
+            ],
+            'normalized' => 'chap'
+          }
+        ],
+        'normalized' => 'chap'
+      },
+      'info' => {
+        'spaces_before_argument' => ' '
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 4,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'chap'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => '
+'
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'chapter',
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'A < " `` ` \' \' \\aaa '
+                },
+                {
+                  'cmdname' => '.'
+                },
+                {
+                  'text' => ' --- '
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'in var'
+                        }
+                      ],
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'var',
+                  'source_info' => {
+                    'file_name' => '',
+                    'line_nr' => 7,
+                    'macro' => ''
+                  }
+                }
+              ],
+              'type' => 'block_line_arg'
+            },
+            {
+              'contents' => [
+                {
+                  'text' => 'L < " `` ` \' \' \\aaa '
+                },
+                {
+                  'cmdname' => '.'
+                },
+                {
+                  'text' => ' --- '
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'in var'
+                        }
+                      ],
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'var',
+                  'source_info' => {
+                    'file_name' => '',
+                    'line_nr' => 7,
+                    'macro' => ''
+                  }
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => '
+',
+                'spaces_before_argument' => ' '
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'float',
+          'contents' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'F
+'
+                }
+              ],
+              'type' => 'paragraph'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'float A < " `` ` \' \' \\aaa '
+                        },
+                        {
+                          'cmdname' => '.'
+                        },
+                        {
+                          'text' => ' --- '
+                        },
+                        {
+                          'args' => [
+                            {
+                              'contents' => [
+                                {
+                                  'text' => 'in var'
+                                }
+                              ],
+                              'type' => 'brace_command_arg'
+                            }
+                          ],
+                          'cmdname' => 'var',
+                          'source_info' => {
+                            'file_name' => '',
+                            'line_nr' => 9,
+                            'macro' => ''
+                          }
+                        }
+                      ],
+                      'type' => 'paragraph'
+                    }
+                  ],
+                  'type' => 'brace_command_context'
+                }
+              ],
+              'cmdname' => 'caption',
+              'extra' => {
+                'float' => {}
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 9,
+                'macro' => ''
+              }
+            },
+            {
+              'text' => '
+'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'float'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => '
+'
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'float'
+              },
+              'info' => {
+                'spaces_before_argument' => ' '
+              },
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 10,
+                'macro' => ''
+              }
+            }
+          ],
+          'extra' => {
+            'caption' => {},
+            'float_section' => {},
+            'node_content' => [
+              {},
+              {},
+              {},
+              {}
+            ],
+            'normalized' => 
'L-_003c-_0022-_0060_0060-_0060-_0027-_0027-_005caaa-_002e-_002d_002d_002d-in-var',
+            'type' => {
+              'content' => [
+                {},
+                {},
+                {},
+                {}
+              ],
+              'normalized' => 'A < " `` ` \' \' \\aaa . --- in var'
+            }
+          },
+          'info' => {
+            'spaces_before_argument' => ' '
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 7,
+            'macro' => ''
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'A < " `` ` \' \' \\aaa '
+                },
+                {
+                  'cmdname' => '.'
+                },
+                {
+                  'text' => ' --- '
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'in var'
+                        }
+                      ],
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'var',
+                  'source_info' => {
+                    'file_name' => '',
+                    'line_nr' => 12,
+                    'macro' => ''
+                  }
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => '
+'
+              },
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'listoffloats',
+          'extra' => {
+            'type' => {
+              'content' => [
+                {},
+                {},
+                {},
+                {}
+              ],
+              'normalized' => 'A < " `` ` \' \' \\aaa . --- in var'
+            }
+          },
+          'info' => {
+            'spaces_before_argument' => ' '
+          },
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 12,
+            'macro' => ''
+          }
+        }
+      ],
+      'extra' => {},
+      'info' => {
+        'spaces_before_argument' => ' '
+      },
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 5,
+        'macro' => ''
+      }
+    }
+  ],
+  'type' => 'document_root'
+};
+$result_trees{'special_characters_in_float_type'}{'contents'}[1]{'extra'}{'node_content'}[0]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'special_characters_in_float_type'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'special_characters_in_float_type'}{'contents'}[3]{'extra'}{'node_content'}[0]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'special_characters_in_float_type'}{'contents'}[3]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'contents'}[1]{'extra'}{'float'}
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'extra'}{'caption'}
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'contents'}[1];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'extra'}{'float_section'}
 = $result_trees{'special_characters_in_float_type'}{'contents'}[4];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'extra'}{'node_content'}[0]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'args'}[1]{'contents'}[0];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'extra'}{'node_content'}[1]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'args'}[1]{'contents'}[1];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'extra'}{'node_content'}[2]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'args'}[1]{'contents'}[2];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'extra'}{'node_content'}[3]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'args'}[1]{'contents'}[3];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'extra'}{'type'}{'content'}[0]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'extra'}{'type'}{'content'}[1]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'extra'}{'type'}{'content'}[2]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[2];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'extra'}{'type'}{'content'}[3]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[3];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[3]{'extra'}{'type'}{'content'}[0]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[3]{'extra'}{'type'}{'content'}[1]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'contents'}[1];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[3]{'extra'}{'type'}{'content'}[2]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'contents'}[2];
+$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[3]{'extra'}{'type'}{'content'}[3]
 = 
$result_trees{'special_characters_in_float_type'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'contents'}[3];
+
+$result_texis{'special_characters_in_float_type'} = '@node Top
+@top top
+
+@node chap
+@chapter chap
+
+@float A < " `` ` \' \' \\aaa @. --- @var{in var}, L < " `` ` \' \' \\aaa @. 
--- @var{in var}
+F
+@caption{float A < " `` ` \' \' \\aaa @. --- @var{in var}}
+@end float
+
+@listoffloats A < " `` ` \' \' \\aaa @. --- @var{in var}
+';
+
+
+$result_texts{'special_characters_in_float_type'} = 'top
+***
+
+1 chap
+******
+
+A < " " ` \' \' \\aaa . -- in var, L < " " ` \' \' \\aaa . -- in var
+F
+
+
+';
+
+$result_sectioning{'special_characters_in_float_type'} = {
+  'structure' => {
+    'section_childs' => [
+      {
+        'cmdname' => 'top',
+        'extra' => {
+          'associated_node' => {
+            'cmdname' => 'node',
+            'extra' => {
+              'normalized' => 'Top'
+            },
+            'info' => {},
+            'structure' => {}
+          }
+        },
+        'info' => {},
+        'structure' => {
+          'section_childs' => [
+            {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'associated_node' => {
+                  'cmdname' => 'node',
+                  'extra' => {
+                    'normalized' => 'chap'
+                  },
+                  'info' => {},
+                  'structure' => {}
+                }
+              },
+              'info' => {},
+              'structure' => {
+                'section_level' => 1,
+                'section_number' => 1,
+                'section_up' => {},
+                'toplevel_prev' => {},
+                'toplevel_up' => {}
+              }
+            }
+          ],
+          'section_level' => 0,
+          'section_up' => {}
+        }
+      }
+    ],
+    'section_level' => -1
+  }
+};
+$result_sectioning{'special_characters_in_float_type'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
 = 
$result_sectioning{'special_characters_in_float_type'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'special_characters_in_float_type'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_prev'}
 = 
$result_sectioning{'special_characters_in_float_type'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'special_characters_in_float_type'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_up'}
 = 
$result_sectioning{'special_characters_in_float_type'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'special_characters_in_float_type'}{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
 = $result_sectioning{'special_characters_in_float_type'};
+
+$result_nodes{'special_characters_in_float_type'} = {
+  'cmdname' => 'node',
+  'extra' => {
+    'associated_section' => {
+      'cmdname' => 'top',
+      'extra' => {},
+      'info' => {},
+      'structure' => {}
+    },
+    'normalized' => 'Top'
+  },
+  'info' => {},
+  'structure' => {
+    'node_next' => {
+      'cmdname' => 'node',
+      'extra' => {
+        'associated_section' => {
+          'cmdname' => 'chapter',
+          'extra' => {},
+          'info' => {},
+          'structure' => {
+            'section_number' => 1
+          }
+        },
+        'normalized' => 'chap'
+      },
+      'info' => {},
+      'structure' => {
+        'node_prev' => {},
+        'node_up' => {}
+      }
+    }
+  }
+};
+$result_nodes{'special_characters_in_float_type'}{'structure'}{'node_next'}{'structure'}{'node_prev'}
 = $result_nodes{'special_characters_in_float_type'};
+$result_nodes{'special_characters_in_float_type'}{'structure'}{'node_next'}{'structure'}{'node_up'}
 = $result_nodes{'special_characters_in_float_type'};
+
+$result_menus{'special_characters_in_float_type'} = {
+  'cmdname' => 'node',
+  'extra' => {
+    'normalized' => 'Top'
+  },
+  'info' => {},
+  'structure' => {}
+};
+
+$result_errors{'special_characters_in_float_type'} = [];
+
+
+$result_floats{'special_characters_in_float_type'} = {
+  'A < " `` ` \' \' \\aaa . --- in var' => [
+    {
+      'cmdname' => 'float',
+      'extra' => {
+        'caption' => {
+          'cmdname' => 'caption',
+          'extra' => {
+            'float' => {}
+          }
+        },
+        'float_section' => {
+          'cmdname' => 'chapter',
+          'extra' => {},
+          'info' => {},
+          'structure' => {
+            'section_number' => 1
+          }
+        },
+        'normalized' => 
'L-_003c-_0022-_0060_0060-_0060-_0027-_0027-_005caaa-_002e-_002d_002d_002d-in-var',
+        'type' => {
+          'content' => [
+            {
+              'text' => 'A < " `` ` \' \' \\aaa '
+            },
+            {
+              'cmdname' => '.'
+            },
+            {
+              'text' => ' --- '
+            },
+            {
+              'cmdname' => 'var'
+            }
+          ],
+          'normalized' => 'A < " `` ` \' \' \\aaa . --- in var'
+        }
+      },
+      'info' => {},
+      'structure' => {
+        'float_number' => '1.1'
+      }
+    }
+  ]
+};
+$result_floats{'special_characters_in_float_type'}{'A < " `` ` \' \' \\aaa . 
--- in var'}[0]{'extra'}{'caption'}{'extra'}{'float'} = 
$result_floats{'special_characters_in_float_type'}{'A < " `` ` \' \' \\aaa . 
--- in var'}[0];
+
+
+
+$result_converted{'plaintext'}->{'special_characters_in_float_type'} = 'top
+***
+
+1 chap
+******
+
+F
+
+
+A < " “ ‘ ’ ’ \\aaa . — IN VAR 1.1: float A < " “ ‘ ’ ’ \\aaa .  — IN VAR
+
+* Menu:
+
+* A < " “ ‘ ’ ’ \\aaa . — IN VAR 1.1: L < " `` ` \' \' \\aaa . --- IN VAR.
+                                         float A < " “ ‘ ’ ’ \\aaa .  ...
+
+';
+
+
+$result_converted{'info'}->{'special_characters_in_float_type'} = 'This is , 
produced from .
+
+
+File: ,  Node: Top,  Next: chap,  Up: (dir)
+
+top
+***
+
+* Menu:
+
+* chap::
+
+
+File: ,  Node: chap,  Prev: Top,  Up: Top
+
+1 chap
+******
+
+F
+
+
+A < " “ ‘ ’ ’ \\aaa . — IN VAR 1.1: float A < " “ ‘ ’ ’ \\aaa .  — IN VAR
+
+* Menu:
+
+* A < " “ ‘ ’ ’ \\aaa . — IN VAR 1.1: L < " `` ` \' \' \\aaa . --- IN VAR.
+                                         float A < " “ ‘ ’ ’ \\aaa .  ...
+
+
+
+Tag Table:
+Node: Top27
+Node: chap102
+Ref: L < " `` ` \' \' \\aaa . --- IN VAR162
+
+End Tag Table
+
+
+Local Variables:
+coding: utf-8
+End:
+';
+
+
+$result_converted{'html'}->{'special_characters_in_float_type'} = '<!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</title>
+
+<meta name="description" content="top">
+<meta name="keywords" content="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">
+
+
+</head>
+
+<body lang="en">
+<div class="top-level-extent" id="Top">
+<div class="nav-panel">
+<p>
+Next: <a href="#chap" accesskey="n" rel="next">chap</a> &nbsp; </p>
+</div>
+<h1 class="top" id="top">top</h1>
+
+<ul class="mini-toc">
+<li><a href="#chap" accesskey="1">chap</a></li>
+</ul>
+<hr>
+<div class="chapter-level-extent" id="chap">
+<div class="nav-panel">
+<p>
+Previous: <a href="#Top" accesskey="p" rel="prev">top</a>, Up: <a href="#Top" 
accesskey="u" rel="up">top</a> &nbsp; </p>
+</div>
+<h2 class="chapter" id="chap-1">1 chap</h2>
+
+<div class="float" 
id="L-_003c-_0022-_0060_0060-_0060-_0027-_0027-_005caaa-_002e-_002d_002d_002d-in-var">
+<p>F
+</p>
+<div class="caption"><p><strong class="strong">A &lt; &quot; &ldquo; &lsquo; 
&rsquo; &rsquo; \\aaa . &mdash; <var class="var">in var</var> 1.1: 
</strong>float A &lt; &quot; &ldquo; &lsquo; &rsquo; &rsquo; \\aaa . &mdash; 
<var class="var">in var</var></p></div></div>
+<dl class="listoffloats">
+<dt><a 
href="#L-_003c-_0022-_0060_0060-_0060-_0027-_0027-_005caaa-_002e-_002d_002d_002d-in-var">A
 &lt; &quot; &ldquo; &lsquo; &rsquo; &rsquo; \\aaa . &mdash; <var 
class="var">in var</var> 1.1</a></dt><dd 
class="caption-in-listoffloats"><p>float A &lt; &quot; &ldquo; &lsquo; &rsquo; 
&rsquo; \\aaa . &mdash; <var class="var">in var</var></p></dd>
+</dl>
+</div>
+</div>
+
+
+
+</body>
+</html>
+';
+
+
+$result_converted{'xml'}->{'special_characters_in_float_type'} = '<node 
name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">chap</nodenext></node>
+<top spaces=" "><sectiontitle>top</sectiontitle>
+
+</top>
+<node name="chap" spaces=" "><nodename>chap</nodename><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>chap</sectiontitle>
+
+<float 
name="L-_003c-_0022-_0060_0060-_0060-_0027-_0027-_005caaa-_002e-_002d_002d_002d-in-var"
 type="A &lt; &quot; `` ` \' \' \\\\aaa . --- in var" number="1.1" spaces=" " 
endspaces=" "><floattype>A &lt; &quot; `` ` \' \' \\aaa &eosperiod; --- <var>in 
var</var></floattype><floatname spaces=" ">L &lt; &quot; &textldquo; 
&textlsquo; &textrsquo; &textrsquo; \\aaa &eosperiod; &textmdash; <var>in 
var</var></floatname>
+<para>F
+</para><caption><para>float A &lt; &quot; &textldquo; &textlsquo; &textrsquo; 
&textrsquo; \\aaa &eosperiod; &textmdash; <var>in var</var></para></caption>
+</float>
+
+<listoffloats type="A &lt; &quot; `` ` \' \' \\\\aaa . --- in var" spaces=" 
">A &lt; &quot; &textldquo; &textlsquo; &textrsquo; &textrsquo; \\aaa 
&eosperiod; &textmdash; <var>in var</var></listoffloats>
+</chapter>
+';
+
+
+$result_converted{'latex'}->{'special_characters_in_float_type'} = 
'\\documentclass{book}
+\\usepackage{amsfonts}
+\\usepackage{amsmath}
+\\usepackage[gen]{eurosym}
+\\usepackage{textcomp}
+\\usepackage{graphicx}
+\\usepackage{etoolbox}
+\\usepackage{titleps}
+\\usepackage[utf8]{inputenc}
+\\usepackage[T1]{fontenc}
+\\usepackage{float}
+% use hidelinks to remove boxes around links to be similar to Texinfo TeX
+\\usepackage[hidelinks]{hyperref}
+
+\\makeatletter
+\\newcommand{\\Texinfosettitle}{No Title}%
+
+% new float for type `A < " `` ` \' \' \\aaa . --- in var\'
+\\newfloat{TexinfoFloatA```\\aaainvar}{htb}{tfl}[chapter]
+\\floatname{TexinfoFloatA```\\aaainvar}{}
+% style command for var in \'cmd_text\' formatting context
+\\newcommand\\Texinfocommandstyletextvar[1]{{\\normalfont{}\\textsl{#1}}}%
+
+% redefine the \\mainmatter command such that it does not clear page
+% as if in double page
+\\renewcommand\\mainmatter{\\clearpage\\@mainmattertrue\\pagenumbering{arabic}}
+\\newenvironment{Texinfopreformatted}{%
+  
\\par\\GNUTobeylines\\obeyspaces\\frenchspacing\\parskip=\\z@\\parindent=\\z@}{}
+{\\catcode`\\^^M=13 \\gdef\\GNUTobeylines{\\catcode`\\^^M=13 
\\def^^M{\\null\\par}}}
+\\newenvironment{Texinfoindented}{\\begin{list}{}{}\\item\\relax}{\\end{list}}
+
+% used for substitutions in commands
+\\newcommand{\\Texinfoplaceholder}[1]{}
+
+\\newpagestyle{single}{\\sethead[\\chaptername{} \\thechapter{} 
\\chaptertitle{}][][\\thepage]
+                              {\\chaptername{} \\thechapter{} 
\\chaptertitle{}}{}{\\thepage}}
+
+% allow line breaking at underscore
+\\let\\Texinfounderscore\\_
+\\renewcommand{\\_}{\\Texinfounderscore\\discretionary{}{}{}}
+\\renewcommand{\\includegraphics}[1]{\\fbox{FIG \\detokenize{#1}}}
+
+\\makeatother
+% set default for @setchapternewpage
+\\makeatletter
+\\patchcmd{\\chapter}{\\if@openright\\cleardoublepage\\else\\clearpage\\fi}{\\Texinfoplaceholder{setchapternewpage
 placeholder}\\clearpage}{}{}
+\\makeatother
+\\pagestyle{single}%
+
+\\begin{document}
+\\label{anchor:Top}%
+\\chapter{{chap}}
+\\label{anchor:chap}%
+
+\\begin{TexinfoFloatA```\\aaainvar}
+F
+\\caption{float A < " `` ` \' \' \\textbackslash{}aaa \\@. --- 
\\Texinfocommandstyletextvar{in var}}
+
+\\label{anchor:L-_003c-_0022-_0060_0060-_0060-_0027-_0027-_005caaa-_002e-_002d_002d_002d-in-var}%
+\\end{TexinfoFloatA```\\aaainvar}
+
+\\listof{TexinfoFloatA```\\aaainvar}{}
+\\end{document}
+';
+
+1;
diff --git a/tp/t/results/misc_commands/comment_space_command_on_line.pl 
b/tp/t/results/misc_commands/comment_space_command_on_line.pl
index 949c420d55..9361c8ff93 100644
--- a/tp/t/results/misc_commands/comment_space_command_on_line.pl
+++ b/tp/t/results/misc_commands/comment_space_command_on_line.pl
@@ -666,7 +666,7 @@ $result_trees{'comment_space_command_on_line'} = {
                 {},
                 {}
               ],
-              'normalized' => 'Text @ '
+              'normalized' => 'Text  '
             }
           },
           'info' => {
@@ -1150,7 +1150,7 @@ 
$result_converted{'xml'}->{'comment_space_command_on_line'} = '<settitle spaces=
 <para>float
 </para></float> <!-- c end -->
 
-<listoffloats type="Text @ " spaces=" ">Text <spacecmd 
type="spc"/></listoffloats><!-- c listoffloats -->
+<listoffloats type="Text  " spaces=" ">Text <spacecmd 
type="spc"/></listoffloats><!-- c listoffloats -->
 
 </chapter>
 <bye></bye>
@@ -1180,7 +1180,7 @@ 
$result_converted{'xml'}->{'comment_space_command_on_line'} = '<settitle spaces=
 <para>float
 </para></float> <!-- c end -->
 
-<listoffloats type="Text @ " spaces=" ">Text <spacecmd 
type="spc"/></listoffloats><!-- c listoffloats -->
+<listoffloats type="Text  " spaces=" ">Text <spacecmd 
type="spc"/></listoffloats><!-- c listoffloats -->
 
 </chapter>
 <bye></bye>



reply via email to

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