texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/LaTeX.pm (_latex_header, _c


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/LaTeX.pm (_latex_header, _convert): protect only the most problematic characters in image file name. Use \detokenize in argument of \fbox to be sure that the non escaped characters in image file name have no special meaning, when TEST is set.
Date: Wed, 27 Jul 2022 19:40:34 -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 ff6f80af74 * tp/Texinfo/Convert/LaTeX.pm (_latex_header, _convert): 
protect only the most problematic characters in image file name.  Use 
\detokenize in argument of \fbox to be sure that the non escaped characters in 
image file name have no special meaning, when TEST is set.
ff6f80af74 is described below

commit ff6f80af74faee8f8ea6cf5958dd722a9eebdb02
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Jul 28 01:40:24 2022 +0200

    * tp/Texinfo/Convert/LaTeX.pm (_latex_header, _convert): protect
    only the most problematic characters in image file name.  Use
    \detokenize in argument of \fbox to be sure that the non escaped
    characters in image file name have no special meaning, when TEST
    is set.
---
 ChangeLog                                          |   8 +++++
 tp/Texinfo/Convert/LaTeX.pm                        |   8 +++--
 tp/t/converters_tests.t                            |  17 ++++++++++-
 .../converters_tests/empty/res_latex/empty.tex     |   2 +-
 tp/t/results/converters_tests/image_extension.pl   |   4 +++
 tp/t/results/converters_tests/image_formatting.pl  |  33 +++++++++++++++++++++
 tp/t/results/converters_tests/image_with_spaces.pl | Bin 7948 -> 8060 bytes
 tp/t/results/converters_tests/inline_expand_tex.pl |  18 +++++++++++
 tp/t/results/converters_tests/inlinefmtifelse.pl   |  20 +++++++++++++
 .../results/converters_tests/inlineifsetifclear.pl |  11 +++++++
 .../res_latex/minimal_empty_empty.tex              |   2 +-
 .../res_latex/minimal_empty_with_bye.tex           |   2 +-
 .../res_latex/minimal_empty_with_input.tex         |   2 +-
 .../results/converters_tests/raw_block_commands.pl |  20 ++++++++-----
 .../raw_block_commands_expand_tex.pl               |  26 +++++++++-------
 .../res_latex/simplest_no_node_section.tex         |   2 +-
 .../res_latex/char_latin1_latin1_in_refs.tex       |   2 +-
 .../mathjax_with_texinfo_enable_encoding.tex       |   2 +-
 .../def_syn_indices/res_latex/def_syn_indices.tex  |   2 +-
 .../res_latex/double_seeentry_seealso.tex          |   2 +-
 .../indices/seeentry/res_latex/seeentry.tex        |   2 +-
 .../indices/subentries/res_latex/subentries.tex    |   2 +-
 .../res_latex/subentry_and_sortas.tex              |   2 +-
 .../res_latex/syncode_index_print_both.tex         |   2 +-
 .../res_latex/inter_item_commands_in_enumerate.tex |   2 +-
 .../res_latex/inter_item_commands_in_itemize.tex   |   2 +-
 .../res_latex/multiple_lang_chapters.tex           |   2 +-
 ...anchor_links_xref_xrefautomaticsectiontitle.tex |   2 +-
 .../combined_fonts/res_latex/combined_fonts.tex    |   2 +-
 .../custom_headings/res_latex/custom_headings.tex  |   2 +-
 .../res_latex/definition_commands.tex              |   2 +-
 .../res_latex/enumerate_arguments.tex              |   2 +-
 .../res_latex/error_in_sectioning_command.tex      |   2 +-
 .../res_latex/example_in_cartouche.tex             |   2 +-
 .../float_and_refs/res_latex/float_and_refs.tex    |   2 +-
 .../fonttextsize/res_latex/fonttextsize.tex        |   2 +-
 .../latex_tests/indices/res_latex/indices.tex      |   2 +-
 .../res_latex/informative_commands_in_top_node.tex |   2 +-
 .../res_latex/nested_enumerate.tex                 |   2 +-
 .../nested_itemize/res_latex/nested_itemize.tex    |   2 +-
 .../no_titlepage_and_setchapternewpage_odd.tex     |   2 +-
 .../no_titlepage_and_setchapternewpage_on.tex      |   2 +-
 .../latex_tests/pagesizes/res_latex/pagesizes.tex  |   2 +-
 .../latex_tests/pagetype/res_latex/pagetype.tex    |   2 +-
 .../setchapternewpage_on_odd_titlepage.tex         |   2 +-
 .../res_latex/settitle_and_headings.tex            |   2 +-
 .../shorttitlepage/res_latex/shorttitlepage.tex    |   2 +-
 .../three_setchapternewpage_on_odd_off.tex         |   2 +-
 .../res_latex/titlepage_and_headings.tex           |   2 +-
 .../titlepage_and_setchapternewpage_odd.tex        |   2 +-
 .../titlepage_and_setchapternewpage_on.tex         |   2 +-
 .../res_latex/titlepage_classical.tex              |   2 +-
 .../res_latex/titlepage_in_top_node.tex            |   2 +-
 .../res_latex/titlepage_long_title.tex             |   2 +-
 .../res_latex/titlepage_no_author.tex              |   2 +-
 .../res_latex/titlepage_no_title.tex               |   2 +-
 .../titlepage_with_commands_classical.tex          |   2 +-
 .../res_latex/two_setchapternewpage_odd_on.tex     |   2 +-
 .../res_latex/two_setchapternewpage_on_odd.tex     |   2 +-
 .../res_latex/verbatim_in_smallformat.tex          |   2 +-
 .../empty_quotation/res_latex/empty_quotation.tex  |   2 +-
 .../res_latex/quotation_and_author.tex             |   2 +-
 .../res_latex/quotation_author_in_example.tex      |   2 +-
 .../space_at_commands_end_quotation_line.tex       |   2 +-
 .../res_latex/chapter_between_nodes.tex            |   2 +-
 .../lone_Top_node/res_latex/lone_Top_node.tex      |   2 +-
 .../sectioning/loop_nodes/res_latex/loop_nodes.tex |   2 +-
 .../node_sectop_before_chapter_no_node.tex         |   2 +-
 .../res_latex/node_sectop_before_lone_node_Top.tex |   2 +-
 .../res_latex/nodes_before_after_top.tex           |   2 +-
 .../res_latex/nodes_before_after_top_xref.tex      |   2 +-
 .../res_latex/nodes_before_top.tex                 |   2 +-
 .../res_latex/section_before_after_top_node.tex    |   2 +-
 .../section_before_after_top_node_last_node.tex    |   2 +-
 .../res_latex/section_chapter_before_top_nodes.tex |   2 +-
 tp/t/results/sectioning/top_node_part_top.pl       |   2 +-
 .../res_latex/inter_item_commands_in_table.tex     |   2 +-
 .../inter_item_commands_in_table_in_example.tex    |   2 +-
 .../indices_in_begin_tables_lists.tex              |   2 +-
 .../indices_in_begin_tables_lists.tex              |   2 +-
 .../res_parser/formatting_latex/formatting.tex     |  28 ++++++++---------
 81 files changed, 225 insertions(+), 106 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 62dc1cfc8a..b635ac61cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-07-27  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/LaTeX.pm (_latex_header, _convert): protect
+       only the most problematic characters in image file name.  Use
+       \detokenize in argument of \fbox to be sure that the non escaped
+       characters in image file name have no special meaning, when TEST
+       is set.
+
 2022-07-27  Gavin Smith  <gavinsmith0123@gmail.com>
 
        @set txidefnamenospace in LaTeX
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index 7faee7969c..f6d902cee0 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -1356,7 +1356,7 @@ roundcorner=10pt}
   # processed by LaTeX
   if ($self->get_conf('TEST')) {
     $header_code .=
-'\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+'\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 ';
   }
@@ -2448,7 +2448,9 @@ sub _convert($$)
          {'code' => 1, %{$self->{'convert_text_options'}}});
         # FIXME not clear at all what can be in filenames here,
         # what should be escaped and how
