texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Thu, 18 Apr 2024 14:53:27 -0400 (EDT)

branch: master
commit d75404b2ac5933f41a448989bdd1bd738d63beec
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Apr 18 20:53:02 2024 +0200

    * tp/Texinfo/Convert/HTML.pm (_convert_image_command),
    tp/Texinfo/XS/convert/convert_html.c (convert_image_command): if image
    is not found, do not check if in_multiple_conversions, as it should
    happen very rarely, but check that there is some 'source_info'.
    
    * tp/Texinfo/Convert/HTML.pm (_convert_raw_command),
    tp/Texinfo/XS/convert/convert_html.c (convert_raw_command): inline call
    of _noticed_line_warn and remove the function.
    
    * tp/t/html_tests.t (tex_expanded_in_caption_multiple_time),
    tp/Makefile.tres: add test with expanded @teex in HTML in caption,
    such as to have an expansion of raw format multiple times.
---
 ChangeLog                                          |  15 +
 tp/Makefile.tres                                   |   1 +
 tp/TODO                                            |   2 -
 tp/Texinfo/Convert/HTML.pm                         |  49 ++--
 tp/Texinfo/Report.pm                               |   2 +
 tp/Texinfo/XS/convert/convert_html.c               |  53 ++--
 tp/ext/epub3.pm                                    |  14 +-
 tp/t/html_tests.t                                  |  14 +
 tp/t/results/coverage_braces/test_image.pl         |  16 ++
 .../formats_encodings/at_commands_in_refs.pl       |  14 +
 .../at_commands_in_refs_latin1.pl                  |  14 +
 .../formats_encodings/at_commands_in_refs_utf8.pl  |  14 +
 .../tex_expanded_in_caption_multiple_time.pl       | 319 +++++++++++++++++++++
 .../menu/commands_in_nodedescriptionblock.pl       |   7 +
 14 files changed, 476 insertions(+), 58 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5adc4bc034..1b1044bd21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2024-04-18  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (_convert_image_command),
+       tp/Texinfo/XS/convert/convert_html.c (convert_image_command): if image
+       is not found, do not check if in_multiple_conversions, as it should
+       happen very rarely, but check that there is some 'source_info'.
+
+       * tp/Texinfo/Convert/HTML.pm (_convert_raw_command),
+       tp/Texinfo/XS/convert/convert_html.c (convert_raw_command): inline call
+       of _noticed_line_warn and remove the function.
+
+       * tp/t/html_tests.t (tex_expanded_in_caption_multiple_time),
+       tp/Makefile.tres: add test with expanded @teex in HTML in caption,
+       such as to have an expansion of raw format multiple times.
+
 2024-04-17  Patrice Dumas  <pertusus@free.fr>
 
        * doc/texi2any_api.texi (Other Dynamic Information),
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index d367ccecf7..755b4ed4cf 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -748,6 +748,7 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/html_tests/test_separated_contents_shortcontents/res_html \
   t/results/html_tests/test_xrefautomaticsectiontitle.pl \
   t/results/html_tests/test_xrefautomaticsectiontitle_off_first.pl \
+  t/results/html_tests/tex_expanded_in_caption_multiple_time.pl \
   t/results/html_tests/tex_expanded_in_copying.pl \
   t/results/html_tests/text_before_top_and_contents_after_title.pl \
   t/results/html_tests/text_before_top_and_summarycontents_after_title.pl \
diff --git a/tp/TODO b/tp/TODO
index f8b83780b2..dc8e8081dd 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -32,8 +32,6 @@ _convert_def_line_type
 Missing documentation
 =====================
 
-HTML API ignore_notice _noticed_line_warn.  Add to API before?
-
 Tree documentation in ParserNonXS.pm
 ------------------------------------
 
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 48367540af..ec71b59a2b 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -3071,17 +3071,6 @@ foreach my $explained_command 
(keys(%explained_commands)) {
      = [['normal'], ['normal', 'string']];
 }
 
