texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/ext/latex2html.pm (l2h_process, l2h_convert_


From: Patrice Dumas
Subject: branch master updated: * tp/ext/latex2html.pm (l2h_process, l2h_convert_command), tp/ext/tex4ht.pm (tex4ht_prepare, tex4ht_convert_command): register formatting of latex block. Do not output any message nor any file for blocks that are not expanded.
Date: Sat, 15 Oct 2022 11:04:58 -0400

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 7a8013a346 * tp/ext/latex2html.pm (l2h_process, l2h_convert_command), 
tp/ext/tex4ht.pm (tex4ht_prepare, tex4ht_convert_command): register formatting 
of latex block. Do not output any message nor any file for blocks that are not 
expanded.
7a8013a346 is described below

commit 7a8013a346b57121822e3345416751a6cacff399
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Oct 15 17:04:45 2022 +0200

    * tp/ext/latex2html.pm (l2h_process, l2h_convert_command),
    tp/ext/tex4ht.pm (tex4ht_prepare, tex4ht_convert_command): register
    formatting of latex block.
    Do not output any message nor any file for blocks that are
    not expanded.
---
 ChangeLog                                          |  8 ++
 tp/ext/latex2html.pm                               | 33 ++++++--
 tp/ext/tex4ht.pm                                   | 97 ++++++++++++----------
 .../many_input_files/tex_l2h_res/tex-l2h_cache.pm  | 39 +++++----
 tp/tests/many_input_files/tex_l2h_res/tex.html     | 29 ++++---
 tp/tests/many_input_files/tex_l2h_res/tex_l2h.2    |  2 +-
 tp/tests/many_input_files/tex_l2h_res/tex_l2h.html | 27 +++---
 tp/tests/many_input_files/tex_l2h_res/tex_l2h.tex  | 10 +--
 .../tex_l2h_res/tex_l2h_images.tex                 | 24 +++---
 tp/tests/many_input_files/tex_t4ht_res/tex.html    |  7 +-
 tp/tests/many_input_files/tex_t4ht_res/tex_t4ht.2  |  2 +-
 .../tex_t4ht_res/tex_tex4ht_tex.tex                |  2 +-
 .../formatting_singular/sing-l2h_cache.pm          |  4 -
 .../res_parser/formatting_singular/sing_l2h.html   | 20 ++---
 .../res_parser/formatting_singular/sing_l2h.tex    | 21 ++---
 .../formatting_singular/sing_l2h_images.tex        | 20 ++---
 tp/tests/tex_html/res_parser/tex/tex.2             |  2 +-
 tp/tests/tex_html/res_parser/tex/tex.html          |  2 +
 tp/tests/tex_html/res_parser/tex_httex/tex.html    |  2 +
 tp/tests/tex_html/res_parser/tex_notex/tex.2       |  2 +-
 tp/tests/tex_html/res_parser/tex_notex/tex.html    |  2 +
 tp/tests/tex_html/tex.texi                         |  8 ++
 22 files changed, 205 insertions(+), 158 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index aac92d70c4..01084ad514 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-10-15  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/ext/latex2html.pm (l2h_process, l2h_convert_command),
+       tp/ext/tex4ht.pm (tex4ht_prepare, tex4ht_convert_command): register
+       formatting of latex block.
+       Do not output any message nor any file for blocks that are
+       not expanded.
+
 2022-10-15  Patrice Dumas  <pertusus@free.fr>
 
        add @latex to l2h and use CONVERT_TO_LATEX_IN_MATH
diff --git a/tp/ext/latex2html.pm b/tp/ext/latex2html.pm
index ed314ea5b6..678e110dc4 100644
--- a/tp/ext/latex2html.pm
+++ b/tp/ext/latex2html.pm
@@ -47,6 +47,7 @@ texinfo_register_handler('finish', \&l2h_finish);
 
 texinfo_register_command_formatting('math', \&l2h_convert_command);
 texinfo_register_command_formatting('tex', \&l2h_convert_command);
+texinfo_register_command_formatting('latex', \&l2h_convert_command);
 texinfo_register_command_formatting('displaymath', \&l2h_convert_command);
 
 # name/location of latex2html program
@@ -94,6 +95,8 @@ my $docu_name;
 my %commands_counters;
 my %commands_text_index;
 
+my %commands_ignored;
+
 my $extract_error_count;
 my $invalid_text_index_count;
 
@@ -184,6 +187,8 @@ sub l2h_process($$)
                                # of processed elements
   %commands_text_index = ();   # associate an element to the index of latex 
text,
                                # also the index in the HTML results array
+  %commands_ignored = ();      # empty commands not processed.  In general,
+                               # should correspond to ignored block commands.
   $extract_error_count = 0;    # number of fragments that cannot be retrieved
                                # when @-commands are converted
   $invalid_text_index_count = 0;
@@ -254,7 +259,6 @@ sub l2h_process($$)
   my $cached_count = 0;          # number of cached latex texts
   if (scalar(@{$collected_commands})) {
     foreach my $element (@{$collected_commands}) {
-      $texinfo_command_index++;
       my $command = $element->{'cmdname'};
       my $tree;
       if ($command eq 'math') {
@@ -263,7 +267,8 @@ sub l2h_process($$)
         $tree = {'contents' => [@{$element->{'contents'}}]};
         if ($tree->{'contents'}->[0]
             and $tree->{'contents'}->[0]->{'type'}
-            and $tree->{'contents'}->[0]->{'type'} eq 
'empty_line_after_command') {
+            and ($tree->{'contents'}->[0]->{'type'} eq 
'empty_line_after_command'
+                 or $tree->{'contents'}->[0]->{'type'} eq 'elided_block')) {
           shift @{$tree->{'contents'}};
         }
         if ($tree->{'contents'}->[-1]->{'cmdname'}
@@ -271,6 +276,12 @@ sub l2h_process($$)
           pop @{$tree->{'contents'}};
         }
       }
+      if (scalar(@{$tree->{'contents'}}) == 0) {
+        # should correspond to an ignored block
+        $commands_ignored{$element} = 1;
+        next;
+      }
+      $texinfo_command_index++;
       my $texinfo_text;
       if ($self->get_conf('CONVERT_TO_LATEX_IN_MATH')) {
         $texinfo_text = Texinfo::Convert::LaTeX::convert_to_latex_math(undef,
@@ -611,12 +622,18 @@ sub l2h_convert_command($$$;$$)
   my $args = shift;
   my $content = shift;
 
-  # the initialization did not went to the point of commands
-  # collections, return the default formatting.
-  if (not defined($latex_commands_count)) {
-    return &{$self->default_command_conversion($cmdname)}($self,
-                               $cmdname, $command, $args, $content);
+  # if not defined($latex_commands_count) the initialization did not
+  # went to the point of commands collections.
+
+  # The default formatting will lead to a warning message since the
+  # raw format is not html, so simply return an empty string.
+  if (not defined($latex_commands_count) or $commands_ignored{$command}) {
+    return '';
   }
+  #if (not defined($latex_commands_count)) {
+  #  return &{$self->default_command_conversion($cmdname)}($self,
+  #                             $cmdname, $command, $args, $content);
+  #}
 
   my $command_count = $commands_counters{$command};
   my $latex_text_index = $commands_text_index{$command};
@@ -650,7 +667,7 @@ sub l2h_convert_command($$$;$$)
   if (defined($l2h_from_html[$latex_text_index])) {
     $html_output_count++;
     $result .= $l2h_from_html[$latex_text_index];
-    $result .= "\n" if ($cmdname eq 'tex');
+    $result .= "\n" if ($cmdname eq 'tex' or $cmdname eq 'latex');
   } else {
     # if the result is not in @l2h_from_html, it should in general mean that
     # the conversion was skipped or there was an error or maybe latex2html
diff --git a/tp/ext/tex4ht.pm b/tp/ext/tex4ht.pm
index 0002e44307..53d5662d8a 100644
--- a/tp/ext/tex4ht.pm
+++ b/tp/ext/tex4ht.pm
@@ -51,6 +51,7 @@ texinfo_register_handler('finish', \&tex4ht_finish);
 
 texinfo_register_command_formatting('math', \&tex4ht_convert_command);
 texinfo_register_command_formatting('tex', \&tex4ht_convert_command);
+texinfo_register_command_formatting('latex', \&tex4ht_convert_command);
 texinfo_register_command_formatting('displaymath', \&tex4ht_convert_command);
 
 {
@@ -197,38 +198,14 @@ sub tex4ht_prepare($$)
     # An attempt to encode to utf8 lead to worse results than letting
     # perl encode to latin1.  But with other non ascii characters than
     # latin1 characters, there will be utf8 output anyway.
-    if (scalar(@{$format_collected_commands{$format}}) > 0) {
-      local *TEX4HT_TEXFILE;
-      unless (open(*TEX4HT_TEXFILE, ">$encoded_tex4ht_file_path_name")) {
-        $self->document_error($self,
-                sprintf(__("tex4ht.pm: could not open %s: %s"),
-                                      $tex4ht_file_path_name, $!));
-        return 1;
-      }
-      my $fh = *TEX4HT_TEXFILE;
-      my $comment = '@c';
-      $comment = '%' if ($format ne 'texi');
-      $comment .= " Automatically generated by the t4ht Texinfo HTML 
extension\n";
-      my $options_latex_math;
-      if ($format eq 'texi') {
-        print $fh "\\input texinfo
-\@setfilename $formats{$format}->{'basename'}.info\n";
-        print $fh "$comment";
-      } else {
-        print $fh "$comment";
-        if ($format eq 'latex') {
-          if ($self->get_conf('CONVERT_TO_LATEX_IN_MATH')) {
-            $options_latex_math
+    my $options_latex_math;
+    if ($self->get_conf('CONVERT_TO_LATEX_IN_MATH')) {
+      $options_latex_math
      = 
{Texinfo::Convert::LaTeX::copy_options_for_convert_to_latex_math($self)};
-          }
-          print $fh "\\documentstyle{article}\n\\begin{document}\n";
-        } elsif ($format eq 'tex') {
-          print $fh "\\csname tex4ht\\endcsname\n";
-        }
-      }
+    }
+    if (scalar(@{$format_collected_commands{$format}}) > 0) {
+      my $fh;
       foreach my $element (@{$format_collected_commands{$format}}) {
-        $formats{$format}->{'counter'}++;
-        my $counter = $formats{$format}->{'counter'};
         my $cmdname = $element->{'cmdname'};
         my $tree;
         if ($cmdname eq 'math') {
@@ -237,7 +214,8 @@ sub tex4ht_prepare($$)
           $tree = {'contents' => [@{$element->{'contents'}}]};
           if ($tree->{'contents'}->[0]
               and $tree->{'contents'}->[0]->{'type'}
-              and $tree->{'contents'}->[0]->{'type'} eq 
'empty_line_after_command') {
+              and ($tree->{'contents'}->[0]->{'type'} eq 
'empty_line_after_command'
+                   or $tree->{'contents'}->[0]->{'type'} eq 'elided_block')) {
             shift @{$tree->{'contents'}};
           }
           if ($tree->{'contents'}->[-1]->{'cmdname'}
@@ -245,6 +223,37 @@ sub tex4ht_prepare($$)
             pop @{$tree->{'contents'}};
           }
         }
+        if (scalar(@{$tree->{'contents'}}) == 0) {
+          # should correspond to an ignored block
+          next;
+        }
+        if ($formats{$format}->{'counter'} == 0) {
+          local *TEX4HT_TEXFILE;
+          unless (open(*TEX4HT_TEXFILE, ">$encoded_tex4ht_file_path_name")) {
+            $self->document_error($self,
+                    sprintf(__("tex4ht.pm: could not open %s: %s"),
+                                          $tex4ht_file_path_name, $!));
+            return 1;
+          }
+          $fh = *TEX4HT_TEXFILE;
+          my $comment = '@c';
+          $comment = '%' if ($format ne 'texi');
+          $comment .= " Automatically generated by the t4ht Texinfo HTML 
extension\n";
+          if ($format eq 'texi') {
+            print $fh "\\input texinfo
+    \@setfilename $formats{$format}->{'basename'}.info\n";
+            print $fh "$comment";
+          } else {
+            print $fh "$comment";
+            if ($format eq 'latex') {
+              print $fh "\\documentstyle{article}\n\\begin{document}\n";
+            } elsif ($format eq 'tex') {
+              print $fh "\\csname tex4ht\\endcsname\n";
+            }
+          }
+        }
+        $formats{$format}->{'counter'}++;
+        my $counter = $formats{$format}->{'counter'};
         my $text;
         if ($options_latex_math) {
           $text = Texinfo::Convert::LaTeX::convert_to_latex_math(undef,
@@ -286,16 +295,18 @@ sub tex4ht_prepare($$)
         my $end_comment = "<!-- tex4ht_end $formats{$format}->{'basename'} 
$cmdname $counter -->";
         print $fh "$before_comment_close$end_comment$after_comment_close";
       }
-      # finish the tex file
-      if ($format eq 'latex') {
-        print $fh "\\end{document}\n";
-      } elsif ($format eq 'tex') {
-        print $fh "\n\\bye\n";
-      } else {
-        print $fh "\n\@bye\n";
+      if ($formats{$format}->{'counter'} > 0) {
+        # finish the tex file
+        if ($format eq 'latex') {
+          print $fh "\\end{document}\n";
+        } elsif ($format eq 'tex') {
+          print $fh "\n\\bye\n";
+        } else {
+          print $fh "\n\@bye\n";
+        }
+        # FIXME check close error
+        close ($fh);
       }
-      # FIXME check close error
-      close ($fh);
     }
   }
   return 0;
@@ -476,10 +487,12 @@ sub tex4ht_convert_command($$$;$$)
     $commands{$cmdname}->{'output_counter'}++;
     return $commands{$cmdname}->{'results'}->{$command};
   } else {
-    # probably a bug in that case
-    $self->document_warn($self, sprintf(__(
+    # probably a bug in that case, unless the format is ignored
+    if ($self->is_format_expanded($cmdname)) {
+      $self->document_warn($self, sprintf(__(
                        "tex4ht.pm: output has no HTML item for \@%s %s"),
                                   $cmdname, $command));
+    }
     return '';
   }
 }
diff --git a/tp/tests/many_input_files/tex_l2h_res/tex-l2h_cache.pm 
b/tp/tests/many_input_files/tex_l2h_res/tex-l2h_cache.pm
index eca1ff9208..060c6df8ab 100644
--- a/tp/tests/many_input_files/tex_l2h_res/tex-l2h_cache.pm
+++ b/tp/tests/many_input_files/tex_l2h_res/tex-l2h_cache.pm
@@ -31,50 +31,53 @@ $l2h_cache{$l2h_cache_key} = q|
 <P>
 tex <SPAN CLASS="logo-TeX">T<SMALL>E</SMALL>X</SPAN>|;
 
-$l2h_cache_key = q/$$-- f(x) = {1 \over \sigma \sqrt{2\pi}}e@sup{-{1 \over 
2}\left({x-\mu \over \sigma}\right)^2}
+$l2h_cache_key = q/$$-- f(x) = {1 \over \sigma \sqrt{2\pi}}e^{-{1 \over 
2}\left({x-\mu \over \sigma}\right)^2}
 $$/;
 $l2h_cache{$l2h_cache_key} = q|<DIV CLASS="displaymath">
 <!-- MATH
  \begin{displaymath}
-- - f(x) = {1 \over \sigma \sqrt{2\pi}}e@sup{-{1 \over 2}\left({x-\mu \over 
\sigma}\right)^2}
+- - f(x) = {1 \over \sigma \sqrt{2\pi}}e^{-{1 \over 2}\left({x-\mu \over 
\sigma}\right)^2}
 \end{displaymath}
  -->
 
 <IMG
- STYLE="height: 6.26ex; vertical-align: -2.32ex; " SRC="tex_7.svg"
- ALT="$\displaystyle -- f(x) = {1 \over \sigma \sqrt{2\pi}}e@sup{-{1 \over 
2}\left({x-\mu \over \sigma}\right)^2}
+ STYLE="height: 5.44ex; vertical-align: -2.28ex; " SRC="tex_7.svg"
+ ALT="$\displaystyle -- f(x) = {1 \over \sigma \sqrt{2\pi}}e^{-{1 \over 
2}\left({x-\mu \over \sigma}\right)^2}
 $">
 </DIV>
 |;
 
-$l2h_cache_key = q/$@code{math code} a < b$/;
+$l2h_cache_key = q/$\mathtt{math code} a < b$/;
 $l2h_cache{$l2h_cache_key} = q|<!-- MATH
- $@code{math code} a < b$
+ $\mathtt{math code} a < b$
  -->
 <SPAN CLASS="MATH"><IMG
  STYLE="height: 1.93ex; vertical-align: -0.21ex; " SRC="tex_4.svg"
- ALT="$@code{math code} a &lt; b$"></SPAN>|;
+ ALT="$\mathtt{math code} a &lt; b$"></SPAN>|;
 
-$l2h_cache_key = q/$\sum_{i} f(x)@sup{2}$/;
+$l2h_cache_key = q/$\sum_{i} f(x)^{2}$/;
 $l2h_cache{$l2h_cache_key} = q|<!-- MATH
- $\sum_{i} f(x)@sup{2}$
+ $\sum_{i} f(x)^{2}$
  -->
 <SPAN CLASS="MATH"><IMG
- STYLE="height: 2.66ex; vertical-align: -0.81ex; " SRC="tex_6.svg"
- ALT="$\sum_{i} f(x)@sup{2}$"></SPAN>|;
+ STYLE="height: 2.81ex; vertical-align: -0.81ex; " SRC="tex_6.svg"
+ ALT="$\sum_{i} f(x)^{2}$"></SPAN>|;
 
-$l2h_cache_key = q/$\underline{@code{math \hbox{ code }}} 
\sum_{i}{\underline{f}}$/;
+$l2h_cache_key = q/$\underline{\mathtt{math \hbox{ code }}} 
\sum_{i}{\underline{\mathit{eff}}}$/;
 $l2h_cache{$l2h_cache_key} = q|<!-- MATH
- $\underline{@code{math \hbox{ code }}} \sum_{i}{\underline{f}}$
+ $\underline{\mathtt{math \hbox{ code }}} \sum_{i}{\underline{\mathit{eff}}}$
  -->
 <SPAN CLASS="MATH"><IMG
  STYLE="height: 2.88ex; vertical-align: -1.03ex; " SRC="tex_5.svg"
- ALT="$\underline{@code{math \hbox{ code }}} 
\sum_{i}{\underline{f}}$"></SPAN>|;
+ ALT="$\underline{\mathtt{math \hbox{ code }}} 
\sum_{i}{\underline{\mathit{eff}}}$"></SPAN>|;
 
-$l2h_cache_key = q/$a @\ b$/;
-$l2h_cache{$l2h_cache_key} = q|<SPAN CLASS="MATH"><IMG
- STYLE="height: 1.84ex; vertical-align: -0.12ex; " SRC="tex_3.svg"
- ALT="$a @\ b$"></SPAN>|;
+$l2h_cache_key = q/$a \backslash{} b$/;
+$l2h_cache{$l2h_cache_key} = q|<!-- MATH
+ $a \backslash{} b$
+ -->
+<SPAN CLASS="MATH"><IMG
+ STYLE="height: 2.55ex; vertical-align: -0.70ex; " SRC="tex_3.svg"
+ ALT="$a \backslash{} b$"></SPAN>|;
 
 $l2h_cache_key = q/${x^i}\over{\tan y}$/;
 $l2h_cache{$l2h_cache_key} = q|<!-- MATH
diff --git a/tp/tests/many_input_files/tex_l2h_res/tex.html 
b/tp/tests/many_input_files/tex_l2h_res/tex.html
index fa83fb8b7a..7828163b1c 100644
--- a/tp/tests/many_input_files/tex_l2h_res/tex.html
+++ b/tp/tests/many_input_files/tex_l2h_res/tex.html
@@ -45,6 +45,8 @@ span.program-in-footer {font-size: smaller}
 
 Some text one the line following @end tex
 </p>
+<p>LaTeX block
+</p>
 <p>Now tex on the following line, valid fot tex (with @end tex on a line).
 
 <P>
@@ -61,36 +63,39 @@ Here some <!-- MATH
  ALT="${x^i}\over{\tan y}$"></SPAN>.
 </p>
 <p>Maths with protected \:
+<!-- MATH
+ $a \backslash{} b$
+ -->
 <SPAN CLASS="MATH"><IMG
- STYLE="height: 1.84ex; vertical-align: -0.12ex; " SRC="tex_3.svg"
- ALT="$a @\ b$"></SPAN>.
+ STYLE="height: 2.55ex; vertical-align: -0.70ex; " SRC="tex_3.svg"
+ ALT="$a \backslash{} b$"></SPAN>.
 </p>
 <p>Maths with code @-command:
 </p>
 <p><!-- MATH
- $@code{math code} a < b$
+ $\mathtt{math code} a < b$
  -->
 <SPAN CLASS="MATH"><IMG
  STYLE="height: 1.93ex; vertical-align: -0.21ex; " SRC="tex_4.svg"
- ALT="$@code{math code} a &lt; b$"></SPAN>
+ ALT="$\mathtt{math code} a &lt; b$"></SPAN>
 </p>
 <p>Maths with code @-command and braces:
 </p>
 <p><!-- MATH
- $\underline{@code{math \hbox{ code }}} \sum_{i}{\underline{f}}$
+ $\underline{\mathtt{math \hbox{ code }}} \sum_{i}{\underline{\mathit{eff}}}$
  -->
 <SPAN CLASS="MATH"><IMG
  STYLE="height: 2.88ex; vertical-align: -1.03ex; " SRC="tex_5.svg"
- ALT="$\underline{@code{math \hbox{ code }}} \sum_{i}{\underline{f}}$"></SPAN>
+ ALT="$\underline{\mathtt{math \hbox{ code }}} 
\sum_{i}{\underline{\mathit{eff}}}$"></SPAN>
 </p>
 <p>Maths with @-sup
 </p>
 <p><!-- MATH
- $\sum_{i} f(x)@sup{2}$
+ $\sum_{i} f(x)^{2}$
  -->
 <SPAN CLASS="MATH"><IMG
- STYLE="height: 2.66ex; vertical-align: -0.81ex; " SRC="tex_6.svg"
- ALT="$\sum_{i} f(x)@sup{2}$"></SPAN>
+ STYLE="height: 2.81ex; vertical-align: -0.81ex; " SRC="tex_6.svg"
+ ALT="$\sum_{i} f(x)^{2}$"></SPAN>
 </p>
 <p>@\ outside of math
 </p>
@@ -100,13 +105,13 @@ Here some <!-- MATH
 </p><DIV CLASS="displaymath">
 <!-- MATH
  \begin{displaymath}
-- - f(x) = {1 \over \sigma \sqrt{2\pi}}e@sup{-{1 \over 2}\left({x-\mu \over 
\sigma}\right)^2}
+- - f(x) = {1 \over \sigma \sqrt{2\pi}}e^{-{1 \over 2}\left({x-\mu \over 
\sigma}\right)^2}
 \end{displaymath}
  -->
 
 <IMG
- STYLE="height: 6.26ex; vertical-align: -2.32ex; " SRC="tex_7.svg"
- ALT="$\displaystyle -- f(x) = {1 \over \sigma \sqrt{2\pi}}e@sup{-{1 \over 
2}\left({x-\mu \over \sigma}\right)^2}
+ STYLE="height: 5.44ex; vertical-align: -2.28ex; " SRC="tex_7.svg"
+ ALT="$\displaystyle -- f(x) = {1 \over \sigma \sqrt{2\pi}}e^{-{1 \over 
2}\left({x-\mu \over \sigma}\right)^2}
 $">
 </DIV>
 
diff --git a/tp/tests/many_input_files/tex_l2h_res/tex_l2h.2 
b/tp/tests/many_input_files/tex_l2h_res/tex_l2h.2
index ad94cb926b..b8937a9ad1 100644
--- a/tp/tests/many_input_files/tex_l2h_res/tex_l2h.2
+++ b/tp/tests/many_input_files/tex_l2h_res/tex_l2h.2
@@ -1,5 +1,5 @@
 texexpand 
 tex.texi:7: warning: @tex should only appear at the beginning of a line
 tex.texi:14: bad argument to @end: tex bidule
-tex.texi:46: warning: @\ should only appear in math context
+tex.texi:54: warning: @\ should only appear in math context
 texexpand 
diff --git a/tp/tests/many_input_files/tex_l2h_res/tex_l2h.html 
b/tp/tests/many_input_files/tex_l2h_res/tex_l2h.html
index 5a2e2de8e2..78722ede80 100644
--- a/tp/tests/many_input_files/tex_l2h_res/tex_l2h.html
+++ b/tp/tests/many_input_files/tex_l2h_res/tex_l2h.html
@@ -54,39 +54,42 @@ tex <SPAN CLASS="logo-TeX">T<SMALL>E</SMALL>X</SPAN>
 <!-- l2h_end tex_l2h 3 -->
 
 <!-- l2h_begin tex_l2h 4 -->
+<!-- MATH
+ $a \backslash{} b$
+ -->
 <SPAN CLASS="MATH"><IMG
- STYLE="height: 1.84ex; vertical-align: -0.12ex; " SRC="tex_l2h_img3.svg"
- ALT="$a @\ b$"></SPAN>
+ STYLE="height: 2.55ex; vertical-align: -0.70ex; " SRC="tex_l2h_img3.svg"
+ ALT="$a \backslash{} b$"></SPAN>
 
 <!-- l2h_end tex_l2h 4 -->
 
 <!-- l2h_begin tex_l2h 5 -->
 <!-- MATH
- $@code{math code} a < b$
+ $\mathtt{math code} a < b$
  -->
 <SPAN CLASS="MATH"><IMG
  STYLE="height: 1.93ex; vertical-align: -0.21ex; " SRC="tex_l2h_img4.svg"
- ALT="$@code{math code} a &lt; b$"></SPAN>
+ ALT="$\mathtt{math code} a &lt; b$"></SPAN>
 
 <!-- l2h_end tex_l2h 5 -->
 
 <!-- l2h_begin tex_l2h 6 -->
 <!-- MATH
- $\underline{@code{math \hbox{ code }}} \sum_{i}{\underline{f}}$
+ $\underline{\mathtt{math \hbox{ code }}} \sum_{i}{\underline{\mathit{eff}}}$
  -->
 <SPAN CLASS="MATH"><IMG
  STYLE="height: 2.88ex; vertical-align: -1.03ex; " SRC="tex_l2h_img5.svg"
- ALT="$\underline{@code{math \hbox{ code }}} \sum_{i}{\underline{f}}$"></SPAN>
+ ALT="$\underline{\mathtt{math \hbox{ code }}} 
\sum_{i}{\underline{\mathit{eff}}}$"></SPAN>
 
 <!-- l2h_end tex_l2h 6 -->
 
 <!-- l2h_begin tex_l2h 7 -->
 <!-- MATH
- $\sum_{i} f(x)@sup{2}$
+ $\sum_{i} f(x)^{2}$
  -->
 <SPAN CLASS="MATH"><IMG
- STYLE="height: 2.66ex; vertical-align: -0.81ex; " SRC="tex_l2h_img6.svg"
- ALT="$\sum_{i} f(x)@sup{2}$"></SPAN>
+ STYLE="height: 2.81ex; vertical-align: -0.81ex; " SRC="tex_l2h_img6.svg"
+ ALT="$\sum_{i} f(x)^{2}$"></SPAN>
 
 <!-- l2h_end tex_l2h 7 -->
 
@@ -94,13 +97,13 @@ tex <SPAN CLASS="logo-TeX">T<SMALL>E</SMALL>X</SPAN>
 <DIV CLASS="displaymath">
 <!-- MATH
  \begin{displaymath}
-- - f(x) = {1 \over \sigma \sqrt{2\pi}}e@sup{-{1 \over 2}\left({x-\mu \over 
\sigma}\right)^2}
+- - f(x) = {1 \over \sigma \sqrt{2\pi}}e^{-{1 \over 2}\left({x-\mu \over 
\sigma}\right)^2}
 \end{displaymath}
  -->
 
 <IMG
- STYLE="height: 6.26ex; vertical-align: -2.32ex; " SRC="tex_l2h_img7.svg"
- ALT="$\displaystyle -- f(x) = {1 \over \sigma \sqrt{2\pi}}e@sup{-{1 \over 
2}\left({x-\mu \over \sigma}\right)^2}
+ STYLE="height: 5.44ex; vertical-align: -2.28ex; " SRC="tex_l2h_img7.svg"
+ ALT="$\displaystyle -- f(x) = {1 \over \sigma \sqrt{2\pi}}e^{-{1 \over 
2}\left({x-\mu \over \sigma}\right)^2}
 $">
 </DIV>
 
