texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Ignore ENABLE_ENCODING for plain text in more out


From: Patrice Dumas
Subject: branch master updated: Ignore ENABLE_ENCODING for plain text in more output formats
Date: Sun, 07 Aug 2022 05:58:21 -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 f447696f53 Ignore ENABLE_ENCODING for plain text in more output formats
f447696f53 is described below

commit f447696f5372a26219efe64203e195cc375d0e2c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Aug 7 11:58:10 2022 +0200

    Ignore ENABLE_ENCODING for plain text in more output formats
    
    * tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/IXIN.pm,
    tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/TexinfoXML.pm,
    tp/ext/epub3.pm: set second optional argument of
    Texinfo::Convert::Text::copy_options_for_convert_text to ignore
    the ENABLE_ENCODING setting to determine how to convert accented
    letter @-commands in plain text.
    
    * tp/Texinfo/Convert/LaTeX.pm: use more systematically
    $self->{'convert_text_options'}.
---
 ChangeLog                                          |  14 ++++
 tp/TODO                                            |   2 +
 tp/Texinfo/Convert/DocBook.pm                      |  10 +--
 tp/Texinfo/Convert/IXIN.pm                         |   3 +-
 tp/Texinfo/Convert/LaTeX.pm                        |  13 ++--
 tp/Texinfo/Convert/TexinfoXML.pm                   |   4 +-
 tp/Texinfo/Structuring.pm                          |   5 +-
 tp/ext/epub3.pm                                    |   2 +-
 tp/tests/formatting/list-of-tests                  |   2 +
 "tp/tests/formatting/os\303\251_utf8.texi"         |   1 +
 .../non_ascii_command_line/Chapteur.html           |   1 +
 .../os\303\251-texinfo.texi"                       |   1 +
 .../non_ascii_command_line/os\303\251_utf8.2"      |   6 +-
 .../non_ascii_test_epub/os\303\251_utf8.2"         |   6 +-
 .../EPUB/images/2-an_image.png"                    | Bin 0 -> 514064 bytes
 .../EPUB/os\303\251_utf8.opf"                      |   1 +
 .../EPUB/xhtml/Chapteur.xhtml"                     |   3 +-
 .../non_ascii_test_latex/os\303\251_utf8.1"        |   0
 .../non_ascii_test_latex/os\303\251_utf8.2"        |   3 +
 .../non_ascii_test_latex/os\303\251_utf8.tex"      |  79 +++++++++++++++++++++
 .../non_ascii_test_rawtext/os\303\251_utf8.2"      |   2 +-
 .../non_ascii_test_rawtext/os\303\251_utf8.txt"    |   1 +
 .../formatting_epub_package/EPUB/formatting.opf    |   2 +-
 .../formatting_epub_package/EPUB/formatting.opf    |   2 +-
 .../formatting_non_ascii_test_latex.sh             |  19 +++++
 25 files changed, 156 insertions(+), 26 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 66a9a3a842..6ca4d48e12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2022-08-07  Patrice Dumas  <pertusus@free.fr>
+
+       Ignore ENABLE_ENCODING for plain text in more output formats
+
+       * tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/IXIN.pm,
+       tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/TexinfoXML.pm,
+       tp/ext/epub3.pm: set second optional argument of
+       Texinfo::Convert::Text::copy_options_for_convert_text to ignore
+       the ENABLE_ENCODING setting to determine how to convert accented
+       letter @-commands in plain text. 
+
+       * tp/Texinfo/Convert/LaTeX.pm: use more systematically
+       $self->{'convert_text_options'}.
+
 2022-08-06  Gavin Smith  <gavinsmith0123@gmail.com>
 
        Protect ] in LaTeX
diff --git a/tp/TODO b/tp/TODO
index a8d1fde0b8..dc9babba9c 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -20,6 +20,8 @@ Before next release
 Bugs
 ====
 