-        my $converted_basefile = _protect_text($self, $basefile);
+        my $converted_basefile = $basefile;
+        # for now minimal protection.  Not sure that % is active
+        $converted_basefile =~ s/([%{}\\])/\\$1/g;
 
         # FIXME why do that if $converted_basefile is used even if no file is 
found?
         my $image_file;
@@ -2871,7 +2873,7 @@ sub _convert($$)
       }
       if (scalar(@{$element->{'args'}}) > $arg_index
          and defined($element->{'args'}->[$arg_index])
-         and @{$element->{'args'}->[$arg_index]->{'contents'}}) {
+         and scalar(@{$element->{'args'}->[$arg_index]->{'contents'}})) {
         if ($cmdname eq 'inlineraw') {
           push @{$self->{'formatting_context'}->[-1]->{'text_context'}}, 'raw';
         }
diff --git a/tp/t/converters_tests.t b/tp/t/converters_tests.t
index 17d59cd5cb..58d09bd085 100644
--- a/tp/t/converters_tests.t
+++ b/tp/t/converters_tests.t
@@ -36,7 +36,7 @@ my $raw_commands_text = '
 @end docbook
 
 @tex
-$\underline{a < b @code{tex \hbox{ code }}}$ ``}
+$\underline{a < b @code{tex \hbox{ code }}}$ ``
 @end tex
 
 @latex
@@ -433,6 +433,13 @@ $inline_text,
 $inline_text, {'EXPANDED_FORMATS' => ['tex']},
 {'EXPANDED_FORMATS' => ['tex']},
 ],
+# beware that with EXPANDED_FORMATS set to an empty array no
+# format is considered to be expanded in the parser.  Therefore the second
+# argument of @inlinefmtifelse{} contents array is empty (type is 'elided').
+# In the converters, the converter format would be expanded.
+# However, since the second argument of @inlinefmtifelse{} contents array is 
empty,
+# there is no expansion of the second argument of @inlinefmtifelse string
+# in the end (or expansion as an empty string which gives the same result).
 ['inlinefmtifelse',
 '@inlinefmtifelse{html,,else html no if}.
 @inlinefmtifelse{html,if html,else html}.
@@ -850,7 +857,15 @@ my %latex_tests = (
   'unknown_value' => 1,
   'line_breaks' => 1,
   'test_deftypefnnewline' => 1,
+  'raw_block_commands' => 1,
+  'raw_block_commands_expand_tex' => 1,
   'inline' => 1,
+  'inline_expand_tex' => 1,
+  'inlinefmtifelse' => 1,
+  'inlineifsetifclear' => 1,
+  'image_with_spaces' => 1,
+  'image_extension' => 1,
+  'image_formatting' => 1,
   'test_sp' => 1,
   'non_empty_part' => 1,
 );
diff --git a/tp/t/results/converters_tests/empty/res_latex/empty.tex 
b/tp/t/results/converters_tests/empty/res_latex/empty.tex
index 926436a174..fa6cc0a6c7 100644
--- a/tp/t/results/converters_tests/empty/res_latex/empty.tex
+++ b/tp/t/results/converters_tests/empty/res_latex/empty.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/converters_tests/image_extension.pl 
b/tp/t/results/converters_tests/image_extension.pl
index 32a92e2d70..7694c2b70a 100644
--- a/tp/t/results/converters_tests/image_extension.pl
+++ b/tp/t/results/converters_tests/image_extension.pl
@@ -151,6 +151,10 @@ $result_converted_errors{'docbook'}->{'image_extension'} = 
[
 
 
 
+$result_converted{'latex'}->{'image_extension'} = '\\includegraphics{f---ile}
+';
+
+
 $result_converted{'info'}->{'image_extension'} = 'This is , produced from .
 
 [f---ile]
diff --git a/tp/t/results/converters_tests/image_formatting.pl 
b/tp/t/results/converters_tests/image_formatting.pl
index 22dd0dfc5c..98dd77ab10 100644
--- a/tp/t/results/converters_tests/image_formatting.pl
+++ b/tp/t/results/converters_tests/image_formatting.pl
@@ -3021,6 +3021,39 @@ 
$result_converted_errors{'docbook'}->{'image_formatting'} = [
 
 
 
+$result_converted{'latex'}->{'image_formatting'} = '\\label{anchor:Top}%
+\\chapter{Chapter}
+\\label{anchor:chap}%
+
+\\texttt{@image\\{f{-}{-}ile\\}} \\includegraphics{f--ile}
+\\texttt{@image\\{f{-}{-}ile,l{-}{-}i\\}} \\includegraphics[width=l--i]{f--ile}
+\\texttt{@image\\{f{-}{-}ile,,l{-}{-}e\\}} 
\\includegraphics[height=l--e]{f--ile}
+\\texttt{@image\\{f{-}{-}ile,,,alt\\}} \\includegraphics{f--ile}
+\\texttt{@image\\{f{-}{-}ile,,,,e-d-xt\\}} \\includegraphics{f--ile}
+\\texttt{@image\\{f{-}{-}ile,aze,az,alt,e{-}{-}xt\\}} 
\\includegraphics[width=aze,height=az]{f--ile}
+\\texttt{@image\\{f-ile,aze,,a{-}{-}lt\\}} \\includegraphics[width=aze]{f-ile}
+\\texttt{@image\\{@file\\{f{-}{-}ile\\}@@@.,aze,az,alt,@file\\{file ext\\} 
e{-}{-}xt@\\}} \\includegraphics[width=aze,height=az]{f--ile@.}
+\\includegraphics{image} \\includegraphics{image}
+
+\\par\\begingroup\\obeylines\\obeyspaces\\frenchspacing\\leftskip=2em\\relax\\parskip=0pt\\relax\\ttfamily{}%
+\\texttt{@image\\{f{-}{-}ile\\}} \\includegraphics{f--ile}
+\\texttt{@image\\{f{-}{-}ile,l{-}{-}i\\}} \\includegraphics[width=l--i]{f--ile}
+\\texttt{@image\\{f{-}{-}ile,,l{-}{-}e\\}} 
\\includegraphics[height=l--e]{f--ile}
+\\texttt{@image\\{f{-}{-}ile,,,alt\\}} \\includegraphics{f--ile}
+\\texttt{@image\\{f{-}{-}ile,,,,e-d-xt\\}} \\includegraphics{f--ile}
+\\texttt{@image\\{f{-}{-}ile,aze,az,alt,e{-}{-}xt\\}} 
\\includegraphics[width=aze,height=az]{f--ile}
+\\texttt{@image\\{f-ile,aze,,a{-}{-}lt\\}} \\includegraphics[width=aze]{f-ile}
+\\texttt{@image\\{@file\\{f{-}{-}ile\\}@@@.,aze,az,alt,@file\\{file ext\\} 
e{-}{-}xt@\\}} \\includegraphics[width=aze,height=az]{f--ile@.}
+\\includegraphics{image} \\includegraphics{image}
+\\endgroup{}%
+
+\\includegraphics{f--ile}
+
+in para
+\\includegraphics{f--ile}.
+';
+
+
 $result_converted{'info'}->{'image_formatting'} = 'This is , produced from .
 
 
diff --git a/tp/t/results/converters_tests/image_with_spaces.pl 
b/tp/t/results/converters_tests/image_with_spaces.pl
index 9355815d30..a15cbf0c79 100644
Binary files a/tp/t/results/converters_tests/image_with_spaces.pl and 
b/tp/t/results/converters_tests/image_with_spaces.pl differ
diff --git a/tp/t/results/converters_tests/inline_expand_tex.pl 
b/tp/t/results/converters_tests/inline_expand_tex.pl
index 9b78417c24..8ed70dfa77 100644
--- a/tp/t/results/converters_tests/inline_expand_tex.pl
+++ b/tp/t/results/converters_tests/inline_expand_tex.pl
@@ -780,4 +780,22 @@ raw $\\underline{a < b <literal>tex \\hbox{ code 
}</literal>}$ ``
 
 </para>';
 
+
+$result_converted{'latex'}->{'inline_expand_tex'} = '
+, 
+, 
+,
+, 
+\\$\\textbackslash{}underlinea < b \\texttt{tex \\textbackslash{}hbox code 
}\\$ ``
+
+
+
+, 
+, 
+,
+, 
+raw $\\underline{a < b \\texttt{tex \\hbox{ code }}}$ ``
+
+';
+
 1;
diff --git a/tp/t/results/converters_tests/inlinefmtifelse.pl 
b/tp/t/results/converters_tests/inlinefmtifelse.pl
index 6bf69cdb38..324ffc930b 100644
--- a/tp/t/results/converters_tests/inlinefmtifelse.pl
+++ b/tp/t/results/converters_tests/inlinefmtifelse.pl
@@ -778,4 +778,24 @@ else plaintext.
 <para>else latex.
 </para>';
 
+
+$result_converted{'latex'}->{'inlinefmtifelse'} = 'else html no if.
+else html.
+
+.
+else plaintext.
+
+.
+
+else docbook spaces .
+
+else tex spaces .
+
+else docbook.
+
+else tex.
+
+.
+';
+
 1;
diff --git a/tp/t/results/converters_tests/inlineifsetifclear.pl 
b/tp/t/results/converters_tests/inlineifsetifclear.pl
index fd0155c82e..f7858fc78e 100644
--- a/tp/t/results/converters_tests/inlineifsetifclear.pl
+++ b/tp/t/results/converters_tests/inlineifsetifclear.pl
@@ -353,4 +353,15 @@ $result_converted{'docbook'}->{'inlineifsetifclear'} = 
'<para>iclear first .
 <para>ifset second .
 </para>';
 
+
+$result_converted{'latex'}->{'inlineifsetifclear'} = 'iclear first .
+
+.
+
+
+.
+
+ifset second .
+';
+
 1;
diff --git 
a/tp/t/results/converters_tests/minimal_empty_empty/res_latex/minimal_empty_empty.tex
 
b/tp/t/results/converters_tests/minimal_empty_empty/res_latex/minimal_empty_empty.tex
index 926436a174..fa6cc0a6c7 100644
--- 
a/tp/t/results/converters_tests/minimal_empty_empty/res_latex/minimal_empty_empty.tex
+++ 
b/tp/t/results/converters_tests/minimal_empty_empty/res_latex/minimal_empty_empty.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/converters_tests/minimal_empty_with_bye/res_latex/minimal_empty_with_bye.tex
 
b/tp/t/results/converters_tests/minimal_empty_with_bye/res_latex/minimal_empty_with_bye.tex
index 926436a174..fa6cc0a6c7 100644
--- 
a/tp/t/results/converters_tests/minimal_empty_with_bye/res_latex/minimal_empty_with_bye.tex
+++ 
b/tp/t/results/converters_tests/minimal_empty_with_bye/res_latex/minimal_empty_with_bye.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/converters_tests/minimal_empty_with_input/res_latex/minimal_empty_with_input.tex
 
b/tp/t/results/converters_tests/minimal_empty_with_input/res_latex/minimal_empty_with_input.tex
index 926436a174..fa6cc0a6c7 100644
--- 
a/tp/t/results/converters_tests/minimal_empty_with_input/res_latex/minimal_empty_with_input.tex
+++ 
b/tp/t/results/converters_tests/minimal_empty_with_input/res_latex/minimal_empty_with_input.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/converters_tests/raw_block_commands.pl 
b/tp/t/results/converters_tests/raw_block_commands.pl
index 81cfdf486d..9177d0a606 100644
--- a/tp/t/results/converters_tests/raw_block_commands.pl
+++ b/tp/t/results/converters_tests/raw_block_commands.pl
@@ -298,11 +298,7 @@ $result_trees{'raw_block_commands'} = {
                 },
                 {
                   'parent' => {},
-                  'text' => '}$ ``'
-                },
-                {
-                  'parent' => {},
-                  'text' => '}
+                  'text' => '}$ ``
 '
                 }
               ],
@@ -524,7 +520,6 @@ 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[1]
 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'contents'}[2]{'args'}[0]{'parent'}
 = 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'contents'}[2];
 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'contents'}[2]{'parent'}
 = 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[1];
 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'contents'}[3]{'parent'}
 = 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[1];