diff --git a/tp/tests/many_input_files/tex_l2h_res/tex_l2h.tex 
b/tp/tests/many_input_files/tex_l2h_res/tex_l2h.tex
index 646a0d5bc2..398bd16b9c 100644
--- a/tp/tests/many_input_files/tex_l2h_res/tex_l2h.tex
+++ b/tp/tests/many_input_files/tex_l2h_res/tex_l2h.tex
@@ -38,7 +38,7 @@ ${x^i}\over{\tan y}$
 
 <!-- l2h_begin tex_l2h 4 -->
 \end{rawhtml}
-$a @\ b$
+$a \backslash{} b$
 \begin{rawhtml}
 <!-- l2h_end tex_l2h 4 -->
 
@@ -47,7 +47,7 @@ $a @\ b$
 
 <!-- l2h_begin tex_l2h 5 -->
 \end{rawhtml}
-$@code{math code} a < b$
+$\mathtt{math code} a < b$
 \begin{rawhtml}
 <!-- l2h_end tex_l2h 5 -->
 
@@ -56,7 +56,7 @@ $@code{math code} a < b$
 
 <!-- l2h_begin tex_l2h 6 -->
 \end{rawhtml}
-$\underline{@code{math \hbox{ code }}} \sum_{i}{\underline{f}}$
+$\underline{\mathtt{math \hbox{ code }}} \sum_{i}{\underline{\mathit{eff}}}$
 \begin{rawhtml}
 <!-- l2h_end tex_l2h 6 -->
 