+If TEST is set, do not use out of source init files directories.
+
 HTML5 validation to check
 -------------------------
 
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index b2ca2f1d1f..0da4a082fe 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -1038,7 +1038,7 @@ sub _convert($$;$)
                 
$self->xml_protect_text(Texinfo::Convert::Text::convert_to_text(
                   {'contents' => $element->{'args'}->[-1]->{'contents'}},
                   {'code' => 1,
-                   
Texinfo::Convert::Text::copy_options_for_convert_text($self)}));
+                   
Texinfo::Convert::Text::copy_options_for_convert_text($self, 1)}));
             }
             my $node;
             if (defined($element->{'args'}->[0])
@@ -1174,7 +1174,7 @@ sub _convert($$;$)
           my $basefile = Texinfo::Convert::Text::convert_to_text(
            {'contents' => $element->{'args'}->[0]->{'contents'}},
            {'code' => 1,
-            Texinfo::Convert::Text::copy_options_for_convert_text($self)});
+            Texinfo::Convert::Text::copy_options_for_convert_text($self, 1)});
           my $is_inline = Texinfo::Common::element_is_inline($element);
           if ($is_inline) {
             $result .= "<inlinemediaobject>";
@@ -1232,7 +1232,7 @@ sub _convert($$;$)
               = $self->_protect_text(Texinfo::Convert::Text::convert_to_text(
                  {'contents' => $email},
                  {'code' => 1,
-                  
Texinfo::Convert::Text::copy_options_for_convert_text($self)}));
+                  Texinfo::Convert::Text::copy_options_for_convert_text($self, 
1)}));
           }
           if ($name and $email) {
             return "<ulink url=\"mailto:$email_text\";>"
@@ -1256,7 +1256,7 @@ sub _convert($$;$)
               Texinfo::Convert::Text::convert_to_text(
                 {'contents' => $url_content},
                 {'code' => 1,
-                 
Texinfo::Convert::Text::copy_options_for_convert_text($self)}));
+                 Texinfo::Convert::Text::copy_options_for_convert_text($self, 
1)}));
           } else {
             $url_text = '';
           }
@@ -1432,7 +1432,7 @@ sub _convert($$;$)
             foreach my $prototype (@{$element->{'extra'}->{'prototypes'}}) {
               my $prototype_text
                = Texinfo::Convert::Text::convert_to_text($prototype,
-                  
{Texinfo::Convert::Text::copy_options_for_convert_text($self)});
+                  
{Texinfo::Convert::Text::copy_options_for_convert_text($self, 1)});
               push @fractions,
                 Texinfo::Convert::Unicode::string_width($prototype_text);
             }
diff --git a/tp/Texinfo/Convert/IXIN.pm b/tp/Texinfo/Convert/IXIN.pm
index 8b8830a033..a29f75b331 100644
--- a/tp/Texinfo/Convert/IXIN.pm
+++ b/tp/Texinfo/Convert/IXIN.pm
@@ -834,7 +834,8 @@ sub output_ixin($$)
             and @{$command->{'args'}->[0]->{'contents'}}) {
         $basefile = Texinfo::Convert::Text::convert_to_text(
           {'contents' => $command->{'args'}->[0]->{'contents'}},
-          {'code' => 1, 
Texinfo::Convert::Text::copy_options_for_convert_text($self)});
+          {'code' => 1,
+           Texinfo::Convert::Text::copy_options_for_convert_text($self, 1)});
       }
       if (defined($command->{'args'}->[4])
             and @{$command->{'args'}->[4]->{'contents'}}) {
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index 2d5de59366..45b238c88f 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -116,6 +116,8 @@
 #
 # Proper indenting of nested environments, @exdent from nested environment
 #
+# should we percent encode @email and @uref/@url urls?
+#
 #
 # CAN WAIT
 #
@@ -815,7 +817,7 @@ sub converter_initialize($)
 
   %{$self->{'quotes_map'}} = %quotes_map;
   $self->{'convert_text_options'}
-      = {Texinfo::Convert::Text::copy_options_for_convert_text($self)};
+      = {Texinfo::Convert::Text::copy_options_for_convert_text($self, 1)};
 
   # this condition means that there is no way to turn off
   # @U expansion to utf-8 characters even though this
@@ -1587,6 +1589,7 @@ sub _pop_context($)
   pop @{$self->{'formatting_context'}};
 }
 