-$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'contents'}[4]{'parent'}
 = 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[1];
 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'parent'}
 = $result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7];
 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[2]{'args'}[0];
 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[2]{'args'}[0]{'parent'}
 = 
$result_trees{'raw_block_commands'}{'contents'}[0]{'contents'}[7]{'contents'}[2];
@@ -566,7 +561,7 @@ $result_texis{'raw_block_commands'} = '
 @end docbook
 
 @tex
-$\\underline{a < b @code{tex \\hbox{ code }}}$ ``}
+$\\underline{a < b @code{tex \\hbox{ code }}}$ ``
 @end tex
 
 @latex
@@ -613,7 +608,7 @@ $result_converted{'xml'}->{'raw_block_commands'} = '
 </docbook>
 
 <tex endspaces=" ">
-$\\underline{a &lt; b <code>tex \\hbox{ code }</code>}$ &textldquo;}
+$\\underline{a &lt; b <code>tex \\hbox{ code }</code>}$ &textldquo;
 </tex>
 
 <latex endspaces=" ">
@@ -630,4 +625,13 @@ $result_converted{'docbook'}->{'raw_block_commands'} = '
 
 ';
 
+
+$result_converted{'latex'}->{'raw_block_commands'} = '
+
+
+
+
+$\\frac{a < b \\texttt{tex \\hbox{ code }}}{b}$ ``
+';
+
 1;
diff --git a/tp/t/results/converters_tests/raw_block_commands_expand_tex.pl 
b/tp/t/results/converters_tests/raw_block_commands_expand_tex.pl
index b2006ebf5a..c1ba927382 100644
--- a/tp/t/results/converters_tests/raw_block_commands_expand_tex.pl
+++ b/tp/t/results/converters_tests/raw_block_commands_expand_tex.pl
@@ -298,11 +298,7 @@ $result_trees{'raw_block_commands_expand_tex'} = {
                 },
                 {
                   'parent' => {},
-                  'text' => '}$ ``'
-                },
-                {
-                  'parent' => {},
-                  'text' => '}
+                  'text' => '}$ ``
 '
                 }
               ],
@@ -524,7 +520,6 @@ 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'co
 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'contents'}[2]{'args'}[0]{'parent'}
 = 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'contents'}[2];
 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'contents'}[2]{'parent'}
 = 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[1];
 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'contents'}[3]{'parent'}
 = 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[1];
-$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'contents'}[4]{'parent'}
 = 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[1];
 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[1]{'parent'}
 = $result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7];
 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[2]{'args'}[0];
 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[2]{'args'}[0]{'parent'}
 = 
$result_trees{'raw_block_commands_expand_tex'}{'contents'}[0]{'contents'}[7]{'contents'}[2];
@@ -566,7 +561,7 @@ $result_texis{'raw_block_commands_expand_tex'} = '
 @end docbook
 
 @tex
-$\\underline{a < b @code{tex \\hbox{ code }}}$ ``}
+$\\underline{a < b @code{tex \\hbox{ code }}}$ ``
 @end tex
 
 @latex
@@ -589,7 +584,7 @@ $result_floats{'raw_block_commands_expand_tex'} = {};
 
 
 
-$result_converted{'plaintext'}->{'raw_block_commands_expand_tex'} = 
'$\\underline{a < b ‘tex \\hbox{ code }’}$ ``}
+$result_converted{'plaintext'}->{'raw_block_commands_expand_tex'} = 
'$\\underline{a < b ‘tex \\hbox{ code }’}$ ``
 
 ';
 
@@ -598,7 +593,7 @@ 
$result_converted{'html_text'}->{'raw_block_commands_expand_tex'} = '
 
 
 
-$\\underline{a &lt; b &lt;code class=&quot;code&quot;&gt;tex \\hbox{ code 
}&lt;/code&gt;}$ ``}
+$\\underline{a &lt; b &lt;code class=&quot;code&quot;&gt;tex \\hbox{ code 
}&lt;/code&gt;}$ ``
 
 ';
 
@@ -629,7 +624,7 @@ $result_converted{'xml'}->{'raw_block_commands_expand_tex'} 
= '
 &lt;emphasis&gt;docbook&lt;/emphasis&gt; &textldquo;}
 </docbook>
 