@@ -65,7 +65,7 @@ $\underline{@code{math \hbox{ code }}} 
\sum_{i}{\underline{f}}$
 
 <!-- l2h_begin tex_l2h 7 -->
 \end{rawhtml}
-$\sum_{i} f(x)@sup{2}$
+$\sum_{i} f(x)^{2}$
 \begin{rawhtml}
 <!-- l2h_end tex_l2h 7 -->
 
@@ -74,7 +74,7 @@ $\sum_{i} f(x)@sup{2}$
 
 <!-- l2h_begin tex_l2h 8 -->
 \end{rawhtml}
-$$-- f(x) = {1 \over \sigma \sqrt{2\pi}}e@sup{-{1 \over 2}\left({x-\mu \over 
\sigma}\right)^2}
+$$-- f(x) = {1 \over \sigma \sqrt{2\pi}}e^{-{1 \over 2}\left({x-\mu \over 
\sigma}\right)^2}
 $$
 \begin{rawhtml}
 <!-- l2h_end tex_l2h 8 -->
diff --git a/tp/tests/many_input_files/tex_l2h_res/tex_l2h_images.tex 
b/tp/tests/many_input_files/tex_l2h_res/tex_l2h_images.tex
index 92e545762b..b20b77b26c 100644
--- a/tp/tests/many_input_files/tex_l2h_res/tex_l2h_images.tex
+++ b/tp/tests/many_input_files/tex_l2h_res/tex_l2h_images.tex
@@ -118,7 +118,7 @@
 % !!! IMAGES START HERE !!!
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay43}%
+\lthtmlinlinemathA{tex2html_wrap_indisplay45}%
 $\displaystyle \chi^2 = \sum_{i=1}^N
           \left(y_i - (a + b x_i)
          \over \sigma_i\right)^2 $%