+# FIXME should $ ~ be protected?
 sub _protect_url($$)
 {
   my ($self, $text) = @_;
@@ -2608,8 +2611,7 @@ sub _convert($$)
           $email_text
             = $self->_protect_url(Texinfo::Convert::Text::convert_to_text(
                 {'contents' => $email},
-                {'code' => 1,
-                 
Texinfo::Convert::Text::copy_options_for_convert_text($self)}));
+                {'code' => 1, %{$self->{'convert_text_options'}}}));
         }
         if ($name and $email) {
           $result .= "\\href{mailto:$email_text}{$converted_name}";;
@@ -2632,8 +2634,7 @@ sub _convert($$)
           my $url_text = $self->_protect_url(
             Texinfo::Convert::Text::convert_to_text(
                {'contents' => $url_content},
-               {'code' => 1,
-                
Texinfo::Convert::Text::copy_options_for_convert_text($self)}));
+               {'code' => 1, %{$self->{'convert_text_options'}}}));
           if (scalar(@{$element->{'args'}}) == 2
              and defined($element->{'args'}->[1])
              and @{$element->{'args'}->[1]->{'contents'}}) {
@@ -3135,7 +3136,7 @@ sub _convert($$)
             # not clear what to do here.  For now use the text width
             my $prototype_text
               = Texinfo::Convert::Text::convert_to_text($prototype,
-                 
{Texinfo::Convert::Text::copy_options_for_convert_text($self)});
+                 $self->{'convert_text_options'});
             my $length = 
Texinfo::Convert::Unicode::string_width($prototype_text);
             $total_length += $length;
             push @prototypes_length, $length;
diff --git a/tp/Texinfo/Convert/TexinfoXML.pm b/tp/Texinfo/Convert/TexinfoXML.pm
index 9ef1c7344c..11ae9cdd25 100644
--- a/tp/Texinfo/Convert/TexinfoXML.pm
+++ b/tp/Texinfo/Convert/TexinfoXML.pm
@@ -1263,14 +1263,14 @@ sub _convert($$;$)
             $manual = Texinfo::Convert::Text::convert_to_text({'contents'
                      => $element->{'args'}->[$manual_arg_index]->{'contents'}},
                  {'code' => 1,
-                  
Texinfo::Convert::Text::copy_options_for_convert_text($self)});
+                  Texinfo::Convert::Text::copy_options_for_convert_text($self, 
1)});
           }
           if (!defined($manual) and $element->{'extra'}->{'node_argument'}
               and $element->{'extra'}->{'node_argument'}->{'manual_content'}) {
             $manual = Texinfo::Convert::Text::convert_to_text({'contents'
                    => 
$element->{'extra'}->{'node_argument'}->{'manual_content'}},
                  {'code' => 1,
-                  
Texinfo::Convert::Text::copy_options_for_convert_text($self)});
+                  Texinfo::Convert::Text::copy_options_for_convert_text($self, 
1)});
           }
           if (defined($manual)) {
             my $manual_base = $manual;
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index 357d765718..fc2110dd02 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -1582,9 +1582,12 @@ sub setup_index_entry_keys_formatting($)
 {
   my $configuration_information = shift;
 
+  # FIXME should the encoding be used by setting the
+  # copy_options_for_convert_text optional argument?  The result does
+  # not seem so good.
   my $options = {'sort_string' => 1, 'ascii_punctuation' => 1,
    Texinfo::Convert::Text::copy_options_for_convert_text(
-                                    $configuration_information)};
+                                  $configuration_information)};
 
   return $options;
 }