-$\\underline{a < b <code>tex \\hbox{ code }</code>}$ ``}
+$\\underline{a < b <code>tex \\hbox{ code }</code>}$ ``
 
 <latex endspaces=" ">
 $\\frac{a &lt; b <code>tex \\hbox{ code }</code>}{b}$ &textldquo;
@@ -641,7 +636,16 @@ 
$result_converted{'docbook'}->{'raw_block_commands_expand_tex'} = '
 
 
 
-$\\underline{a < b <literal>tex \\hbox{ code }</literal>}$ ``}
+$\\underline{a < b <literal>tex \\hbox{ code }</literal>}$ ``
+
+';
+
+
+$result_converted{'latex'}->{'raw_block_commands_expand_tex'} = '
+
+
+
+$\\underline{a < b \\texttt{tex \\hbox{ code }}}$ ``
 
 ';
 
diff --git 
a/tp/t/results/converters_tests/simplest_no_node_section/res_latex/simplest_no_node_section.tex
 
b/tp/t/results/converters_tests/simplest_no_node_section/res_latex/simplest_no_node_section.tex
index ca582efb2e..1a1e97abfd 100644
--- 
a/tp/t/results/converters_tests/simplest_no_node_section/res_latex/simplest_no_node_section.tex
+++ 
b/tp/t/results/converters_tests/simplest_no_node_section/res_latex/simplest_no_node_section.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/formats_encodings/char_latin1_latin1_in_refs/res_latex/char_latin1_latin1_in_refs.tex
 
b/tp/t/results/formats_encodings/char_latin1_latin1_in_refs/res_latex/char_latin1_latin1_in_refs.tex
index f2d1a0e7e2..e22d7f2bae 100644
--- 
a/tp/t/results/formats_encodings/char_latin1_latin1_in_refs/res_latex/char_latin1_latin1_in_refs.tex
+++ 
b/tp/t/results/formats_encodings/char_latin1_latin1_in_refs/res_latex/char_latin1_latin1_in_refs.tex
@@ -50,7 +50,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/html_tests/mathjax_with_texinfo_enable_encoding/res_latex/mathjax_with_texinfo_enable_encoding.tex
 
b/tp/t/results/html_tests/mathjax_with_texinfo_enable_encoding/res_latex/mathjax_with_texinfo_enable_encoding.tex
index 256d9428ce..8c51d25c56 100644
--- 
a/tp/t/results/html_tests/mathjax_with_texinfo_enable_encoding/res_latex/mathjax_with_texinfo_enable_encoding.tex
+++ 
b/tp/t/results/html_tests/mathjax_with_texinfo_enable_encoding/res_latex/mathjax_with_texinfo_enable_encoding.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/indices/def_syn_indices/res_latex/def_syn_indices.tex 
b/tp/t/results/indices/def_syn_indices/res_latex/def_syn_indices.tex
index 3557b6e2b4..f0dd66041b 100644
--- a/tp/t/results/indices/def_syn_indices/res_latex/def_syn_indices.tex
+++ b/tp/t/results/indices/def_syn_indices/res_latex/def_syn_indices.tex
@@ -52,7 +52,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/indices/double_seeentry_seealso/res_latex/double_seeentry_seealso.tex
 
b/tp/t/results/indices/double_seeentry_seealso/res_latex/double_seeentry_seealso.tex
index b69dcba3f4..d6656c27e5 100644
--- 
a/tp/t/results/indices/double_seeentry_seealso/res_latex/double_seeentry_seealso.tex
+++ 
b/tp/t/results/indices/double_seeentry_seealso/res_latex/double_seeentry_seealso.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/indices/seeentry/res_latex/seeentry.tex 
b/tp/t/results/indices/seeentry/res_latex/seeentry.tex
index f37be78f34..4d651930e1 100644
--- a/tp/t/results/indices/seeentry/res_latex/seeentry.tex
+++ b/tp/t/results/indices/seeentry/res_latex/seeentry.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/indices/subentries/res_latex/subentries.tex 
b/tp/t/results/indices/subentries/res_latex/subentries.tex
index 3858a17d41..565dbf1520 100644
--- a/tp/t/results/indices/subentries/res_latex/subentries.tex
+++ b/tp/t/results/indices/subentries/res_latex/subentries.tex
@@ -51,7 +51,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/indices/subentry_and_sortas/res_latex/subentry_and_sortas.tex 
b/tp/t/results/indices/subentry_and_sortas/res_latex/subentry_and_sortas.tex
index ea2d3551f8..d0db68c2df 100644
--- a/tp/t/results/indices/subentry_and_sortas/res_latex/subentry_and_sortas.tex
+++ b/tp/t/results/indices/subentry_and_sortas/res_latex/subentry_and_sortas.tex
@@ -51,7 +51,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/indices/syncode_index_print_both/res_latex/syncode_index_print_both.tex
 
b/tp/t/results/indices/syncode_index_print_both/res_latex/syncode_index_print_both.tex
index dfb72b3842..9937cf32d3 100644
--- 
a/tp/t/results/indices/syncode_index_print_both/res_latex/syncode_index_print_both.tex
+++ 
b/tp/t/results/indices/syncode_index_print_both/res_latex/syncode_index_print_both.tex
@@ -50,7 +50,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/itemize/inter_item_commands_in_enumerate/res_latex/inter_item_commands_in_enumerate.tex
 
b/tp/t/results/itemize/inter_item_commands_in_enumerate/res_latex/inter_item_commands_in_enumerate.tex
index a2025d59ca..75a8804edc 100644
--- 
a/tp/t/results/itemize/inter_item_commands_in_enumerate/res_latex/inter_item_commands_in_enumerate.tex
+++ 
b/tp/t/results/itemize/inter_item_commands_in_enumerate/res_latex/inter_item_commands_in_enumerate.tex
@@ -54,7 +54,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/itemize/inter_item_commands_in_itemize/res_latex/inter_item_commands_in_itemize.tex
 
b/tp/t/results/itemize/inter_item_commands_in_itemize/res_latex/inter_item_commands_in_itemize.tex
index 631b62f286..d16f97ed04 100644
--- 
a/tp/t/results/itemize/inter_item_commands_in_itemize/res_latex/inter_item_commands_in_itemize.tex
+++ 
b/tp/t/results/itemize/inter_item_commands_in_itemize/res_latex/inter_item_commands_in_itemize.tex
@@ -54,7 +54,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/languages/multiple_lang_chapters_latex/res_latex/multiple_lang_chapters.tex
 
b/tp/t/results/languages/multiple_lang_chapters_latex/res_latex/multiple_lang_chapters.tex
index 817abee713..cde760af52 100644
--- 
a/tp/t/results/languages/multiple_lang_chapters_latex/res_latex/multiple_lang_chapters.tex
+++ 
b/tp/t/results/languages/multiple_lang_chapters_latex/res_latex/multiple_lang_chapters.tex
@@ -58,7 +58,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/anchor_links_xref_xrefautomaticsectiontitle/res_latex/anchor_links_xref_xrefautomaticsectiontitle.tex
 
b/tp/t/results/latex_tests/anchor_links_xref_xrefautomaticsectiontitle/res_latex/anchor_links_xref_xrefautomaticsectiontitle.tex
index b607e34c2f..24dfcb4503 100644
--- 
a/tp/t/results/latex_tests/anchor_links_xref_xrefautomaticsectiontitle/res_latex/anchor_links_xref_xrefautomaticsectiontitle.tex
+++ 
b/tp/t/results/latex_tests/anchor_links_xref_xrefautomaticsectiontitle/res_latex/anchor_links_xref_xrefautomaticsectiontitle.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/combined_fonts/res_latex/combined_fonts.tex 
b/tp/t/results/latex_tests/combined_fonts/res_latex/combined_fonts.tex
index cee94ef978..88190fd46c 100644
--- a/tp/t/results/latex_tests/combined_fonts/res_latex/combined_fonts.tex
+++ b/tp/t/results/latex_tests/combined_fonts/res_latex/combined_fonts.tex
@@ -50,7 +50,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/custom_headings/res_latex/custom_headings.tex 
b/tp/t/results/latex_tests/custom_headings/res_latex/custom_headings.tex
index bf16db20b1..8f8a22471f 100644
--- a/tp/t/results/latex_tests/custom_headings/res_latex/custom_headings.tex
+++ b/tp/t/results/latex_tests/custom_headings/res_latex/custom_headings.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/definition_commands/res_latex/definition_commands.tex
 