@@ -126,38 +126,38 @@ $\displaystyle \chi^2 = \sum_{i=1}^N
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_inline24}%
+\lthtmlinlinemathA{tex2html_wrap_inline26}%
 ${x^i}\over{\tan y}$%
 \lthtmlindisplaymathZ
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_inline26}%
-$a @\ b$%
+\lthtmlinlinemathA{tex2html_wrap_inline28}%
+$a \backslash{} b$%
 \lthtmlindisplaymathZ
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_inline28}%
-$@code{math code} a < b$%
+\lthtmlinlinemathA{tex2html_wrap_inline30}%
+$\mathtt{math code} a < b$%
 \lthtmlindisplaymathZ
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_inline30}%
-$\underline{@code{math \hbox{ code }}} \sum_{i}{\underline{f}}$%
+\lthtmlinlinemathA{tex2html_wrap_inline32}%
+$\underline{\mathtt{math \hbox{ code }}} \sum_{i}{\underline{\mathit{eff}}}$%
 \lthtmlindisplaymathZ
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_inline32}%
-$\sum_{i} f(x)@sup{2}$%
+\lthtmlinlinemathA{tex2html_wrap_inline34}%
+$\sum_{i} f(x)^{2}$%
 \lthtmlindisplaymathZ
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay50}%
-$\displaystyle -- f(x) = {1 \over \sigma \sqrt{2\pi}}e@sup{-{1 \over 
2}\left({x-\mu \over \sigma}\right)^2}
+\lthtmlinlinemathA{tex2html_wrap_indisplay52}%
+$\displaystyle -- f(x) = {1 \over \sigma \sqrt{2\pi}}e^{-{1 \over 
2}\left({x-\mu \over \sigma}\right)^2}
 $%
 \lthtmlindisplaymathZ
 \lthtmlcheckvsize\clearpage}