diff --git a/tp/ext/epub3.pm b/tp/ext/epub3.pm
index 5040efc21f..d94cdc0dc7 100644
--- a/tp/ext/epub3.pm
+++ b/tp/ext/epub3.pm
@@ -186,7 +186,7 @@ sub _epub_convert_tree_to_text($$;$)
 
   return &{$converter->formatting_function('format_protect_text')}($converter,
     Texinfo::Convert::Text::convert_to_text($tree,
-   {Texinfo::Convert::Text::copy_options_for_convert_text($converter),
+   {Texinfo::Convert::Text::copy_options_for_convert_text($converter, 1),
      %$options}));
 }
 
diff --git a/tp/tests/formatting/list-of-tests 
b/tp/tests/formatting/list-of-tests
index 1abd4cf9fa..1002717e50 100644
--- a/tp/tests/formatting/list-of-tests
+++ b/tp/tests/formatting/list-of-tests
@@ -30,6 +30,8 @@ non_ascii_test_rawtext osé_utf8.texi -c 
COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_
 # check that the output is right when based on input file name
 non_ascii_no_setfilename_test_rawtext osé_utf8_no_setfilename.texi -c 
COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8 -c INPUT_FILE_NAME_ENCODING=UTF-8 -c 
TEXINFO_OUTPUT_FORMAT=rawtext
 
+non_ascii_test_latex osé_utf8.texi -c COMMAND_LINE_ENCODING=UTF-8 -c 
MESSAGE_ENCODING=UTF-8 -c OUTPUT_FILE_NAME_ENCODING=UTF-8 -c 
INPUT_FILE_NAME_ENCODING=UTF-8 --latex
+
 # test of non utf8 encoded file name in non utf8 document
 # "Need recoded file names" string is used in test driving script
 # to determine that the recoding of file names need to have
diff --git "a/tp/tests/formatting/os\303\251_utf8.texi" 
"b/tp/tests/formatting/os\303\251_utf8.texi"
index 21c57ffc74..78381db6d7 100644
--- "a/tp/tests/formatting/os\303\251_utf8.texi"
+++ "b/tp/tests/formatting/os\303\251_utf8.texi"
@@ -17,6 +17,7 @@ value vùr @value{vùr}.
 @include included_akçentêd.texi
 
 @image{an_ïmage,,,öld}
+@image{an_@"{@dotless{i}}mage,,,@"old}
 
 @image{dîrectory/imàge,,,âlt,.êxt}
 
diff --git 
a/tp/tests/formatting/res_parser/non_ascii_command_line/Chapteur.html 
b/tp/tests/formatting/res_parser/non_ascii_command_line/Chapteur.html
index 73108c5bdf..7f4acf2192 100644
--- a/tp/tests/formatting/res_parser/non_ascii_command_line/Chapteur.html
+++ b/tp/tests/formatting/res_parser/non_ascii_command_line/Chapteur.html
@@ -65,6 +65,7 @@ ul.mark-néni {list-style-type: "vàça"}
 <p>In included téxt.
 </p>
 <img class="image" src="an_%c3%afmage.png" alt="öld">
+<img class="image" src="an_%c3%afmage.png" alt="&ouml;ld">
 
 <img class="image" src="d%c3%aerectory/im%c3%a0ge.%c3%aaxt" alt="âlt">
 
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_command_line/os\303\251-texinfo.texi"
 
"b/tp/tests/formatting/res_parser/non_ascii_command_line/os\303\251-texinfo.texi"
index a95a3ac74e..8524242846 100644
--- 
"a/tp/tests/formatting/res_parser/non_ascii_command_line/os\303\251-texinfo.texi"
+++ 
"b/tp/tests/formatting/res_parser/non_ascii_command_line/os\303\251-texinfo.texi"
@@ -15,6 +15,7 @@ value vùr ké.
 In included téxt.
 
 @image{an_ïmage,,,öld}