b/tp/t/results/latex_tests/definition_commands/res_latex/definition_commands.tex
index 7a4b55a2b8..4045bd6933 100644
--- 
a/tp/t/results/latex_tests/definition_commands/res_latex/definition_commands.tex
+++ 
b/tp/t/results/latex_tests/definition_commands/res_latex/definition_commands.tex
@@ -51,7 +51,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/enumerate_arguments/res_latex/enumerate_arguments.tex
 
b/tp/t/results/latex_tests/enumerate_arguments/res_latex/enumerate_arguments.tex
index 7b83426964..d3e991bc7e 100644
--- 
a/tp/t/results/latex_tests/enumerate_arguments/res_latex/enumerate_arguments.tex
+++ 
b/tp/t/results/latex_tests/enumerate_arguments/res_latex/enumerate_arguments.tex
@@ -51,7 +51,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/error_in_sectioning_command/res_latex/error_in_sectioning_command.tex
 
b/tp/t/results/latex_tests/error_in_sectioning_command/res_latex/error_in_sectioning_command.tex
index 9bfe4a724c..1d56110009 100644
--- 
a/tp/t/results/latex_tests/error_in_sectioning_command/res_latex/error_in_sectioning_command.tex
+++ 
b/tp/t/results/latex_tests/error_in_sectioning_command/res_latex/error_in_sectioning_command.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/example_in_cartouche/res_latex/example_in_cartouche.tex
 
b/tp/t/results/latex_tests/example_in_cartouche/res_latex/example_in_cartouche.tex
index 34e19f4b5b..9c164fde80 100644
--- 
a/tp/t/results/latex_tests/example_in_cartouche/res_latex/example_in_cartouche.tex
+++ 
b/tp/t/results/latex_tests/example_in_cartouche/res_latex/example_in_cartouche.tex
@@ -53,7 +53,7 @@
 innertopmargin=10pt, innerbottommargin=10pt,%
 roundcorner=10pt}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/float_and_refs/res_latex/float_and_refs.tex 
b/tp/t/results/latex_tests/float_and_refs/res_latex/float_and_refs.tex
index 890db0d101..8ea965c402 100644
--- a/tp/t/results/latex_tests/float_and_refs/res_latex/float_and_refs.tex
+++ b/tp/t/results/latex_tests/float_and_refs/res_latex/float_and_refs.tex
@@ -53,7 +53,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/latex_tests/fonttextsize/res_latex/fonttextsize.tex 
b/tp/t/results/latex_tests/fonttextsize/res_latex/fonttextsize.tex
index d17f8fea8e..551e4588a3 100644
--- a/tp/t/results/latex_tests/fonttextsize/res_latex/fonttextsize.tex
+++ b/tp/t/results/latex_tests/fonttextsize/res_latex/fonttextsize.tex
@@ -48,7 +48,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/latex_tests/indices/res_latex/indices.tex 
b/tp/t/results/latex_tests/indices/res_latex/indices.tex
index fc3c330243..1d8c75c086 100644
--- a/tp/t/results/latex_tests/indices/res_latex/indices.tex
+++ b/tp/t/results/latex_tests/indices/res_latex/indices.tex
@@ -51,7 +51,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/informative_commands_in_top_node/res_latex/informative_commands_in_top_node.tex
 
b/tp/t/results/latex_tests/informative_commands_in_top_node/res_latex/informative_commands_in_top_node.tex
index 9e2532f3bc..dd5d4fc390 100644
--- 
a/tp/t/results/latex_tests/informative_commands_in_top_node/res_latex/informative_commands_in_top_node.tex
+++ 
b/tp/t/results/latex_tests/informative_commands_in_top_node/res_latex/informative_commands_in_top_node.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/nested_enumerate/res_latex/nested_enumerate.tex 
b/tp/t/results/latex_tests/nested_enumerate/res_latex/nested_enumerate.tex
index 8664cf4a7a..f43dc37fbe 100644
--- a/tp/t/results/latex_tests/nested_enumerate/res_latex/nested_enumerate.tex
+++ b/tp/t/results/latex_tests/nested_enumerate/res_latex/nested_enumerate.tex
@@ -51,7 +51,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/nested_itemize/res_latex/nested_itemize.tex 
b/tp/t/results/latex_tests/nested_itemize/res_latex/nested_itemize.tex
index 9789796f0b..6bd92f0a58 100644
--- a/tp/t/results/latex_tests/nested_itemize/res_latex/nested_itemize.tex
+++ b/tp/t/results/latex_tests/nested_itemize/res_latex/nested_itemize.tex
@@ -51,7 +51,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/no_titlepage_and_setchapternewpage_odd/res_latex/no_titlepage_and_setchapternewpage_odd.tex
 
b/tp/t/results/latex_tests/no_titlepage_and_setchapternewpage_odd/res_latex/no_titlepage_and_setchapternewpage_odd.tex
index 9ca28e17ca..682c711389 100644
--- 
a/tp/t/results/latex_tests/no_titlepage_and_setchapternewpage_odd/res_latex/no_titlepage_and_setchapternewpage_odd.tex
+++ 
b/tp/t/results/latex_tests/no_titlepage_and_setchapternewpage_odd/res_latex/no_titlepage_and_setchapternewpage_odd.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/no_titlepage_and_setchapternewpage_on/res_latex/no_titlepage_and_setchapternewpage_on.tex
 
b/tp/t/results/latex_tests/no_titlepage_and_setchapternewpage_on/res_latex/no_titlepage_and_setchapternewpage_on.tex
index 1998ab44e6..076283ce62 100644
--- 
a/tp/t/results/latex_tests/no_titlepage_and_setchapternewpage_on/res_latex/no_titlepage_and_setchapternewpage_on.tex
+++ 
b/tp/t/results/latex_tests/no_titlepage_and_setchapternewpage_on/res_latex/no_titlepage_and_setchapternewpage_on.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/latex_tests/pagesizes/res_latex/pagesizes.tex 
b/tp/t/results/latex_tests/pagesizes/res_latex/pagesizes.tex
index cae29039d2..e6ef743b0f 100644
--- a/tp/t/results/latex_tests/pagesizes/res_latex/pagesizes.tex
+++ b/tp/t/results/latex_tests/pagesizes/res_latex/pagesizes.tex
@@ -48,7 +48,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/latex_tests/pagetype/res_latex/pagetype.tex 
b/tp/t/results/latex_tests/pagetype/res_latex/pagetype.tex
index 2edaa470f2..481d37ad44 100644
--- a/tp/t/results/latex_tests/pagetype/res_latex/pagetype.tex
+++ b/tp/t/results/latex_tests/pagetype/res_latex/pagetype.tex
@@ -48,7 +48,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/setchapternewpage_on_odd_titlepage/res_latex/setchapternewpage_on_odd_titlepage.tex
 
b/tp/t/results/latex_tests/setchapternewpage_on_odd_titlepage/res_latex/setchapternewpage_on_odd_titlepage.tex
index 265563b1d1..c1f2fb6138 100644
--- 
a/tp/t/results/latex_tests/setchapternewpage_on_odd_titlepage/res_latex/setchapternewpage_on_odd_titlepage.tex
+++ 
b/tp/t/results/latex_tests/setchapternewpage_on_odd_titlepage/res_latex/setchapternewpage_on_odd_titlepage.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/settitle_and_headings/res_latex/settitle_and_headings.tex
 
b/tp/t/results/latex_tests/settitle_and_headings/res_latex/settitle_and_headings.tex
index 41a65a07bd..0fa2e125e7 100644
--- 
a/tp/t/results/latex_tests/settitle_and_headings/res_latex/settitle_and_headings.tex
+++ 
b/tp/t/results/latex_tests/settitle_and_headings/res_latex/settitle_and_headings.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/shorttitlepage/res_latex/shorttitlepage.tex 
b/tp/t/results/latex_tests/shorttitlepage/res_latex/shorttitlepage.tex
index e8a55afb20..88724f1cc8 100644
--- a/tp/t/results/latex_tests/shorttitlepage/res_latex/shorttitlepage.tex
+++ b/tp/t/results/latex_tests/shorttitlepage/res_latex/shorttitlepage.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/three_setchapternewpage_on_odd_off/res_latex/three_setchapternewpage_on_odd_off.tex
 