diff --git a/tp/tests/many_input_files/tex_t4ht_res/tex.html 
b/tp/tests/many_input_files/tex_t4ht_res/tex.html
index 93c167f0a3..048c731e21 100644
--- a/tp/tests/many_input_files/tex_t4ht_res/tex.html
+++ b/tp/tests/many_input_files/tex_t4ht_res/tex.html
@@ -38,6 +38,8 @@ src="tex_tex4ht_tex0x.png" alt="     N  (            )2
 <!--l. 10--><p class="indent" >     
 Some text one the line following @end tex
 </p>
+<p>LaTeX block
+</p>
 <p>Now tex on the following line, valid fot tex (with @end tex on a line).
 
 <!--l. 13--><p class="indent" >    tex TeX 
@@ -71,8 +73,9 @@ class="cmmi-10">code</span><span
 class="cmmi-10">math</span> code </span><span 
 class="cmex-10">&#x2211;</span>
   <sub><span 
-class="cmmi-7">i</span></sub><span class="underline"><span 
-class="cmmi-10">f</span></span>
+class="cmmi-7">i</span></sub><span class="underline">@<span 
+class="cmmi-10">var</span><span 
+class="cmmi-10">eff</span></span>
 </p>
 <p>Maths with @-sup
 </p>
diff --git a/tp/tests/many_input_files/tex_t4ht_res/tex_t4ht.2 
b/tp/tests/many_input_files/tex_t4ht_res/tex_t4ht.2
index 253e8b1da9..65837b3198 100644
--- a/tp/tests/many_input_files/tex_t4ht_res/tex_t4ht.2
+++ b/tp/tests/many_input_files/tex_t4ht_res/tex_t4ht.2
@@ -1,3 +1,3 @@
 tex.texi:7: warning: @tex should only appear at the beginning of a line
 tex.texi:14: bad argument to @end: tex bidule