+@image{an_@"{@dotless{i}}mage,,,@"old}
 
 @image{dîrectory/imàge,,,âlt,.êxt}
 
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_command_line/os\303\251_utf8.2" 
"b/tp/tests/formatting/res_parser/non_ascii_command_line/os\303\251_utf8.2"
index f58f4f8afc..0951718d79 100644
--- "a/tp/tests/formatting/res_parser/non_ascii_command_line/os\303\251_utf8.2"
+++ "b/tp/tests/formatting/res_parser/non_ascii_command_line/os\303\251_utf8.2"
@@ -1,6 +1,6 @@
 texi2any: warning: Mekanïk is not a valid split possibility
 texi2any: warning: Destruktïw is not a valid language code
 texi2any: warning: unknown variable from command line: Kommandöh
-osé_utf8.texi:23: @include: could not find not_existïng.téxi
-osé_utf8.texi:21: warning: @image file `dîrectory/imàge' (for HTML) not found, 
using `dîrectory/imàge.êxt'
-osé_utf8.texi:27: @verbatiminclude: could not find vi_not_existïng.téxi
+osé_utf8.texi:24: @include: could not find not_existïng.téxi
+osé_utf8.texi:22: warning: @image file `dîrectory/imàge' (for HTML) not found, 
using `dîrectory/imàge.êxt'
+osé_utf8.texi:28: @verbatiminclude: could not find vi_not_existïng.téxi
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8.2" 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8.2"
index 74bcf20373..2d5185087d 100644
--- "a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8.2"
+++ "b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8.2"
@@ -1,5 +1,5 @@
 osé_utf8.texi:15: warning: undefined flag: vùr