-# intercept warning and error messages to take multiple_conversions into
-# account
-sub _noticed_line_warn($$$)
-{
-  my $self = shift;
-  my $text = shift;
-  my $line_nr = shift;
-  return if ($self->in_multiple_conversions());
-  $self->converter_line_warn($text, $line_nr);
-}
-
 my %kept_line_commands;
 
 # TODO add the possibility to customize to add more commands to
@@ -3853,9 +3842,18 @@ sub _convert_image_command($$$$)
       = $self->html_image_file_location_name($cmdname, $command,
                                              $image_basefile, $args);
     if (not defined($image_path)) {
-      $self->_noticed_line_warn(sprintf(
+      # it would have been relevant to output the message only if
+      # if not ($self->in_multiple_conversions())
+      # However, @image formatted in multiple conversions context should be
+      # rare out of test suites (and probably always incorrect), so we avoid
+      # complexity and slowdown.  We still check that source_info is set, if
+      # not it should be a copy, therefore there is no need for error
+      # output, especially without line information.
+      if ($command->{'source_info'}) {
+        $self->converter_line_warn(sprintf(
               __("\@image file `%s' (for HTML) not found, using `%s'"),
                  $image_basefile, $image_file), $command->{'source_info'});
+      }
     }
     if (defined($self->get_conf('IMAGE_LINK_PREFIX'))) {
       $image_file = $self->get_conf('IMAGE_LINK_PREFIX') . $image_file;
@@ -5081,8 +5079,14 @@ sub _convert_raw_command($$$$$)
   if ($cmdname eq 'html') {
     return $content;
   }
-  $self->_noticed_line_warn(sprintf(__("raw format %s is not converted"),
-                                   $cmdname), $command->{'source_info'});
+
+  # In multiple conversions should only happen rarely, as in general, format
+  # commands do not happen in inline context where most of the multiple
+  # conversions are.  A possibility is in float caption.
+  if (!$self->in_multiple_conversions()) {
+    $self->converter_line_warn(sprintf(__("raw format %s is not converted"),
+                                     $cmdname), $command->{'source_info'});
+  }
   return &{$self->formatting_function('format_protect_text')}($self, $content);
 }
 
@@ -6672,9 +6676,9 @@ sub _convert_printindex_command($$$$)
               # do not warn if the entry is in a special region, like titlepage
               and not $main_entry_element->{'extra'}->{'element_region'}
               and $formatted_index_entry_nr == 1) {
-         # NOTE _noticed_line_warn is not used as printindex should not
-         # happen in multiple tree conversion with multiple_conversions set,
-         # but the error message is printed only for the first entry 
formatting.
+         # NOTE $self->in_multiple_conversions() is not checked as printindex
+         # should not happen in multiple tree conversion, but the error message
+         # is printed for the first entry formatting only.
             $self->converter_line_warn(
                              sprintf(
            __("entry for index `%s' for \@printindex %s outside of any node"),
@@ -6702,10 +6706,9 @@ sub _convert_printindex_command($$$$)
               # do not warn if the entry is in a special region, like titlepage
                 and not $main_entry_element->{'extra'}->{'element_region'}
                 and $formatted_index_entry_nr == 1) {
-          # NOTE _noticed_line_warn is not used as printindex should not
-          # happen in multiple tree conversions and multiple_conversions
-          # being set, but the error message is printed only for the first
-          # entry formatting.
+          # NOTE $self->in_multiple_conversions() is not checked as printindex
+          # should not happen in multiple tree conversion, but the error 
message
+          # is printed for the first entry formatting only.
           # NOTE the index entry may be associated to a node in that case.
               $self->converter_line_warn(
                                sprintf(
@@ -8735,6 +8738,9 @@ sub _load_htmlxref_files {
 #  associated_inline_content
 #
 #    API exists
+#  multiple_conversions
+#
+#    API exists
 #  targets         for directions.  Keys are elements references, values are
 #                  target information hash references described above before
 #                  the API functions used to access this information.
@@ -8765,7 +8771,6 @@ sub _load_htmlxref_files {
 #  document_units
 #  out_filepaths          (partially common with Texinfo::Converter)
 #  seen_ids
-#  multiple_conversions
 #  options_latex_math
 #  htmlxref
 #  check_htmlxref_already_warned
diff --git a/tp/Texinfo/Report.pm b/tp/Texinfo/Report.pm
index e5b4c5015c..23b9bd9e75 100644
--- a/tp/Texinfo/Report.pm
+++ b/tp/Texinfo/Report.pm
@@ -25,6 +25,8 @@ use strict;
 # To check if there is no erroneous autovivification
 #no autovivification qw(fetch delete exists store strict);
 
+use Carp qw(cluck);
+
 # for fileparse
 use File::Basename;
 
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index c0d39a9f19..abd927b009 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -2168,25 +2168,6 @@ set_root_commands_targets_node_files (CONVERTER *self)
     }
 }
 
-/*
-intercept warning and error messages to take 'multiple_conversions' into
-account
- */
-static void
-noticed_line_warn (CONVERTER *self, const ELEMENT *element,
-                   const char *format, ...)
-{
-  va_list v;
-
-  if (self->multiple_conversions)
-    return;
-
-  va_start (v, format);
-
-  vmessage_list_command_warn (&self->error_messages, self->conf,
-                              element, format, v);
-}
-
 /* to be inlined in text parsing codes */
 #define OTXI_PROTECT_XML_FORM_FEED_CASES(var) \
         OTXI_PROTECT_XML_CASES(var) \
@@ -9231,9 +9212,19 @@ convert_image_command (CONVERTER *self, const enum 
command_id cmd,
 
       if (!image_path_info->image_path)
         {
-          noticed_line_warn (self, element,
-                "@image file `%s' (for HTML) not found, using `%s'",
+      /* it would have been relevant to output the message only if
+         if not ($self->in_multiple_conversions())
+         However, @image formatted in multiple conversions context should be
+         rare out of test suites (and probably always incorrect), so we avoid
+         complexity and slowdown.  We still check that source_info is set, if
+         not it should be a copy, therefore there is no need for error
+         output, especially without line information. */
+          if (element->source_info.line_nr)
+            {
+              message_list_command_warn (&self->error_messages, self->conf,
+                element, 0, "@image file `%s' (for HTML) not found, using 
`%s'",
                      image_basefile, image_file);
+            }
         }
       free_image_file_location_info (image_path_info);
       free (image_path_info);
@@ -10332,9 +10323,12 @@ convert_raw_command (CONVERTER *self, const enum 
command_id cmd,
       return;
     }
 
-  noticed_line_warn (self, element, "raw format %s is not converted",
+  if (!self->multiple_conversions)
+    {
+      message_list_command_warn (&self->error_messages, self->conf,
+                   element, 0, "raw format %s is not converted",
                      element_command_name (element));
-
+    }
   format_protect_text (self, content, result);
 }
 
@@ -13156,9 +13150,9 @@ convert_printindex_command (CONVERTER *self, const enum 
command_id cmd,
         /* do not warn if the entry is in a special region, like titlepage */
                           if (!element_region)
                             {
-     /* NOTE _noticed_line_warn is not used as printindex should not
-        happen in multiple tree conversion with multiple_conversions set,
-        but the error message is printed only for the first entry formatting. 
*/
+     /* NOTE $self->in_multiple_conversions() is not checked as printindex
+        should not happen in multiple tree conversion, but the error message
+        is printed for the first entry formatting only. */
                               message_list_command_warn (&self->error_messages,
                                       self->conf,
                                       main_entry_element, 0,
@@ -13195,10 +13189,9 @@ convert_printindex_command (CONVERTER *self, const 
enum command_id cmd,
         /* do not warn if the entry is in a special region, like titlepage */
                               if (!element_region)
                                 {
-      /* NOTE _noticed_line_warn is not used as printindex should not
-         happen in multiple tree conversions and multiple_conversions
-         being set, but the error message is printed only for the first
-         entry formatting.
+      /* NOTE $self->in_multiple_conversions() is not checked as printindex
+         should not happen in multiple tree conversion, but the error message
+         is printed for the first entry formatting only.
          NOTE the index entry may be associated to a node in that case. */
                               message_list_command_warn (&self->error_messages,
                                       self->conf,
diff --git a/tp/ext/epub3.pm b/tp/ext/epub3.pm
index a05e1206b2..b72656557f 100644
--- a/tp/ext/epub3.pm
+++ b/tp/ext/epub3.pm
@@ -264,13 +264,19 @@ sub epub_convert_image_command($$$$)
         if (defined($args->[0]->{'monospacestring'}));
     return $basefile_string if ($self->in_string());
 
+    # To avoid multiple error messages, it could have been possible
+    # to check $self->in_multiple_conversions() and do not register
+    # error messages if set.  However, @image formatted in multiple
+    # conversions context should be rare (and probably always incorrect).
+    # Another cleaner way to solve this issue would have been to copy
+    # the image file only once and reuse the same $epub_file_nr for a
+    # given $image_basefile, but this would add more complex code for a
+    # case that is probably very uncommon.
+
     my ($image_file, $image_extension, $image_path, $image_path_encoding)
       = $self->html_image_file_location_name($cmdname, $command,
                                              $image_basefile, $args);
-
-    # FIXME do only if !$self->{'multiple_conversions'}, ie do not do it more 
than
-    # once
-    if (not defined($image_path)) {
+    if (not defined($image_path) and $command->{'source_info'}) {
       $self->converter_line_warn(sprintf(
               __("\@image file `%s' (for HTML) not found, using `%s'"),
                  $image_basefile, $image_file), $command->{'source_info'});
diff --git a/tp/t/html_tests.t b/tp/t/html_tests.t
index 5307934f3d..a2bfb88dcf 100644
--- a/tp/t/html_tests.t
+++ b/tp/t/html_tests.t
@@ -565,6 +565,20 @@ aa
 ', {'EXPANDED_FORMATS' => ['tex']},
 {'EXPANDED_FORMATS' => ['tex']}
 ],
+['tex_expanded_in_caption_multiple_time',
+'@float A, B
+My float.
+@caption{
+@tex
+aa
+@end tex
+}
+@end float
+
+@listoffloats A
+', {'EXPANDED_FORMATS' => ['tex']},
+{'EXPANDED_FORMATS' => ['tex']}
+],
 ['titles',
 '
 @settitle @@title @sc{html} @code{test}
diff --git a/tp/t/results/coverage_braces/test_image.pl 
b/tp/t/results/coverage_braces/test_image.pl
index 2ae2a9cf89..63ad692a32 100644
--- a/tp/t/results/coverage_braces/test_image.pl
+++ b/tp/t/results/coverage_braces/test_image.pl
@@ -3158,6 +3158,22 @@ $result_converted_errors{'html'}->{'test_image'} = [
   },
   {
     'error_line' => 'warning: @image file `f@i--le..  a@<"%@  < & @ % " \' 
(for HTML) not found, using `f@i--le..  a@<"%@  < & @ % " .ext@i--le..  a@<"%@  
< & @ % " \' (possibly involving @files-char)
+',
+    'line_nr' => 27,
+    'macro' => 'files-char',
+    'text' => '@image file `f@i--le..  a@<"%@  < & @ % " \' (for HTML) not 
found, using `f@i--le..  a@<"%@  < & @ % " .ext@i--le..  a@<"%@  < & @ % " \'',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => 'warning: @image file `f@i--le..  a@<"%@  < & @ % " \' 
(for HTML) not found, using `f@i--le..  a@<"%@  < & @ % " .ext@i--le..  a@<"%@  
< & @ % " \' (possibly involving @files-char)
+',
+    'line_nr' => 27,
+    'macro' => 'files-char',
+    'text' => '@image file `f@i--le..  a@<"%@  < & @ % " \' (for HTML) not 
found, using `f@i--le..  a@<"%@  < & @ % " .ext@i--le..  a@<"%@  < & @ % " \'',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => 'warning: @image file `f@i--le..  a@<"%@  < & @ % " \' 
(for HTML) not found, using `f@i--le..  a@<"%@  < & @ % " .ext@i--le..  a@<"%@  
< & @ % " \' (possibly involving @files-char)
 ',
     'line_nr' => 27,
     'macro' => 'files-char',
diff --git a/tp/t/results/formats_encodings/at_commands_in_refs.pl 
b/tp/t/results/formats_encodings/at_commands_in_refs.pl
index 227c05137b..1ee604240f 100644
--- a/tp/t/results/formats_encodings/at_commands_in_refs.pl
+++ b/tp/t/results/formats_encodings/at_commands_in_refs.pl
@@ -16144,6 +16144,20 @@ 
$result_converted_errors{'html'}->{'at_commands_in_refs'} = [
   },
   {
     'error_line' => 'warning: @image file `f--ile1\' (for HTML) not found, 
using `f--ile1.jpg\'
+',
+    'line_nr' => 92,
+    'text' => '@image file `f--ile1\' (for HTML) not found, using 
`f--ile1.jpg\'',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => 'warning: @image file `f--ile1\' (for HTML) not found, 
using `f--ile1.jpg\'
+',
+    'line_nr' => 90,
+    'text' => '@image file `f--ile1\' (for HTML) not found, using 
`f--ile1.jpg\'',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => 'warning: @image file `f--ile1\' (for HTML) not found, 
using `f--ile1.jpg\'
 ',
     'line_nr' => 90,
     'text' => '@image file `f--ile1\' (for HTML) not found, using 
`f--ile1.jpg\'',
diff --git a/tp/t/results/formats_encodings/at_commands_in_refs_latin1.pl 
b/tp/t/results/formats_encodings/at_commands_in_refs_latin1.pl
index 4c59d7f069..f133bd9789 100644
--- a/tp/t/results/formats_encodings/at_commands_in_refs_latin1.pl
+++ b/tp/t/results/formats_encodings/at_commands_in_refs_latin1.pl
@@ -15676,6 +15676,20 @@ 
$result_converted_errors{'file_html'}->{'at_commands_in_refs_latin1'} = [
   },
   {
     'error_line' => 'warning: @image file `f--ile1\' (for HTML) not found, 
using `f--ile1.jpg\'
+',
+    'line_nr' => 95,
+    'text' => '@image file `f--ile1\' (for HTML) not found, using 
`f--ile1.jpg\'',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => 'warning: @image file `f--ile1\' (for HTML) not found, 
using `f--ile1.jpg\'
+',
+    'line_nr' => 93,
+    'text' => '@image file `f--ile1\' (for HTML) not found, using 
`f--ile1.jpg\'',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => 'warning: @image file `f--ile1\' (for HTML) not found, 
using `f--ile1.jpg\'
 ',
     'line_nr' => 93,
     'text' => '@image file `f--ile1\' (for HTML) not found, using 
`f--ile1.jpg\'',
diff --git a/tp/t/results/formats_encodings/at_commands_in_refs_utf8.pl 
b/tp/t/results/formats_encodings/at_commands_in_refs_utf8.pl
index 9745f7a371..d9ef0bffc9 100644
--- a/tp/t/results/formats_encodings/at_commands_in_refs_utf8.pl
+++ b/tp/t/results/formats_encodings/at_commands_in_refs_utf8.pl
@@ -15676,6 +15676,20 @@ 
$result_converted_errors{'file_html'}->{'at_commands_in_refs_utf8'} = [
   },
   {
     'error_line' => 'warning: @image file `f--ile1\' (for HTML) not found, 
using `f--ile1.jpg\'
+',
+    'line_nr' => 95,
+    'text' => '@image file `f--ile1\' (for HTML) not found, using 
`f--ile1.jpg\'',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => 'warning: @image file `f--ile1\' (for HTML) not found, 
using `f--ile1.jpg\'
+',
+    'line_nr' => 93,
+    'text' => '@image file `f--ile1\' (for HTML) not found, using 
`f--ile1.jpg\'',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => 'warning: @image file `f--ile1\' (for HTML) not found, 
using `f--ile1.jpg\'
 ',
     'line_nr' => 93,
     'text' => '@image file `f--ile1\' (for HTML) not found, using 
`f--ile1.jpg\'',
diff --git a/tp/t/results/html_tests/tex_expanded_in_caption_multiple_time.pl 
b/tp/t/results/html_tests/tex_expanded_in_caption_multiple_time.pl
new file mode 100644
index 0000000000..9c18e8bafc
--- /dev/null
+++ b/tp/t/results/html_tests/tex_expanded_in_caption_multiple_time.pl
@@ -0,0 +1,319 @@
+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{'tex_expanded_in_caption_multiple_time'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'A'
+                }
+              ],
+              'type' => 'block_line_arg'
+            },
+            {
+              'contents' => [
+                {
+                  'text' => 'B'
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                },
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'float',
+          'contents' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'My float.
+'
+                }
+              ],
+              'type' => 'paragraph'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'args' => [
+                        {
+                          'info' => {
+                            'spaces_after_argument' => {
+                              'text' => '
+'
+                            }
+                          },
+                          'type' => 'block_line_arg'
+                        }
+                      ],
+                      'cmdname' => 'tex',
+                      'contents' => [
+                        {
+                          'contents' => [
+                            {
+                              'text' => 'aa
+'
+                            }
+                          ],
+                          'type' => 'rawpreformatted'
+                        },
+                        {
+                          'args' => [
+                            {
+                              'contents' => [
+                                {
+                                  'text' => 'tex'
+                                }
+                              ],
+                              'info' => {
+                                'spaces_after_argument' => {
+                                  'text' => '
+'
+                                }
+                              },
+                              'type' => 'line_arg'
+                            }
+                          ],
+                          'cmdname' => 'end',
+                          'extra' => {
+                            'text_arg' => 'tex'
+                          },
+                          'info' => {
+                            'spaces_before_argument' => {
+                              'text' => ' '
+                            }
+                          },
+                          'source_info' => {
+                            'line_nr' => 6
+                          }
+                        }
+                      ],
+                      'source_info' => {
+                        'line_nr' => 4
+                      }
+                    }
+                  ],
+                  'type' => 'brace_command_context'
+                }
+              ],
+              'cmdname' => 'caption',
+              'extra' => {
+                'float' => {}
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'source_info' => {
+                'line_nr' => 3
+              }
+            },
+            {
+              'text' => '
+',
+              'type' => 'spaces_after_close_brace'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'float'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'float'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'line_nr' => 8
+              }
+            }
+          ],
+          'extra' => {
+            'caption' => {},
+            'float_type' => 'A',
+            'is_target' => 1,
+            'normalized' => 'B'
+          },
+          'info' => {
+            'spaces_before_argument' => {
+              'text' => ' '
+            }
+          },
+          'source_info' => {
+            'line_nr' => 1
+          }
+        },
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'text' => 'A'
+                }
+              ],
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'listoffloats',
+          'extra' => {
+            'float_type' => 'A'
+          },
+          'info' => {
+            'spaces_before_argument' => {
+              'text' => ' '
+            }
+          },
+          'source_info' => {
+            'line_nr' => 10
+          }
+        }
+      ],
+      'type' => 'before_node_section'
+    }
+  ],
+  'type' => 'document_root'
+};
+$result_trees{'tex_expanded_in_caption_multiple_time'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'float'}
 = 
$result_trees{'tex_expanded_in_caption_multiple_time'}{'contents'}[0]{'contents'}[0];
+$result_trees{'tex_expanded_in_caption_multiple_time'}{'contents'}[0]{'contents'}[0]{'extra'}{'caption'}
 = 
$result_trees{'tex_expanded_in_caption_multiple_time'}{'contents'}[0]{'contents'}[0]{'contents'}[1];
+
+$result_texis{'tex_expanded_in_caption_multiple_time'} = '@float A, B
+My float.
+@caption{
+@tex
+aa
+@end tex
+}
+@end float
+
+@listoffloats A
+';
+
+
+$result_texts{'tex_expanded_in_caption_multiple_time'} = 'A, B
+My float.
+
+';
+
+$result_errors{'tex_expanded_in_caption_multiple_time'} = [];
+
+
+$result_floats{'tex_expanded_in_caption_multiple_time'} = {
+  'A' => [
+    {
+      'cmdname' => 'float',
+      'extra' => {
+        'caption' => {
+          'cmdname' => 'caption',
+          'extra' => {
+            'float' => {}
+          }
+        },
+        'float_number' => '1',
+        'float_type' => 'A',
+        'normalized' => 'B'
+      }
+    }
+  ]
+};
+$result_floats{'tex_expanded_in_caption_multiple_time'}{'A'}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'tex_expanded_in_caption_multiple_time'}{'A'}[0];
+
+
+
+$result_converted{'html'}->{'tex_expanded_in_caption_multiple_time'} = 
'<!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>Untitled Document</title>
+
+<meta name="description" content="Untitled Document">
+<meta name="keywords" content="Untitled Document">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+
+
+</head>
+
+<body lang="en">
+<div class="float" id="B">
+<p>My float.
+</p><div class="caption">aa
+</div></div>
+<dl class="listoffloats">
+<dt><a href="#B">A 1</a></dt><dd class="caption-in-listoffloats">aa
+</dd>
+</dl>
+
+
+
+</body>
+</html>
+';
+
+$result_converted_errors{'html'}->{'tex_expanded_in_caption_multiple_time'} = [
+  {
+    'error_line' => 'warning: must specify a title with a title command or @top
+',
+    'text' => 'must specify a title with a title command or @top',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => 'warning: raw format tex is not converted
+',
+    'line_nr' => 4,
+    'text' => 'raw format tex is not converted',
+    'type' => 'warning'
+  }
+];
+
+
+1;
diff --git a/tp/t/results/menu/commands_in_nodedescriptionblock.pl 
b/tp/t/results/menu/commands_in_nodedescriptionblock.pl
index 97e8534440..38df33e8fd 100644
--- a/tp/t/results/menu/commands_in_nodedescriptionblock.pl
+++ b/tp/t/results/menu/commands_in_nodedescriptionblock.pl
@@ -1503,6 +1503,13 @@ where the max column could be. in&nbsp;w<!-- /@w -->.
 $result_converted_errors{'html'}->{'commands_in_nodedescriptionblock'} = [
   {
     'error_line' => 'warning: @image file `float_image\' (for HTML) not found, 
using `float_image.jpg\'
+',
+    'line_nr' => 22,
+    'text' => '@image file `float_image\' (for HTML) not found, using 
`float_image.jpg\'',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => 'warning: @image file `float_image\' (for HTML) not found, 
using `float_image.jpg\'
 ',
     'line_nr' => 22,
     'text' => '@image file `float_image\' (for HTML) not found, using 
`float_image.jpg\'',



reply via email to

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