-tex.texi:46: warning: @\ should only appear in math context
+tex.texi:54: warning: @\ should only appear in math context
diff --git a/tp/tests/many_input_files/tex_t4ht_res/tex_tex4ht_tex.tex 
b/tp/tests/many_input_files/tex_t4ht_res/tex_tex4ht_tex.tex
index 57f40b13ab..31c380e43a 100644
--- a/tp/tests/many_input_files/tex_t4ht_res/tex_tex4ht_tex.tex
+++ b/tp/tests/many_input_files/tex_t4ht_res/tex_tex4ht_tex.tex
@@ -19,7 +19,7 @@ tex \TeX
 \HCode{\Hnewline \Hnewline <!-- tex4ht_begin tex_tex4ht_tex math 5 
-->\Hnewline}
 \IgnorePar $@code{math code} a < b$\HCode{\Hnewline <!-- tex4ht_end 
tex_tex4ht_tex math 5 -->\Hnewline \Hnewline}
 \HCode{\Hnewline \Hnewline <!-- tex4ht_begin tex_tex4ht_tex math 6 
-->\Hnewline}
-\IgnorePar $\underline{@code{math \hbox{ code }}} 
\sum_{i}{\underline{f}}$\HCode{\Hnewline <!-- tex4ht_end tex_tex4ht_tex math 6 
-->\Hnewline \Hnewline}
+\IgnorePar $\underline{@code{math \hbox{ code }}} 
\sum_{i}{\underline{@var{eff}}}$\HCode{\Hnewline <!-- tex4ht_end tex_tex4ht_tex 
math 6 -->\Hnewline \Hnewline}
 \HCode{\Hnewline \Hnewline <!-- tex4ht_begin tex_tex4ht_tex math 7 
-->\Hnewline}
 \IgnorePar $\sum_{i} f(x)@sup{2}$\HCode{\Hnewline <!-- tex4ht_end 
tex_tex4ht_tex math 7 -->\Hnewline \Hnewline}
 \HCode{\Hnewline \Hnewline <!-- tex4ht_begin tex_tex4ht_tex displaymath 8 
-->\Hnewline}
diff --git a/tp/tests/tex_html/res_parser/formatting_singular/sing-l2h_cache.pm 
b/tp/tests/tex_html/res_parser/formatting_singular/sing-l2h_cache.pm
index daaff90d53..c96650ef04 100644
--- a/tp/tests/tex_html/res_parser/formatting_singular/sing-l2h_cache.pm
+++ b/tp/tests/tex_html/res_parser/formatting_singular/sing-l2h_cache.pm
@@ -2,10 +2,6 @@
 use utf8;
 our %l2h_cache;
 