b/tp/t/results/latex_tests/three_setchapternewpage_on_odd_off/res_latex/three_setchapternewpage_on_odd_off.tex
index 9633755def..c2ed54ccec 100644
--- 
a/tp/t/results/latex_tests/three_setchapternewpage_on_odd_off/res_latex/three_setchapternewpage_on_odd_off.tex
+++ 
b/tp/t/results/latex_tests/three_setchapternewpage_on_odd_off/res_latex/three_setchapternewpage_on_odd_off.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/titlepage_and_headings/res_latex/titlepage_and_headings.tex
 
b/tp/t/results/latex_tests/titlepage_and_headings/res_latex/titlepage_and_headings.tex
index 4aeae3d6d4..4b8b7e20ba 100644
--- 
a/tp/t/results/latex_tests/titlepage_and_headings/res_latex/titlepage_and_headings.tex
+++ 
b/tp/t/results/latex_tests/titlepage_and_headings/res_latex/titlepage_and_headings.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/titlepage_and_setchapternewpage_odd/res_latex/titlepage_and_setchapternewpage_odd.tex
 
b/tp/t/results/latex_tests/titlepage_and_setchapternewpage_odd/res_latex/titlepage_and_setchapternewpage_odd.tex
index da7ebb728f..f3440716f2 100644
--- 
a/tp/t/results/latex_tests/titlepage_and_setchapternewpage_odd/res_latex/titlepage_and_setchapternewpage_odd.tex
+++ 
b/tp/t/results/latex_tests/titlepage_and_setchapternewpage_odd/res_latex/titlepage_and_setchapternewpage_odd.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/titlepage_and_setchapternewpage_on/res_latex/titlepage_and_setchapternewpage_on.tex
 
b/tp/t/results/latex_tests/titlepage_and_setchapternewpage_on/res_latex/titlepage_and_setchapternewpage_on.tex
index 4aeae3d6d4..4b8b7e20ba 100644
--- 
a/tp/t/results/latex_tests/titlepage_and_setchapternewpage_on/res_latex/titlepage_and_setchapternewpage_on.tex
+++ 
b/tp/t/results/latex_tests/titlepage_and_setchapternewpage_on/res_latex/titlepage_and_setchapternewpage_on.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/titlepage_classical/res_latex/titlepage_classical.tex
 
b/tp/t/results/latex_tests/titlepage_classical/res_latex/titlepage_classical.tex
index 7fc6be9b17..2e46ba6135 100644
--- 
a/tp/t/results/latex_tests/titlepage_classical/res_latex/titlepage_classical.tex
+++ 
b/tp/t/results/latex_tests/titlepage_classical/res_latex/titlepage_classical.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/titlepage_in_top_node/res_latex/titlepage_in_top_node.tex
 
b/tp/t/results/latex_tests/titlepage_in_top_node/res_latex/titlepage_in_top_node.tex
index 8da2717902..8d2b26aa48 100644
--- 
a/tp/t/results/latex_tests/titlepage_in_top_node/res_latex/titlepage_in_top_node.tex
+++ 
b/tp/t/results/latex_tests/titlepage_in_top_node/res_latex/titlepage_in_top_node.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/titlepage_long_title/res_latex/titlepage_long_title.tex
 
b/tp/t/results/latex_tests/titlepage_long_title/res_latex/titlepage_long_title.tex
index 065d00200e..0a4096a77b 100644
--- 
a/tp/t/results/latex_tests/titlepage_long_title/res_latex/titlepage_long_title.tex
+++ 
b/tp/t/results/latex_tests/titlepage_long_title/res_latex/titlepage_long_title.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/titlepage_no_author/res_latex/titlepage_no_author.tex
 
b/tp/t/results/latex_tests/titlepage_no_author/res_latex/titlepage_no_author.tex
index 50a653fa32..2368c0f200 100644
--- 
a/tp/t/results/latex_tests/titlepage_no_author/res_latex/titlepage_no_author.tex
+++ 
b/tp/t/results/latex_tests/titlepage_no_author/res_latex/titlepage_no_author.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/titlepage_no_title/res_latex/titlepage_no_title.tex 
b/tp/t/results/latex_tests/titlepage_no_title/res_latex/titlepage_no_title.tex
index 550eaa7354..ee953b293d 100644
--- 
a/tp/t/results/latex_tests/titlepage_no_title/res_latex/titlepage_no_title.tex
+++ 
b/tp/t/results/latex_tests/titlepage_no_title/res_latex/titlepage_no_title.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/titlepage_with_commands_classical/res_latex/titlepage_with_commands_classical.tex
 
b/tp/t/results/latex_tests/titlepage_with_commands_classical/res_latex/titlepage_with_commands_classical.tex
index 3ffd0363a1..8a0e4a3951 100644
--- 
a/tp/t/results/latex_tests/titlepage_with_commands_classical/res_latex/titlepage_with_commands_classical.tex
+++ 
b/tp/t/results/latex_tests/titlepage_with_commands_classical/res_latex/titlepage_with_commands_classical.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/two_setchapternewpage_odd_on/res_latex/two_setchapternewpage_odd_on.tex
 
b/tp/t/results/latex_tests/two_setchapternewpage_odd_on/res_latex/two_setchapternewpage_odd_on.tex
index f08ab91d43..35c4b41b23 100644
--- 
a/tp/t/results/latex_tests/two_setchapternewpage_odd_on/res_latex/two_setchapternewpage_odd_on.tex
+++ 
b/tp/t/results/latex_tests/two_setchapternewpage_odd_on/res_latex/two_setchapternewpage_odd_on.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/two_setchapternewpage_on_odd/res_latex/two_setchapternewpage_on_odd.tex
 
b/tp/t/results/latex_tests/two_setchapternewpage_on_odd/res_latex/two_setchapternewpage_on_odd.tex
index a7f6c1cbb4..768a6aca16 100644
--- 
a/tp/t/results/latex_tests/two_setchapternewpage_on_odd/res_latex/two_setchapternewpage_on_odd.tex
+++ 
b/tp/t/results/latex_tests/two_setchapternewpage_on_odd/res_latex/two_setchapternewpage_on_odd.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/latex_tests/verbatim_in_smallformat/res_latex/verbatim_in_smallformat.tex
 
b/tp/t/results/latex_tests/verbatim_in_smallformat/res_latex/verbatim_in_smallformat.tex
index 7d3308a657..65cd7356c0 100644
--- 
a/tp/t/results/latex_tests/verbatim_in_smallformat/res_latex/verbatim_in_smallformat.tex
+++ 
b/tp/t/results/latex_tests/verbatim_in_smallformat/res_latex/verbatim_in_smallformat.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/quotation/empty_quotation/res_latex/empty_quotation.tex 
b/tp/t/results/quotation/empty_quotation/res_latex/empty_quotation.tex
index 232d9c4e11..cef8dd2426 100644
--- a/tp/t/results/quotation/empty_quotation/res_latex/empty_quotation.tex
+++ b/tp/t/results/quotation/empty_quotation/res_latex/empty_quotation.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/quotation/quotation_and_author/res_latex/quotation_and_author.tex
 
b/tp/t/results/quotation/quotation_and_author/res_latex/quotation_and_author.tex
index f7edf053cb..288362b447 100644
--- 
a/tp/t/results/quotation/quotation_and_author/res_latex/quotation_and_author.tex
+++ 
b/tp/t/results/quotation/quotation_and_author/res_latex/quotation_and_author.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/quotation/quotation_author_in_example/res_latex/quotation_author_in_example.tex
 
b/tp/t/results/quotation/quotation_author_in_example/res_latex/quotation_author_in_example.tex
index a64b55af64..af5c6f8313 100644
--- 
a/tp/t/results/quotation/quotation_author_in_example/res_latex/quotation_author_in_example.tex
+++ 
b/tp/t/results/quotation/quotation_author_in_example/res_latex/quotation_author_in_example.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/quotation/space_at_commands_end_quotation_line/res_latex/space_at_commands_end_quotation_line.tex
 