-osé_utf8.texi:23: @include: could not find not_existïng.téxi
-osé_utf8.texi:21: warning: @image file `dîrectory/imàge' (for HTML) not found, 
using `dîrectory/imàge.êxt'
+osé_utf8.texi:24: @include: could not find not_existïng.téxi
+osé_utf8.texi:22: warning: @image file `dîrectory/imàge' (for HTML) not found, 
using `dîrectory/imàge.êxt'
 texi2any: @image file `dîrectory/imàge' can not be copied
-osé_utf8.texi:27: @verbatiminclude: could not find vi_not_existïng.téxi
+osé_utf8.texi:28: @verbatiminclude: could not find vi_not_existïng.téxi
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8_epub_package/EPUB/images/2-an_image.png"
 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8_epub_package/EPUB/images/2-an_image.png"
new file mode 100644
index 0000000000..193409f6ba
Binary files /dev/null and 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8_epub_package/EPUB/images/2-an_image.png"
 differ
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8_epub_package/EPUB/os\303\251_utf8.opf"
 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8_epub_package/EPUB/os\303\251_utf8.opf"
index bb8bee1720..d2c3042703 100644
--- 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8_epub_package/EPUB/os\303\251_utf8.opf"
+++ 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8_epub_package/EPUB/os\303\251_utf8.opf"
@@ -10,6 +10,7 @@
       <item id="unit1" media-type="application/xhtml+xml" 
href="xhtml/osé_utf8.xhtml"/>
       <item id="unit2" media-type="application/xhtml+xml" 
href="xhtml/Chapteur.xhtml"/>
       <item id="image1" media-type="image/png" href="images/1-an_image.png"/>
+      <item id="image2" media-type="image/png" href="images/2-an_image.png"/>
    </manifest>
    <spine>
       <itemref idref="unit1"/>
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8_epub_package/EPUB/xhtml/Chapteur.xhtml"
 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8_epub_package/EPUB/xhtml/Chapteur.xhtml"
index 972f3d76dc..f91eecaa76 100644
--- 
"a/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8_epub_package/EPUB/xhtml/Chapteur.xhtml"
+++ 
"b/tp/tests/formatting/res_parser/non_ascii_test_epub/os\303\251_utf8_epub_package/EPUB/xhtml/Chapteur.xhtml"
@@ -28,8 +28,9 @@
 <p>In included téxt.
 </p>
 <img class="image" src="../images/1-an_image.png" alt="öld"/>
+<img class="image" src="../images/2-an_image.png" alt="&#246;ld"/>
 
-<img class="image" src="../images/2-image.ext" alt="âlt"/>
+<img class="image" src="../images/3-image.ext" alt="âlt"/>
 
 
 <pre class="verbatim">In included téxt.
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_latex/os\303\251_utf8.1" 
"b/tp/tests/formatting/res_parser/non_ascii_test_latex/os\303\251_utf8.1"
new file mode 100644
index 0000000000..e69de29bb2
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_latex/os\303\251_utf8.2" 
"b/tp/tests/formatting/res_parser/non_ascii_test_latex/os\303\251_utf8.2"
new file mode 100644
index 0000000000..9a23292a72
--- /dev/null
+++ "b/tp/tests/formatting/res_parser/non_ascii_test_latex/os\303\251_utf8.2"
@@ -0,0 +1,3 @@
+osé_utf8.texi:15: warning: undefined flag: vùr
+osé_utf8.texi:24: @include: could not find not_existïng.téxi
+osé_utf8.texi:28: @verbatiminclude: could not find vi_not_existïng.téxi
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_latex/os\303\251_utf8.tex" 
"b/tp/tests/formatting/res_parser/non_ascii_test_latex/os\303\251_utf8.tex"
new file mode 100644
index 0000000000..233e2526e5
--- /dev/null
+++ "b/tp/tests/formatting/res_parser/non_ascii_test_latex/os\303\251_utf8.tex"
@@ -0,0 +1,79 @@
+\documentclass{book}
+\usepackage{amsfonts}
+\usepackage{amsmath}
+\usepackage[gen]{eurosym}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage{graphicx}
+\usepackage{etoolbox}
+\usepackage{titleps}
+\usepackage{float}
+% use hidelinks to remove boxes around links to be similar with Texinfo TeX
+\usepackage[hidelinks]{hyperref}
+\usepackage[utf8]{inputenc}
+
+\newcommand{\GNUTexinfosettitle}{No Title}%
+
+% redefine the \mainmatter command such that it does not clear page
+% as if in double page
+\makeatletter
+\renewcommand\mainmatter{\clearpage\@mainmattertrue\pagenumbering{arabic}}
+\makeatother
+% add command aliases to use the same command in book and report
+\newcommand\GNUTexinfomainmatter{\mainmatter}
+\newcommand\GNUTexinfofrontmatter{\frontmatter}
+% command that does nothing used to help with substitutions in commands
+\newcommand{\GNUTexinfoplaceholder}[1]{}
+
+% plain page style, for part and chapter, which call \thispagestyle{plain}
+\renewpagestyle{plain}{\sethead[\thepage{}][][]
+                             {}{}{\thepage{}}}
+
+% single header
+\newpagestyle{single}{\sethead[\chaptername{} \thechapter{} 
\chaptertitle{}][][\thepage]
+                              {\chaptername{} \thechapter{} 
\chaptertitle{}}{}{\thepage}}
+
+% called when setting single headers
+\newcommand{\GNUTexinfosetsingleheader}{\pagestyle{single}}
+
+% double header
+\newpagestyle{double}{\sethead[\thepage{}][][\GNUTexinfosettitle]
+                              {\chaptername{} \thechapter{} 
\chaptertitle{}}{}{\thepage}}
+
+% called when setting double headers
+\newcommand{\GNUTexinfosetdoubleheader}{\pagestyle{double}}
+
+
+% 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 \detokenize{#1}}}
+
+% set default for @setchapternewpage
+\makeatletter
+\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{\GNUTexinfoplaceholder{setchapternewpage
 placeholder}\clearpage}{}{}
+\makeatother
+\GNUTexinfosetsingleheader{}%
+
+
+\begin{document}
+\label{anchor:Top}%
+\chapter{Chapteùr}
+\label{anchor:Chapt_00eaur}%
+
+
+value vùr \{No value for `vùr'\}.
+
+In included téxt.
+
+\includegraphics{an_ïmage}
+\includegraphics{an_ïmage}
+
+\includegraphics{dîrectory/imàge}
+
+
+\begin{verbatim}
+In included téxt.
+\end{verbatim}
+
+\end{document}
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_rawtext/os\303\251_utf8.2" 
"b/tp/tests/formatting/res_parser/non_ascii_test_rawtext/os\303\251_utf8.2"
index a4d36147e2..808a9a4c53 100644
--- "a/tp/tests/formatting/res_parser/non_ascii_test_rawtext/os\303\251_utf8.2"
+++ "b/tp/tests/formatting/res_parser/non_ascii_test_rawtext/os\303\251_utf8.2"
@@ -1,2 +1,2 @@
 osé_utf8.texi:15: warning: undefined flag: vùr