-$l2h_cache_key = q//;
-$l2h_cache{$l2h_cache_key} = q|
-<P>|;
-
 $l2h_cache_key = q/$$TeX LaTeX \star{} \mathord{\text{\aa{}}} \circledR{} 
^{\circ{}} 
 $$/;
 $l2h_cache{$l2h_cache_key} = q|<DIV CLASS="displaymath">
diff --git a/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h.html 
b/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h.html
index 404a2744be..9e43964279 100644
--- a/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h.html
+++ b/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h.html
@@ -173,12 +173,6 @@ $">
 <!-- l2h_end sing_l2h 8 -->
 
 <!-- l2h_begin sing_l2h 9 -->
-
-<P>
-
-<!-- l2h_end sing_l2h 9 -->
-
-<!-- l2h_begin sing_l2h 10 -->
 <!-- MATH
  $- -a- {\frac{1}{2}}$
  -->
@@ -186,9 +180,9 @@ $">
  STYLE="height: 2.98ex; vertical-align: -0.92ex; " SRC="sing_l2h_img9.svg"
  ALT="$--a- {\frac{1}{2}}$"></SPAN>
 
-<!-- l2h_end sing_l2h 10 -->
+<!-- l2h_end sing_l2h 9 -->
 
-<!-- l2h_begin sing_l2h 11 -->
+<!-- l2h_begin sing_l2h 10 -->
 <DIV CLASS="displaymath">
 <!-- MATH
  \begin{displaymath}
@@ -209,9 +203,9 @@ $">
 </DIV>
 
 
-<!-- l2h_end sing_l2h 11 -->
+<!-- l2h_end sing_l2h 10 -->
 
-<!-- l2h_begin sing_l2h 12 -->
+<!-- l2h_begin sing_l2h 11 -->
 <DIV CLASS="displaymath">
 <!-- MATH
  \begin{displaymath}
@@ -226,9 +220,9 @@ $">
 </DIV>
 
 
-<!-- l2h_end sing_l2h 12 -->
+<!-- l2h_end sing_l2h 11 -->
 
-<!-- l2h_begin sing_l2h 13 -->
+<!-- l2h_begin sing_l2h 12 -->
 <DIV CLASS="displaymath">
 <!-- MATH
  \begin{displaymath}
@@ -243,7 +237,7 @@ $">
 </DIV>
 
 
-<!-- l2h_end sing_l2h 13 -->
+<!-- l2h_end sing_l2h 12 -->
 <BR>
 <HR>
 </BODY>
diff --git a/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h.tex 
b/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h.tex
index 42e2939a27..96a47d27f5 100644
--- a/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h.tex
+++ b/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h.tex
@@ -100,7 +100,7 @@ $$\partial_t \eta (t) = g(\eta(t),\varphi(t))$$ ''
 
 <!-- l2h_begin sing_l2h 9 -->
 \end{rawhtml}
-
+$--a- {\frac{1}{2}}$
 \begin{rawhtml}
 <!-- l2h_end sing_l2h 9 -->
 
@@ -109,42 +109,33 @@ $$\partial_t \eta (t) = g(\eta(t),\varphi(t))$$ ''
 
 <!-- l2h_begin sing_l2h 10 -->
 \end{rawhtml}
-$--a- {\frac{1}{2}}$
-\begin{rawhtml}
-<!-- l2h_end sing_l2h 10 -->
-
-\end{rawhtml}
-\begin{rawhtml}
-
-<!-- l2h_begin sing_l2h 11 -->
-\end{rawhtml}
 $$\ddot{u} \ddot{U} \tilde{n} \hat{a} \acute{e} \bar{o} \grave{i} \acute{e} 
\grave{\bar{E}}
 \textsl{\c{\'{C}}} \textsl{\c{\'{C}}} \textsl{\H{a}} \dot{a} \mathring{a} 
\textsl{\t{a}}
 \breve{a} \check{a}
  ? .
 $$
 \begin{rawhtml}
-<!-- l2h_end sing_l2h 11 -->
+<!-- l2h_end sing_l2h 10 -->
 
 \end{rawhtml}
 \begin{rawhtml}
 
-<!-- l2h_begin sing_l2h 12 -->
+<!-- l2h_begin sing_l2h 11 -->
 \end{rawhtml}
 $$TeX LaTeX \star{} \mathord{\text{\aa{}}} \circledR{} ^{\circ{}} 
 $$
 \begin{rawhtml}
-<!-- l2h_end sing_l2h 12 -->
+<!-- l2h_end sing_l2h 11 -->
 
 \end{rawhtml}
 \begin{rawhtml}
 
-<!-- l2h_begin sing_l2h 13 -->
+<!-- l2h_begin sing_l2h 12 -->
 \end{rawhtml}
 $$\mathtt{t} 
 $$
 \begin{rawhtml}
-<!-- l2h_end sing_l2h 13 -->
+<!-- l2h_end sing_l2h 12 -->
 
 \end{rawhtml}
 \end{document}
diff --git 
a/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h_images.tex 
b/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h_images.tex
index acc48225a4..e56bfa06ad 100644
--- a/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h_images.tex
+++ b/tp/tests/tex_html/res_parser/formatting_singular/sing_l2h_images.tex
@@ -124,7 +124,7 @@ $--a {\frac{1}{2}} -$%
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay217}%
+\lthtmlinlinemathA{tex2html_wrap_indisplay215}%
 $\displaystyle disp--laymath
 f(x) = {1 \over \sigma \sqrt{2\pi}}e^{-{1 \over 2}\left({x-\mu \over 
\sigma}\right)^2}
 $%
@@ -132,7 +132,7 @@ $%
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay219}%
+\lthtmlinlinemathA{tex2html_wrap_indisplay217}%
 $\displaystyle \mathbf{``simple-double--three---four----''} \hbox{aa}
 `\hbox{}`simple-double-\hbox{}-three---four----'\hbox{}'
 $%
@@ -140,7 +140,7 @@ $%
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay221}%
+\lthtmlinlinemathA{tex2html_wrap_indisplay219}%
 $\displaystyle \imath{} \jmath{}
 \mathord{\text{\l{}}} \textsl{\c{c}}
 \textsl{\b{a}} \textsl{\d{a}} \textsl{\k{a}} a^{h}_{l}
@@ -151,7 +151,7 @@ $%
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay223}%
+\lthtmlinlinemathA{tex2html_wrap_indisplay221}%
 $\displaystyle \rightarrow{}
 u
 \bullet{} \copyright{} \dots{} \dots{} \equiv{}