b/tp/t/results/quotation/space_at_commands_end_quotation_line/res_latex/space_at_commands_end_quotation_line.tex
index e2a4bd040f..390873f8b0 100644
--- 
a/tp/t/results/quotation/space_at_commands_end_quotation_line/res_latex/space_at_commands_end_quotation_line.tex
+++ 
b/tp/t/results/quotation/space_at_commands_end_quotation_line/res_latex/space_at_commands_end_quotation_line.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/sectioning/chapter_between_nodes/res_latex/chapter_between_nodes.tex
 
b/tp/t/results/sectioning/chapter_between_nodes/res_latex/chapter_between_nodes.tex
index 439df4b971..d47c2a3250 100644
--- 
a/tp/t/results/sectioning/chapter_between_nodes/res_latex/chapter_between_nodes.tex
+++ 
b/tp/t/results/sectioning/chapter_between_nodes/res_latex/chapter_between_nodes.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/sectioning/lone_Top_node/res_latex/lone_Top_node.tex 
b/tp/t/results/sectioning/lone_Top_node/res_latex/lone_Top_node.tex
index 76cdf71709..bc3ab99df3 100644
--- a/tp/t/results/sectioning/lone_Top_node/res_latex/lone_Top_node.tex
+++ b/tp/t/results/sectioning/lone_Top_node/res_latex/lone_Top_node.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/sectioning/loop_nodes/res_latex/loop_nodes.tex 
b/tp/t/results/sectioning/loop_nodes/res_latex/loop_nodes.tex
index 4294f9276f..90d686298b 100644
--- a/tp/t/results/sectioning/loop_nodes/res_latex/loop_nodes.tex
+++ b/tp/t/results/sectioning/loop_nodes/res_latex/loop_nodes.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/sectioning/node_sectop_before_chapter_no_node/res_latex/node_sectop_before_chapter_no_node.tex
 
b/tp/t/results/sectioning/node_sectop_before_chapter_no_node/res_latex/node_sectop_before_chapter_no_node.tex
index 39f1f3ac9b..8b9daff033 100644
--- 
a/tp/t/results/sectioning/node_sectop_before_chapter_no_node/res_latex/node_sectop_before_chapter_no_node.tex
+++ 
b/tp/t/results/sectioning/node_sectop_before_chapter_no_node/res_latex/node_sectop_before_chapter_no_node.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/sectioning/node_sectop_before_lone_node_Top/res_latex/node_sectop_before_lone_node_Top.tex
 
b/tp/t/results/sectioning/node_sectop_before_lone_node_Top/res_latex/node_sectop_before_lone_node_Top.tex
index 23cdddf82f..2275662a04 100644
--- 
a/tp/t/results/sectioning/node_sectop_before_lone_node_Top/res_latex/node_sectop_before_lone_node_Top.tex
+++ 
b/tp/t/results/sectioning/node_sectop_before_lone_node_Top/res_latex/node_sectop_before_lone_node_Top.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/sectioning/nodes_before_after_top/res_latex/nodes_before_after_top.tex
 
b/tp/t/results/sectioning/nodes_before_after_top/res_latex/nodes_before_after_top.tex
index 94e4471adb..8b4fe09460 100644
--- 
a/tp/t/results/sectioning/nodes_before_after_top/res_latex/nodes_before_after_top.tex
+++ 
b/tp/t/results/sectioning/nodes_before_after_top/res_latex/nodes_before_after_top.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/sectioning/nodes_before_after_top_xref/res_latex/nodes_before_after_top_xref.tex
 
b/tp/t/results/sectioning/nodes_before_after_top_xref/res_latex/nodes_before_after_top_xref.tex
index 9bbd8b2d3c..0d70ff9d46 100644
--- 
a/tp/t/results/sectioning/nodes_before_after_top_xref/res_latex/nodes_before_after_top_xref.tex
+++ 
b/tp/t/results/sectioning/nodes_before_after_top_xref/res_latex/nodes_before_after_top_xref.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/sectioning/nodes_before_top/res_latex/nodes_before_top.tex 
b/tp/t/results/sectioning/nodes_before_top/res_latex/nodes_before_top.tex
index c7c3e5395f..fb76db6ad9 100644
--- a/tp/t/results/sectioning/nodes_before_top/res_latex/nodes_before_top.tex
+++ b/tp/t/results/sectioning/nodes_before_top/res_latex/nodes_before_top.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/sectioning/section_before_after_top_node/res_latex/section_before_after_top_node.tex
 
b/tp/t/results/sectioning/section_before_after_top_node/res_latex/section_before_after_top_node.tex
index 9162ece615..dd8f646f8e 100644
--- 
a/tp/t/results/sectioning/section_before_after_top_node/res_latex/section_before_after_top_node.tex
+++ 
b/tp/t/results/sectioning/section_before_after_top_node/res_latex/section_before_after_top_node.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/sectioning/section_before_after_top_node_last_node/res_latex/section_before_after_top_node_last_node.tex
 
b/tp/t/results/sectioning/section_before_after_top_node_last_node/res_latex/section_before_after_top_node_last_node.tex
index 6a0f615d77..3a7e743c89 100644
--- 
a/tp/t/results/sectioning/section_before_after_top_node_last_node/res_latex/section_before_after_top_node_last_node.tex
+++ 
b/tp/t/results/sectioning/section_before_after_top_node_last_node/res_latex/section_before_after_top_node_last_node.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/sectioning/section_chapter_before_top_nodes/res_latex/section_chapter_before_top_nodes.tex
 