-osé_utf8.texi:23: @include: could not find not_existïng.téxi
+osé_utf8.texi:24: @include: could not find not_existïng.téxi
diff --git 
"a/tp/tests/formatting/res_parser/non_ascii_test_rawtext/os\303\251_utf8.txt" 
"b/tp/tests/formatting/res_parser/non_ascii_test_rawtext/os\303\251_utf8.txt"
index 0a440d1743..60948db987 100644
--- 
"a/tp/tests/formatting/res_parser/non_ascii_test_rawtext/os\303\251_utf8.txt"
+++ 
"b/tp/tests/formatting/res_parser/non_ascii_test_rawtext/os\303\251_utf8.txt"
@@ -11,6 +11,7 @@ value vùr .
 In included téxt.
 
 an_ïmage
+an_i"mage
 
 dîrectory/imàge
 
diff --git 
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/formatting.opf
 
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/formatting.opf
index 351fb4db64..f839cfb513 100644
--- 
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/formatting.opf
+++ 
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/formatting.opf
@@ -4,7 +4,7 @@
       <dc:identifier id="texi-uid">texinfo:formatting</dc:identifier>
       <dc:title>title -a</dc:title>
       <dc:language>en</dc:language>
-      <dc:creator>author1 -a with accents in name Te'c,a</dc:creator>
+      <dc:creator>author1 -a with accents in name Téça</dc:creator>
       <dc:creator>author2 -a</dc:creator>
       <dc:creator>author</dc:creator>
    </metadata>
diff --git 
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/formatting.opf
 
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/formatting.opf
index 41d4e98a7f..94fa5a55a6 100644
--- 
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/formatting.opf
+++ 
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/formatting.opf
@@ -4,7 +4,7 @@
       <dc:identifier id="texi-uid">texinfo:formatting</dc:identifier>
       <dc:title>title -a</dc:title>
       <dc:language>en</dc:language>
-      <dc:creator>author1 -a with accents in name Te'c,a</dc:creator>
+      <dc:creator>author1 -a with accents in name Téça</dc:creator>
       <dc:creator>author2 -a</dc:creator>
       <dc:creator>author</dc:creator>
    </metadata>
diff --git a/tp/tests/test_scripts/formatting_non_ascii_test_latex.sh 
b/tp/tests/test_scripts/formatting_non_ascii_test_latex.sh
new file mode 100755
index 0000000000..fe199f2e09
--- /dev/null
+++ b/tp/tests/test_scripts/formatting_non_ascii_test_latex.sh
@@ -0,0 +1,19 @@
+#! /bin/sh
+# This file generated by maintain/regenerate_cmd_tests.sh
+
+if test z"$srcdir" = "z"; then
+  srcdir=.
+fi
+
+one_test_logs_dir=test_log
+
+
+dir=formatting
+name='non_ascii_test_latex'
+mkdir -p $dir
+
+"$srcdir"/run_parser_all.sh -dir $dir $name
+exit_status=$?
+cat $dir/$one_test_logs_dir/$name.log
+exit $exit_status
+



reply via email to

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