@@ -164,7 +164,7 @@ $%
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay225}%
+\lthtmlinlinemathA{tex2html_wrap_indisplay223}%
 $\displaystyle \mathord{\text{\textquotedblleft{}}} 
\mathord{\text{\textquotedblright{}}} 
 \mathord{\text{\textquoteleft{}}} \mathord{\text{\textquoteright{}}} 
\mathord{\text{\quotedblbase{}}} \mathord{\text{\quotesinglbase{}}} 
\mathord{\text{\guillemotleft{}}}
 \mathord{\text{\guillemotright{}}} \mathord{\text{\guillemotleft{}}} 
\mathord{\text{\guillemotright{}}} \mathord{\text{\guilsinglleft{}}}
@@ -174,14 +174,14 @@ $%
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay227}%
+\lthtmlinlinemathA{tex2html_wrap_indisplay225}%
 $\displaystyle \mathbf{b} \mathit{i} \mathrm{r} sc \mathsf{sansserif} 
\mathit{slanted}
 $%
 \lthtmlindisplaymathZ
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay229}%
+\lthtmlinlinemathA{tex2html_wrap_indisplay227}%
 $\displaystyle \partial_t \eta (t) = g(\eta(t),\varphi(t))$%
 \lthtmlindisplaymathZ
 \lthtmlcheckvsize\clearpage}
@@ -193,7 +193,7 @@ $--a- {\frac{1}{2}}$%
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay232}%
+\lthtmlinlinemathA{tex2html_wrap_indisplay230}%
 $\displaystyle \ddot{u} \ddot{U} \tilde{n} \hat{a} \acute{e} \bar{o} \grave{i} 
\acute{e} \grave{\bar{E}}
 \textsl{\c{\'{C}}} \textsl{\c{\'{C}}} \textsl{\H{a}} \dot{a} \mathring{a} 
\textsl{\t{a}}
 \breve{a} \check{a}
@@ -203,14 +203,14 @@ $%
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay234}%
+\lthtmlinlinemathA{tex2html_wrap_indisplay232}%
 $\displaystyle TeX LaTeX \star{} \mathord{\text{\aa{}}} \circledR{} ^{\circ{}} 
 $%
 \lthtmlindisplaymathZ
 \lthtmlcheckvsize\clearpage}
 
 {\newpage\clearpage
-\lthtmlinlinemathA{tex2html_wrap_indisplay236}%
+\lthtmlinlinemathA{tex2html_wrap_indisplay234}%
 $\displaystyle \mathtt{t} 
 $%
 \lthtmlindisplaymathZ
diff --git a/tp/tests/tex_html/res_parser/tex/tex.2 
b/tp/tests/tex_html/res_parser/tex/tex.2
index 3190c2b9b3..0aaa627853 100644
--- a/tp/tests/tex_html/res_parser/tex/tex.2
+++ b/tp/tests/tex_html/res_parser/tex/tex.2
@@ -1,4 +1,4 @@
 tex.texi:7: warning: @tex should only appear at the beginning of a line
 tex.texi:14: bad argument to @end: tex bidule
-tex.texi:46: warning: @\ should only appear in math context
+tex.texi:54: warning: @\ should only appear in math context
 texexpand 
diff --git a/tp/tests/tex_html/res_parser/tex/tex.html 
b/tp/tests/tex_html/res_parser/tex/tex.html
index 7bcd435401..7828163b1c 100644
--- a/tp/tests/tex_html/res_parser/tex/tex.html
+++ b/tp/tests/tex_html/res_parser/tex/tex.html
@@ -45,6 +45,8 @@ span.program-in-footer {font-size: smaller}
 
 Some text one the line following @end tex
 </p>
+<p>LaTeX block
+</p>
 <p>Now tex on the following line, valid fot tex (with @end tex on a line).
 
 <P>
diff --git a/tp/tests/tex_html/res_parser/tex_httex/tex.html 
b/tp/tests/tex_html/res_parser/tex_httex/tex.html
index e260b5a14f..048c731e21 100644
--- a/tp/tests/tex_html/res_parser/tex_httex/tex.html
+++ b/tp/tests/tex_html/res_parser/tex_httex/tex.html
@@ -38,6 +38,8 @@ src="tex_tex4ht_tex0x.png" alt="     N  (            )2
 <!--l. 10--><p class="indent" >     
 Some text one the line following @end tex
 </p>
+<p>LaTeX block
+</p>
 <p>Now tex on the following line, valid fot tex (with @end tex on a line).
 
 <!--l. 13--><p class="indent" >    tex TeX 
diff --git a/tp/tests/tex_html/res_parser/tex_notex/tex.2 
b/tp/tests/tex_html/res_parser/tex_notex/tex.2
index 253e8b1da9..65837b3198 100644
--- a/tp/tests/tex_html/res_parser/tex_notex/tex.2
+++ b/tp/tests/tex_html/res_parser/tex_notex/tex.2
@@ -1,3 +1,3 @@
 tex.texi:7: warning: @tex should only appear at the beginning of a line
 tex.texi:14: bad argument to @end: tex bidule
-tex.texi:46: warning: @\ should only appear in math context
+tex.texi:54: warning: @\ should only appear in math context
diff --git a/tp/tests/tex_html/res_parser/tex_notex/tex.html 
b/tp/tests/tex_html/res_parser/tex_notex/tex.html
index 6e8a6e70ac..7616b86373 100644
--- a/tp/tests/tex_html/res_parser/tex_notex/tex.html
+++ b/tp/tests/tex_html/res_parser/tex_notex/tex.html
@@ -27,6 +27,8 @@ span.program-in-footer {font-size: smaller}
 
 <p>Now tex on the same line Some text one the line following @end tex
 </p>
+<p>LaTeX block
+</p>
 <p>Now tex on the following line, valid fot tex (with @end tex on a line).
 </p>
 <p>Same that @html (but empty following line not ignored).
diff --git a/tp/tests/tex_html/tex.texi b/tp/tests/tex_html/tex.texi
index 18012f29f9..a23578df1d 100644
--- a/tp/tests/tex_html/tex.texi
+++ b/tp/tests/tex_html/tex.texi
@@ -15,6 +15,14 @@ $$ \chi^2 = \sum_{i=1}^N
 Some text one the line following @@end tex
 @end ifhtml
 
+LaTeX block
+@latex
+\begin{eqnarray}
+\frac{@var{a}^b}{\xsi} &=& @code{@'e} \\
+X &=& Y
+\end{eqnarray}
+@end latex
+
 Now tex on the following line, valid fot tex (with @@end tex on a line).
 @tex some
 



reply via email to

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