b/tp/t/results/sectioning/section_chapter_before_top_nodes/res_latex/section_chapter_before_top_nodes.tex
index 97cf050e70..cabfcd6b3b 100644
--- 
a/tp/t/results/sectioning/section_chapter_before_top_nodes/res_latex/section_chapter_before_top_nodes.tex
+++ 
b/tp/t/results/sectioning/section_chapter_before_top_nodes/res_latex/section_chapter_before_top_nodes.tex
@@ -47,7 +47,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/t/results/sectioning/top_node_part_top.pl 
b/tp/t/results/sectioning/top_node_part_top.pl
index fcd7fc1cb1..0513dfa290 100644
--- a/tp/t/results/sectioning/top_node_part_top.pl
+++ b/tp/t/results/sectioning/top_node_part_top.pl
@@ -518,7 +518,7 @@ $result_converted{'file_latex'}->{'top_node_part_top'} = 
'\\documentclass{book}
 % avoid pagebreak and headings setting for a sectionning command
 \\newcommand{\\GNUTexinfonopagebreakheading}[2]{\\let\\clearpage\\relax 
\\let\\cleardoublepage\\relax \\let\\thispagestyle\\GNUTexinfoplaceholder 
#1{#2}}
 
-\\renewcommand{\\includegraphics}[1]{\\fbox{FIG #1}}
+\\renewcommand{\\includegraphics}[1]{\\fbox{FIG \\detokenize{#1}}}
 
 % set default for @setchapternewpage
 \\makeatletter
diff --git 
a/tp/t/results/xtable/inter_item_commands_in_table/res_latex/inter_item_commands_in_table.tex
 
b/tp/t/results/xtable/inter_item_commands_in_table/res_latex/inter_item_commands_in_table.tex
index 33242449df..40110715ea 100644
--- 
a/tp/t/results/xtable/inter_item_commands_in_table/res_latex/inter_item_commands_in_table.tex
+++ 
b/tp/t/results/xtable/inter_item_commands_in_table/res_latex/inter_item_commands_in_table.tex
@@ -59,7 +59,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/t/results/xtable/inter_item_commands_in_table_in_example/res_latex/inter_item_commands_in_table_in_example.tex
 
b/tp/t/results/xtable/inter_item_commands_in_table_in_example/res_latex/inter_item_commands_in_table_in_example.tex
index 5a37e8298b..d5e6a31539 100644
--- 
a/tp/t/results/xtable/inter_item_commands_in_table_in_example/res_latex/inter_item_commands_in_table_in_example.tex
+++ 
b/tp/t/results/xtable/inter_item_commands_in_table_in_example/res_latex/inter_item_commands_in_table_in_example.tex
@@ -54,7 +54,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/tests/indices/res_parser/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
 
b/tp/tests/indices/res_parser/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
index e7ec6bc24b..b5047b4a91 100644
--- 
a/tp/tests/indices/res_parser/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
+++ 
b/tp/tests/indices/res_parser/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
@@ -61,7 +61,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git 
a/tp/tests/indices/res_parser_info/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
 
b/tp/tests/indices/res_parser_info/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
index e7ec6bc24b..b5047b4a91 100644
--- 
a/tp/tests/indices/res_parser_info/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
+++ 
b/tp/tests/indices/res_parser_info/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
@@ -61,7 +61,7 @@
 % avoid pagebreak and headings setting for a sectionning command
 \newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
diff --git a/tp/tests/layout/res_parser/formatting_latex/formatting.tex 
b/tp/tests/layout/res_parser/formatting_latex/formatting.tex
index 3a3a56578a..f90c4c0199 100644
--- a/tp/tests/layout/res_parser/formatting_latex/formatting.tex
+++ b/tp/tests/layout/res_parser/formatting_latex/formatting.tex
@@ -80,7 +80,7 @@
 innertopmargin=10pt, innerbottommargin=10pt,%
 roundcorner=10pt}
 
-\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}
 
 % set default for @setchapternewpage
 \makeatletter
@@ -1276,7 +1276,7 @@ Invalid use of @':\leavevmode{}\\
 \texttt{@image\{@file\{f{-}{-}ile\}@@@.,aze,az,alt,@file\{.file ext\} 
e{-}{-}xt@\}} \includegraphics[width=aze,height=az]{f--ile@.}
 
 \texttt{@image\{f{-}{-}ile,aze,az,@verb\{:jk \_" \%@:\} @b\{in b 
"\},e{-}{-}xt\}} \includegraphics[width=aze,height=az]{f--ile}
-\texttt{@image\{file@verb\{:jk \_" \%@:\},,,alt@verb\{:jk \_" \%@:\}\}} 
\includegraphics{filejk \_" \%@}
+\texttt{@image\{file@verb\{:jk \_" \%@:\},,,alt@verb\{:jk \_" \%@:\}\}} 
\includegraphics{filejk _" \%@}
 
 
 {\bfseries author}%
@@ -2602,7 +2602,7 @@ Invalid use of @':\leavevmode{}\\
 \texttt{@image\{@file\{f{-}{-}ile\}@@@.,aze,az,alt,@file\{.file ext\} 
e{-}{-}xt@\}} \includegraphics[width=aze,height=az]{f--ile@.}
 
 \texttt{@image\{f{-}{-}ile,aze,az,@verb\{:jk \_" \%@:\} @b\{in b 
"\},e{-}{-}xt\}} \includegraphics[width=aze,height=az]{f--ile}
-\texttt{@image\{file@verb\{:jk \_" \%@:\},,,alt@verb\{:jk \_" \%@:\}\}} 
\includegraphics{filejk \_" \%@}
+\texttt{@image\{file@verb\{:jk \_" \%@:\},,,alt@verb\{:jk \_" \%@:\}\}} 
\includegraphics{filejk _" \%@}
 
 
 {\bfseries author}%
@@ -3949,7 +3949,7 @@ Invalid use of @':\leavevmode{}\\
 \texttt{@image\{@file\{f{-}{-}ile\}@@@.,aze,az,alt,@file\{.file ext\} 
e{-}{-}xt@\}} \includegraphics[width=aze,height=az]{f--ile@.}
 
 \texttt{@image\{f{-}{-}ile,aze,az,@verb\{:jk \_" \%@:\} @b\{in b 
"\},e{-}{-}xt\}} \includegraphics[width=aze,height=az]{f--ile}
-\texttt{@image\{file@verb\{:jk \_" \%@:\},,,alt@verb\{:jk \_" \%@:\}\}} 
\includegraphics{filejk \_" \%@}
+\texttt{@image\{file@verb\{:jk \_" \%@:\},,,alt@verb\{:jk \_" \%@:\}\}} 
\includegraphics{filejk _" \%@}
 
 
 {\bfseries author}%
@@ -5274,7 +5274,7 @@ Invalid use of @':\leavevmode{}\\
 \texttt{@image\{@file\{f{-}{-}ile\}@@@.,aze,az,alt,@file\{.file ext\} 
e{-}{-}xt@\}} \includegraphics[width=aze,height=az]{f--ile@.}
 
 \texttt{@image\{f{-}{-}ile,aze,az,@verb\{:jk \_" \%@:\} @b\{in b 
"\},e{-}{-}xt\}} \includegraphics[width=aze,height=az]{f--ile}
-\texttt{@image\{file@verb\{:jk \_" \%@:\},,,alt@verb\{:jk \_" \%@:\}\}} 
\includegraphics{filejk \_" \%@}
+\texttt{@image\{file@verb\{:jk \_" \%@:\},,,alt@verb\{:jk \_" \%@:\}\}} 
\includegraphics{filejk _" \%@}
 
 
 {\bfseries author}%
@@ -7062,16 +7062,16 @@ Invalid use of @':\leavevmode{}\\
 \texttt{@image\{f-ile,aze,,a{-}{-}lt\}} \includegraphics[width=aze]{f-ile}
 \texttt{@image\{f-ile,,,alt@verb\{:jk \_" \%\@\}\}} \includegraphics{f-ile}
 
-\texttt{@image\{f{-}{-}ile\}} \includegraphics{f{-}{-}ile}
-\texttt{@image\{f{-}{-}ile,,,alt\}} \includegraphics{f{-}{-}ile}
-\texttt{@image\{f{-}{-}ile,,,,.e-d-xt\}} \includegraphics{f{-}{-}ile}
-\texttt{@image\{f{-}{-}ile,l{-}{-}i\}} \includegraphics[width=l--i]{f{-}{-}ile}
-\texttt{@image\{f{-}{-}ile,,l{-}{-}e\}} 
\includegraphics[height=l--e]{f{-}{-}ile}
-\texttt{@image\{f{-}{-}ile,aze,az,alt,.e{-}{-}xt\}} 
\includegraphics[width=aze,height=az]{f{-}{-}ile}
-\texttt{@image\{@file\{f{-}{-}ile\}@@@.,aze,az,alt,@file\{.file ext\} 
e{-}{-}xt@\}} \includegraphics[width=aze,height=az]{f{-}{-}ile@.}
+\texttt{@image\{f{-}{-}ile\}} \includegraphics{f--ile}
+\texttt{@image\{f{-}{-}ile,,,alt\}} \includegraphics{f--ile}
+\texttt{@image\{f{-}{-}ile,,,,.e-d-xt\}} \includegraphics{f--ile}
+\texttt{@image\{f{-}{-}ile,l{-}{-}i\}} \includegraphics[width=l--i]{f--ile}
+\texttt{@image\{f{-}{-}ile,,l{-}{-}e\}} \includegraphics[height=l--e]{f--ile}
+\texttt{@image\{f{-}{-}ile,aze,az,alt,.e{-}{-}xt\}} 
\includegraphics[width=aze,height=az]{f--ile}
+\texttt{@image\{@file\{f{-}{-}ile\}@@@.,aze,az,alt,@file\{.file ext\} 
e{-}{-}xt@\}} \includegraphics[width=aze,height=az]{f--ile@.}
 
-\texttt{@image\{f{-}{-}ile,aze,az,@verb\{:jk \_" \%@:\} @b\{in b 
"\},e{-}{-}xt\}} \includegraphics[width=aze,height=az]{f{-}{-}ile}
-\texttt{@image\{file@verb\{:jk \_" \%@:\},,,alt@verb\{:jk \_" \%@:\}\}} 
\includegraphics{filejk \_" \%@}
+\texttt{@image\{f{-}{-}ile,aze,az,@verb\{:jk \_" \%@:\} @b\{in b 
"\},e{-}{-}xt\}} \includegraphics[width=aze,height=az]{f--ile}
+\texttt{@image\{file@verb\{:jk \_" \%@:\},,,alt@verb\{:jk \_" \%@:\}\}} 
\includegraphics{filejk _" \%@}
 
 
 {\bfseries author}%



reply via email to

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