texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert):


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): associate end space to the last empty argument if possible.
Date: Sat, 10 Dec 2022 06:15:29 -0500

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

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new f2f10a3bdc * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): associate 
end space to the last empty argument if possible.
f2f10a3bdc is described below

commit f2f10a3bdc3788eae10624d580faa3d2c27b0d3d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Dec 10 12:12:21 2022 +0100

    * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): associate end
    space to the last empty argument if possible.
    
    * tp/t/27float.t: add XML output format to the tests.
---
 ChangeLog                                          |   7 +
 tp/TODO                                            |   3 +
 tp/Texinfo/Convert/TexinfoMarkup.pm                |  16 +-
 tp/t/27float.t                                     |   1 +
 tp/t/results/float/anchor_in_caption.pl            |  11 ++
 tp/t/results/float/cindex_in_caption.pl            |  16 ++
 .../results/float/comment_space_comand_in_float.pl |  10 +
 tp/t/results/float/complex_float.pl                | 130 +++++++++++++
 tp/t/results/float/empty_caption.pl                |  18 ++
 tp/t/results/float/empty_label_no_space.pl         |   5 +
 tp/t/results/float/empty_label_no_space_comment.pl |   5 +
 tp/t/results/float/empty_label_with_space.pl       |   5 +
 .../float/empty_label_with_space_comment.pl        |   5 +
 tp/t/results/float/empty_listoffloats.pl           |   4 +
 .../float/empty_listoffloats_with_floats.pl        |  23 +++
 tp/t/results/float/float_copying.pl                |  48 +++++
 tp/t/results/float/float_with_at_commands.pl       |  12 ++
 tp/t/results/float/footnote_in_caption.pl          |  11 ++
 .../results/float/footnote_in_caption_and_error.pl |  11 ++
 tp/t/results/float/listoffloats_with_commands.pl   |   4 +
 .../float/numbering_captions_listoffloats.pl       | 210 +++++++++++++++++++++
 tp/t/results/float/ref_to_float.pl                 |  14 ++
 tp/t/results/float/simple.pl                       |   7 +
 23 files changed, 571 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8884eacec4..c5be2113ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-12-10  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): associate end
+       space to the last empty argument if possible.
+
+       * tp/t/27float.t: add XML output format to the tests.
+
 2022-12-07  Gavin Smith  <gavinsmith0123@gmail.com>
 
        * install-info/install-info.c (error): Declare as static to
diff --git a/tp/TODO b/tp/TODO
index d68ff237f2..88b8603a97 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -13,6 +13,9 @@ Before next release
 Bugs
 ====
 
+check float type normalization, cf float comment_space_comand_in_float test
+Test form feed in float label
+
 HTML API
 ========
 
diff --git a/tp/Texinfo/Convert/TexinfoMarkup.pm 
b/tp/Texinfo/Convert/TexinfoMarkup.pm
index 2462789d28..6b39c4b17c 100644
--- a/tp/Texinfo/Convert/TexinfoMarkup.pm
+++ b/tp/Texinfo/Convert/TexinfoMarkup.pm
@@ -1334,12 +1334,18 @@ sub _convert($$;$)
                                    
.$self->txi_markup_close_element($format_element);
                 $last_empty_element = undef;
               } else {
-                $result .= $end_space;
                 if ($arg_index > 0) {
-                  # we keep the last empty argument to be able to prepend it 
to be able
-                  # to reconstitute trailing empty arguments in the original 
Texinfo code.
-                  $last_empty_element = 
$self->txi_markup_open_element($format_element)
-                                
.$self->txi_markup_close_element($format_element);
+                  if ($end_space ne '') {
+                    push @$spaces, ['spaces', $end_space];
+                  }
+                  # we keep the last empty argument to be able to prepend
+                  # it to be able to reconstitute trailing empty arguments
+                  # in the original Texinfo code.
+                  $last_empty_element
+                     = $self->txi_markup_open_element($format_element, $spaces)
+                              
.$self->txi_markup_close_element($format_element);
+                } else {
+                  $result .= $end_space;
                 }
               }
               $arg_index++;
diff --git a/tp/t/27float.t b/tp/t/27float.t
index b4a2963f39..668606fb2d 100644
--- a/tp/t/27float.t
+++ b/tp/t/27float.t
@@ -556,6 +556,7 @@ foreach my $test (@test_cases) {
     push @{$test->[2]->{'test_formats'}}, 'info';
   }
   push @{$test->[2]->{'test_formats'}}, 'html';
+  push @{$test->[2]->{'test_formats'}}, 'xml';
   $test->[2]->{'full_document'} = 1 unless 
(exists($test->[2]->{'full_document'}));
 }
 
diff --git a/tp/t/results/float/anchor_in_caption.pl 
b/tp/t/results/float/anchor_in_caption.pl
index 8fca009ef7..440bffdfac 100644
--- a/tp/t/results/float/anchor_in_caption.pl
+++ b/tp/t/results/float/anchor_in_caption.pl
@@ -406,4 +406,15 @@ $result_converted_errors{'html'}->{'anchor_in_caption'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'anchor_in_caption'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename></node>
+
+<listoffloats type="fl" spaces=" ">fl</listoffloats>
+
+<float name="label" type="fl" number="1" spaces=" " endspaces=" 
"><floattype>fl</floattype><floatname spaces=" ">label</floatname>
+<para>In float.
+</para><caption><para>in caption<anchor name="in-anchor">in 
anchor</anchor></para></caption>
+</float>
+';
+
 1;
diff --git a/tp/t/results/float/cindex_in_caption.pl 
b/tp/t/results/float/cindex_in_caption.pl
index c0da0b2e49..6a7ca21bc2 100644
--- a/tp/t/results/float/cindex_in_caption.pl
+++ b/tp/t/results/float/cindex_in_caption.pl
@@ -517,4 +517,20 @@ $result_converted_errors{'html'}->{'cindex_in_caption'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'cindex_in_caption'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename></node>
+
+<listoffloats type="fl" spaces=" ">fl</listoffloats>
+
+<float name="label" type="fl" number="1" spaces=" " endspaces=" 
"><floattype>fl</floattype><floatname spaces=" ">label</floatname>
+<para>In float.
+</para><caption><para>in caption
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">index 
entry</indexterm></cindex>
+</para></caption>
+</float>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+
+';
+
 1;
diff --git a/tp/t/results/float/comment_space_comand_in_float.pl 
b/tp/t/results/float/comment_space_comand_in_float.pl
index 7389dabda6..006579a740 100644
--- a/tp/t/results/float/comment_space_comand_in_float.pl
+++ b/tp/t/results/float/comment_space_comand_in_float.pl
@@ -381,4 +381,14 @@ 
$result_converted_errors{'html'}->{'comment_space_comand_in_float'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'comment_space_comand_in_float'} = '<node 
name="Top" spaces=" "><nodename>Top</nodename></node>
+
+<float name="label-" type="Text @ " number="1" spaces=" " endspaces=" 
"><floattype>Text <spacecmd type="spc"/></floattype><floatname spaces=" ">label 
<spacecmd type="spc"/></floatname><!-- c float -->
+<para>Float
+</para></float>
+
+<listoffloats type="Text @ " spaces=" ">Text <spacecmd 
type="spc"/></listoffloats><!-- c listoffloats -->
+';
+
 1;
diff --git a/tp/t/results/float/complex_float.pl 
b/tp/t/results/float/complex_float.pl
index 9985d3de62..f2a9f9ecee 100644
--- a/tp/t/results/float/complex_float.pl
+++ b/tp/t/results/float/complex_float.pl
@@ -4087,4 +4087,134 @@ A footnote 2.
 </html>
 ';
 
+
+$result_converted{'xml'}->{'complex_float'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename><nodenext automatic="on">chapter</nodenext></node>
+<top spaces=" "><sectiontitle>Test floats</sectiontitle>
+
+<para>A list of floats at the beginning.
+</para><listoffloats type="Text" spaces=" ">Text</listoffloats>
+
+<para>After the listoffloats.
+</para><menu endspaces=" ">
+<menuentry><menuleadingtext>* 
</menuleadingtext><menunode>chapter</menunode><menuseparator>::</menuseparator><menudescription><pre
 xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+<float name="text-with-a-lot-of-features" type="Text" number="1" spaces=" " 
endspaces=" "><floattype>Text</floattype><floatname spaces=" ">text with a lot 
of features</floatname>
+<para>An example of float &enddots;
+</para>
+<!-- c makeinfo -docbook segfaults -->
+
+<para>An index entry
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">float 
example</indexterm></cindex>
+</para>
+<para>A table.
+</para><table commandarg="emph" spaces=" " endspaces=" ">
+<tableentry><tableterm><item spaces=" "><itemformat command="emph">truc 
</itemformat></item>
+</tableterm><tableitem><para>line
+</para></tableitem></tableentry></table>
+
+<para>An itemize.
+</para><itemize commandarg="minus" spaces=" " endspaces=" 
"><itemprepend><formattingcommand command="minus"/></itemprepend>
+<listitem><prepend>&minus;</prepend> <para>truc 
+line
+</para></listitem></itemize>
+
+<para>A ref.
+<xref label="Top"><xrefnodename>Top</xrefnodename><xrefinfoname>xref Text with 
features</xrefinfoname></xref>.
+A footnote.
+<footnote><para>footnote Text with features</para></footnote>.
+</para>
+<para>&tex; and <emph><b>t<accent type="acute" 
bracketed="off">e</accent><accent 
type="circ"><dotless>i</dotless></accent></b><url><urefurl>an_url</urefurl></url></emph>
 <sc>and</sc> <verb delimiter="!">it is @verb</verb> <spacecmd type="spc"/>a 
wo&hyphenbreak;rd &eosexcl;&arobase; &AElig;.
+</para>
+<caption spaces=" "><para>An example of float caption&enddots;
+An example.
+</para><example endspaces=" "> 
+<pre xml:space="preserve">example
+</pre></example>
+
+<anchor name="Anchor-in-caption">Anchor in caption</anchor>
+
+<para>A table.
+</para><table commandarg="emph" spaces=" " endspaces=" ">
+<tableentry><tableterm><item spaces=" "><itemformat command="emph">truc 
</itemformat></item>
+</tableterm><tableitem><para>line
+</para></tableitem></tableentry></table>
+
+<para>A multitable.
+</para><multitable spaces=" " endspaces=" "><columnprototypes><columnprototype 
bracketed="on">truc</columnprototype> <columnprototype 
bracketed="on">bidule</columnprototype></columnprototypes>
+<tbody><row><entry command="item"> <para>truc </para></entry><entry 
command="tab"> <para>bidule
+</para></entry></row><row><entry command="item"> <para>truc 
</para></entry><entry command="tab"> <para>bidule
+</para></entry></row></tbody></multitable>
+<para>An index entry
+<cindex index="cp" spaces=" "><indexterm index="cp" number="2">float example 
in caption</indexterm></cindex>
+</para>
+<para>An itemize.
+</para><itemize commandarg="minus" spaces=" " endspaces=" 
"><itemprepend><formattingcommand command="minus"/></itemprepend>
+<listitem><prepend>&minus;</prepend> <para>truc 
+line
+</para></listitem></itemize>
+
+<para>A ref.
+<xref label="Top"><xrefnodename>Top</xrefnodename><xrefinfoname>xref Text with 
features caption</xrefinfoname></xref>.
+A footnote.
+<footnote><para>footnote Text with features caption</para></footnote>.
+</para>
+<para>&tex; and <emph><b>t<accent type="acute" 
bracketed="off">e</accent><accent 
type="circ"><dotless>i</dotless></accent></b><url><urefurl>an_url</urefurl></url></emph>
 <sc>and</sc> <verb delimiter="!">it is @verb</verb> <spacecmd type="spc"/>a 
wo&hyphenbreak;rd &eosexcl;&arobase; &AElig;.
+</para></caption>
+
+<shortcaption><para>&tex; and <emph><b>t<accent type="acute" 
bracketed="off">e</accent><accent 
type="circ"><dotless>i</dotless></accent></b><url><urefurl>an_url</urefurl></url></emph>
 <sc>and</sc> <verb delimiter="!">it is @verb</verb> <spacecmd type="spc"/>a 
wo&hyphenbreak;rd &eosexcl;&arobase; &AElig;.</para></shortcaption>
+
+</float>
+
+</top>
+<node name="chapter" spaces=" "><nodename>chapter</nodename><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>A chapter</sectiontitle>
+
+<float name="float-with-a-lot-of-features-and-no-shortcaption" type="Text" 
number="1.1" spaces=" " endspaces=" "><floattype>Text</floattype><floatname 
spaces=" ">float with a lot of features and no shortcaption</floatname>
+
+<para>Float text of a float with a lot of features.
+</para>
+<caption spaces=" "><para>An example of float caption&enddots; 2
+An example 2.
+</para><example endspaces=" "> 
+<pre xml:space="preserve">example 2
+</pre></example>
+
+<para>A table 2.
+</para><table commandarg="emph" spaces=" " endspaces=" ">
+<tableentry><tableterm><item spaces=" "><itemformat command="emph">truc 2 
</itemformat></item>
+</tableterm><tableitem><para>line 2
+</para></tableitem></tableentry></table>
+
+<para>A multitable 2.
+</para><multitable spaces=" " endspaces=" "><columnprototypes><columnprototype 
bracketed="on">truc</columnprototype> <columnprototype 
bracketed="on">bidule</columnprototype></columnprototypes>
+<tbody><row><entry command="item"> <para>truc 2 </para></entry><entry 
command="tab"> <para>bidule
+</para></entry></row><row><entry command="item"> <para>truc 2 
</para></entry><entry command="tab"> <para>bidule
+</para></entry></row></tbody></multitable>
+<para>An index entry 2
+<cindex index="cp" spaces=" "><indexterm index="cp" number="3">float example 
in caption 2</indexterm></cindex>
+</para>
+<para>An itemize 2.
+</para><itemize commandarg="minus" spaces=" " endspaces=" 
"><itemprepend><formattingcommand command="minus"/></itemprepend>
+<listitem><prepend>&minus;</prepend> <para>truc 2
+line
+</para></listitem></itemize>
+
+<anchor name="Anchor-in-caption-2">Anchor in caption 2</anchor>
+
+<para>A ref 2.
+<xref label="Top"><xrefnodename>Top</xrefnodename><xrefinfoname>xref Text with 
features caption</xrefinfoname></xref>.
+A footnote 2.
+<footnote><para>footnote Text with features caption 2</para></footnote>.
+</para>
+<para>&tex; and <emph><b>t<accent type="acute" 
bracketed="off">e</accent><accent 
type="circ"><dotless>i</dotless></accent></b><url><urefurl>an_url</urefurl></url></emph>
 <sc>and</sc> <verb delimiter="!">it is @verb</verb> <spacecmd type="spc"/>a 
wo&hyphenbreak;rd &eosexcl;&arobase; &AElig;.
+</para></caption>
+
+</float>
+
+<para><xref label="text-with-a-lot-of-features"><xrefnodename>text with a lot 
of features</xrefnodename></xref>.
+</para>
+</chapter>
+';
+
 1;
diff --git a/tp/t/results/float/empty_caption.pl 
b/tp/t/results/float/empty_caption.pl
index 9f9ac72d02..c8091d33d5 100644
--- a/tp/t/results/float/empty_caption.pl
+++ b/tp/t/results/float/empty_caption.pl
@@ -512,4 +512,22 @@ $result_converted_errors{'html'}->{'empty_caption'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'empty_caption'} = '<float name="b" type="a" 
number="1" spaces=" " endspaces=" "><floattype>a</floattype><floatname spaces=" 
">b</floatname>
+<para>In float A, B
+</para><caption></caption>
+</float>
+
+<float name="c" type="" number="1" spaces=" " endspaces=" "><floatname 
spaces=" ">c</floatname>
+<para>In float , C
+</para><shortcaption></shortcaption>
+</float>
+
+<float type="" endspaces=" ">
+<para>In float
+</para><shortcaption></shortcaption>
+<caption></caption>
+</float>
+';
+
 1;
diff --git a/tp/t/results/float/empty_label_no_space.pl 
b/tp/t/results/float/empty_label_no_space.pl
index 9a9921005e..1943d4c157 100644
--- a/tp/t/results/float/empty_label_no_space.pl
+++ b/tp/t/results/float/empty_label_no_space.pl
@@ -158,4 +158,9 @@ $result_converted_errors{'html'}->{'empty_label_no_space'} 
= [
 ];
 
 
+
+$result_converted{'xml'}->{'empty_label_no_space'} = '<float type="Type" 
spaces=" " endspaces=" "><floattype>Type</floattype><floatname></floatname>
+</float>
+';
+
 1;
diff --git a/tp/t/results/float/empty_label_no_space_comment.pl 
b/tp/t/results/float/empty_label_no_space_comment.pl
index bb6110f147..24688d152a 100644
--- a/tp/t/results/float/empty_label_no_space_comment.pl
+++ b/tp/t/results/float/empty_label_no_space_comment.pl
@@ -172,4 +172,9 @@ 
$result_converted_errors{'html'}->{'empty_label_no_space_comment'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'empty_label_no_space_comment'} = '<float 
type="Type" spaces=" " endspaces=" 
"><floattype>Type</floattype><floatname></floatname><!-- c comment -->
+</float>
+';
+
 1;
diff --git a/tp/t/results/float/empty_label_with_space.pl 
b/tp/t/results/float/empty_label_with_space.pl
index baaa7dbc99..be3ae79c25 100644
--- a/tp/t/results/float/empty_label_with_space.pl
+++ b/tp/t/results/float/empty_label_with_space.pl
@@ -158,4 +158,9 @@ 
$result_converted_errors{'html'}->{'empty_label_with_space'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'empty_label_with_space'} = '<float type="Type" 
spaces=" " endspaces=" "><floattype>Type</floattype><floatname spaces=" 
"></floatname>
+</float>
+';
+
 1;
diff --git a/tp/t/results/float/empty_label_with_space_comment.pl 
b/tp/t/results/float/empty_label_with_space_comment.pl
index 76358260cc..e22d9e185c 100644
--- a/tp/t/results/float/empty_label_with_space_comment.pl
+++ b/tp/t/results/float/empty_label_with_space_comment.pl
@@ -173,4 +173,9 @@ 
$result_converted_errors{'html'}->{'empty_label_with_space_comment'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'empty_label_with_space_comment'} = '<float 
type="Type" spaces=" " endspaces=" "><floattype>Type</floattype><floatname 
spaces=" "></floatname><!-- c comment -->
+</float>
+';
+
 1;
diff --git a/tp/t/results/float/empty_listoffloats.pl 
b/tp/t/results/float/empty_listoffloats.pl
index ccd468a220..8b972b7808 100644
--- a/tp/t/results/float/empty_listoffloats.pl
+++ b/tp/t/results/float/empty_listoffloats.pl
@@ -93,4 +93,8 @@ $result_converted_errors{'html'}->{'empty_listoffloats'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'empty_listoffloats'} = '<listoffloats 
type=""></listoffloats>
+';
+
 1;
diff --git a/tp/t/results/float/empty_listoffloats_with_floats.pl 
b/tp/t/results/float/empty_listoffloats_with_floats.pl
index 8e3dde2094..9571b5cd6b 100644
--- a/tp/t/results/float/empty_listoffloats_with_floats.pl
+++ b/tp/t/results/float/empty_listoffloats_with_floats.pl
@@ -595,4 +595,27 @@ 
$result_converted_errors{'html'}->{'empty_listoffloats_with_floats'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'empty_listoffloats_with_floats'} = 
'<preamblebeforebeginning>
+</preamblebeforebeginning><float name="label1" type="" number="1" spaces=" " 
endspaces=" "><floatname spaces=" ">label1</floatname>
+<para>Label no caption.
+</para></float>
+
+<float name="label2" type="" number="2" spaces=" " endspaces=" "><floatname 
spaces=" ">label2</floatname>
+<para>Label and caption.
+</para><caption><para>caption with label</para></caption>
+</float>
+
+<float type="" endspaces=" ">
+<para>no label no caption
+</para></float>
+
+<float type="" endspaces=" ">
+<para>no label caption
+</para><caption><para>caption no label</para></caption>
+</float>
+
+<listoffloats type=""></listoffloats>
+';
+
 1;
diff --git a/tp/t/results/float/float_copying.pl 
b/tp/t/results/float/float_copying.pl
index 01425a4577..405cf11dd4 100644
--- a/tp/t/results/float/float_copying.pl
+++ b/tp/t/results/float/float_copying.pl
@@ -1568,4 +1568,52 @@ the author abandon his copyright.
 </html>
 ';
 
+
+$result_converted{'xml'}->{'float_copying'} = '<copying endspaces=" ">
+
+<float name="public-domain" type="Copyright notice" number="1" spaces=" " 
endspaces=" "><floattype>Copyright notice</floattype><floatname spaces=" 
">public domain</floatname>
+
+<para>Public domain is not really a licence, as it means than
+the author abandon his copyright.
+</para>
+<caption><para>The Public Domain notice<footnote spaces="\\n"><para>The 
caption copying footnote
+<anchor name="caption-copying-footnote-anchor">caption copying footnote 
anchor</anchor>
+</para>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">indexed caption 
copying footnote</indexterm></cindex>
+<findex index="fn" spaces=" "><indexterm index="fn" number="1">public domain 
function</indexterm></findex>
+
+<para>see <ref label="Copying-and-floats"><xrefnodename>Copying and 
floats</xrefnodename></ref>.
+</para>
+</footnote>
+</para>
+<anchor name="public-domain-anchor">public domain anchor</anchor>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="2">indexed 
caption</indexterm></cindex>
+<findex index="fn" spaces=" "><indexterm index="fn" number="2">indexed caption 
function</indexterm></findex>
+</caption>
+</float>
+</copying>
+
+<node name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">Copying and floats</nodenext></node>
+<top spaces=" "><sectiontitle>Top</sectiontitle>
+
+<insertcopying></insertcopying>
+
+<menu endspaces=" ">
+<menuentry><menuleadingtext>* </menuleadingtext><menunode>Copying and 
floats</menunode><menuseparator>::</menuseparator><menudescription><pre 
xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+</top>
+<node name="Copying-and-floats" spaces=" "><nodename>Copying and 
floats</nodename><nodeprev automatic="on">Top</nodeprev><nodeup 
automatic="on">Top</nodeup></node>
+<appendix spaces=" "><sectiontitle>Copying and floats</sectiontitle>
+
+<insertcopying></insertcopying>
+<insertcopying></insertcopying>
+
+<listoffloats type="Copyright notice" spaces=" ">Copyright 
notice</listoffloats>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+<printindex spaces=" " value="fn" line="fn"></printindex>
+</appendix>
+';
+
 1;
diff --git a/tp/t/results/float/float_with_at_commands.pl 
b/tp/t/results/float/float_with_at_commands.pl
index 0937282517..b829daabe0 100644
--- a/tp/t/results/float/float_with_at_commands.pl
+++ b/tp/t/results/float/float_with_at_commands.pl
@@ -497,4 +497,16 @@ 
$result_converted_errors{'html'}->{'float_with_at_commands'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'float_with_at_commands'} = '<float 
name="premi_00e8re-entr_00e9e" type="entr@\'ee" number="1" spaces=" " 
endspaces=" "><floattype>entr<accent type="acute" 
bracketed="off">e</accent>e</floattype><floatname spaces=" ">premi<accent 
type="grave" bracketed="off">e</accent>re entr<accent type="acute" 
bracketed="off">e</accent>e</floatname>
+
+<para>Ceci est notre premi<accent type="grave" bracketed="off">e</accent>re 
entr<accent type="acute" bracketed="off">e</accent>e.
+</para><caption><para>La premi<accent type="grave" 
bracketed="off">e</accent>re entr<accent type="acute" 
bracketed="off">e</accent>e est importante</para></caption>
+
+</float>
+
+
+<listoffloats type="entr@\'ee" spaces=" ">entr<accent type="acute" 
bracketed="off">e</accent>e</listoffloats>
+';
+
 1;
diff --git a/tp/t/results/float/footnote_in_caption.pl 
b/tp/t/results/float/footnote_in_caption.pl
index 9c372d0aeb..76ed612f85 100644
--- a/tp/t/results/float/footnote_in_caption.pl
+++ b/tp/t/results/float/footnote_in_caption.pl
@@ -423,4 +423,15 @@ $result_converted_errors{'html'}->{'footnote_in_caption'} 
= [
 ];
 
 
+
+$result_converted{'xml'}->{'footnote_in_caption'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename></node>
+
+<listoffloats type="fl" spaces=" ">fl</listoffloats>
+
+<float name="label" type="fl" number="1" spaces=" " endspaces=" 
"><floattype>fl</floattype><floatname spaces=" ">label</floatname>
+<para>In float.
+</para><caption><para>in caption<footnote><para>in 
footnote</para></footnote></para></caption>
+</float>
+';
+
 1;
diff --git a/tp/t/results/float/footnote_in_caption_and_error.pl 
b/tp/t/results/float/footnote_in_caption_and_error.pl
index 7d9682ee48..c0e007f6b1 100644
--- a/tp/t/results/float/footnote_in_caption_and_error.pl
+++ b/tp/t/results/float/footnote_in_caption_and_error.pl
@@ -407,4 +407,15 @@ 
$result_converted_errors{'html'}->{'footnote_in_caption_and_error'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'footnote_in_caption_and_error'} = '<node 
name="Top" spaces=" "><nodename>Top</nodename></node>
+
+<listoffloats type="fl" spaces=" ">fl</listoffloats>
+
+<float name="label" type="fl" number="1" spaces=" " endspaces=" 
"><floattype>fl</floattype><floatname spaces=" ">label</floatname>
+<para>In float.
+</para><caption><para>in caption<footnote><para>in footnote 
&errorglyph;</para></footnote></para></caption>
+</float>
+';
+
 1;
diff --git a/tp/t/results/float/listoffloats_with_commands.pl 
b/tp/t/results/float/listoffloats_with_commands.pl
index f1a3990726..75726c90f5 100644
--- a/tp/t/results/float/listoffloats_with_commands.pl
+++ b/tp/t/results/float/listoffloats_with_commands.pl
@@ -155,4 +155,8 @@ 
$result_converted_errors{'html'}->{'listoffloats_with_commands'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'listoffloats_with_commands'} = '<listoffloats 
type="th@\'eor@`eme" spaces=" ">th<accent type="acute" 
bracketed="off">e</accent>or<accent type="grave" 
bracketed="off">e</accent>me</listoffloats>
+';
+
 1;
diff --git a/tp/t/results/float/numbering_captions_listoffloats.pl 
b/tp/t/results/float/numbering_captions_listoffloats.pl
index d5f6e984b3..6864cf2910 100644
--- a/tp/t/results/float/numbering_captions_listoffloats.pl
+++ b/tp/t/results/float/numbering_captions_listoffloats.pl
@@ -7018,4 +7018,214 @@ See <a class="xref" 
href="#text-with-a-lot-of-features">Text 1</a>.
 </html>
 ';
 
+
+$result_converted{'xml'}->{'numbering_captions_listoffloats'} = '<node 
name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">chapter</nodenext></node>
+<top spaces=" "><sectiontitle>Test floats</sectiontitle>
+
+<float name="text-with-a-lot-of-features" type="Text" number="1" spaces=" " 
endspaces=" "><floattype>Text</floattype><floatname spaces=" ">text with a lot 
of features</floatname>
+
+<caption spaces=" "><para>An example of float caption&enddots;</para></caption>
+<shortcaption><para>&tex; and someething</para></shortcaption>
+</float>
+
+<float type="Text" spaces=" " endspaces=" "><floattype>Text</floattype>
+<para>No label but caption and shortcaption.
+</para>
+<caption><para>C No label</para></caption>
+<shortcaption><para>SC No label</para></shortcaption>
+</float>
+
+<float name="label-but-no-type" type="" number="1" spaces=" " endspaces=" 
"><floatname>label but no type</floatname>
+<para>No type but caption and shortcaption.
+</para>
+<caption><para>C No type</para></caption>
+<shortcaption><para>SC No type</para></shortcaption>
+</float>
+
+
+<float name="label-but-no-type-and-no-caption" type="" number="2" spaces=" " 
endspaces=" "><floatname>label but no type and no caption</floatname>
+<para>No type but label and no caption nor shortcaption.
+</para>
+</float>
+
+
+<float type="" endspaces=" ">
+<para>No label, no type, no caption no shortcaption.
+</para>
+</float>
+
+<float type="" endspaces=" ">
+<para>No label, no type, but caption and shortcaption.
+</para><caption><para>C No label, no type, but caption and 
shortcaption.</para></caption>
+<shortcaption><para>SC No label, no type, but caption and 
shortcaption.</para></shortcaption>
+</float>
+
+<float name="label-but-no-type-2" type="" number="3" spaces=" " endspaces=" 
"><floatname>label but no type 2</floatname>
+<para>Second float with no type.
+</para>
+<caption><para>C No type 2</para></caption>
+<shortcaption><para>SC No type 2</para></shortcaption>
+</float>
+
+<float name="warning-in-top" type="Warning" number="1" spaces=" " endspaces=" 
"><floattype>Warning</floattype><floatname spaces=" ">warning in top</floatname>
+<para>A warning
+</para>
+<caption><para>C A warning</para></caption>
+<shortcaption><para>SC A warning</para></shortcaption>
+</float>
+
+<menu endspaces=" ">
+<menuentry><menuleadingtext>* 
</menuleadingtext><menunode>chapter</menunode><menuseparator>::</menuseparator><menudescription><pre
 xml:space="preserve">
+</pre></menudescription></menuentry><menuentry><menuleadingtext>* 
</menuleadingtext><menunode>Unnumbered</menunode><menuseparator>::</menuseparator><menudescription><pre
 xml:space="preserve">
+</pre></menudescription></menuentry><menuentry><menuleadingtext>* 
</menuleadingtext><menunode>Chapter with 
unnumbsubsec</menunode><menuseparator>::</menuseparator><menudescription><pre 
xml:space="preserve">
+</pre></menudescription></menuentry><menuentry><menuleadingtext>* 
</menuleadingtext><menunode>Appendix for 
float</menunode><menuseparator>::</menuseparator><menudescription><pre 
xml:space="preserve">
+</pre></menudescription></menuentry><menuentry><menuleadingtext>* 
</menuleadingtext><menunode>list of 
floats</menunode><menuseparator>::</menuseparator><menudescription><pre 
xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+</top>
+<node name="chapter" spaces=" "><nodename>chapter</nodename><nodenext 
automatic="on">Unnumbered</nodenext><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>A chapter</sectiontitle>
+
+<float name="text-in-chapter" type="Text" number="1.1" spaces=" " endspaces=" 
"><floattype>Text</floattype><floatname spaces=" ">text in chapter</floatname>
+<para>Text in chapter
+</para>
+<caption><para>C Text in chapter</para></caption>
+</float>
+
+<float name="float-with-a-lot-of-features-and-no-shortcaption" type="Text" 
number="1.2" spaces=" " endspaces=" "><floattype>Text</floattype><floatname 
spaces=" ">float with a lot of features and no shortcaption</floatname>
+<caption spaces=" "><para>An example of float caption, no 
shortcaption&enddots;</para></caption>
+</float>
+
+<float name="theoreme" type="th@\'eor@`eme" number="1.1" spaces=" " 
endspaces=" "><floattype>th<accent type="acute" 
bracketed="off">e</accent>or<accent type="grave" 
bracketed="off">e</accent>me</floattype><floatname spaces=" 
">theoreme</floatname>
+<para>A th<accent type="acute" bracketed="off">e</accent>or<accent 
type="grave" bracketed="off">e</accent>me
+</para>
+<caption><para>C A th<accent type="acute" bracketed="off">e</accent>or<accent 
type="grave" bracketed="off">e</accent>me</para></caption>
+</float>
+
+<float name="label-but-no-type-in-chapter" type="" number="1.1" spaces=" " 
endspaces=" "><floatname>label but no type in chapter</floatname>
+<para>float with no type.
+</para>
+<caption><para>C No type in chapter</para></caption>
+<shortcaption><para>SC No type in chapter</para></shortcaption>
+</float>
+
+<float name="warning-in-chapter" type="Warning" number="1.1" spaces=" " 
endspaces=" "><floattype>Warning</floattype><floatname spaces=" ">warning in 
chapter</floatname>
+<para>A warning
+</para>
+<caption><para>C A warning in chapter</para></caption>
+<shortcaption><para>SC A warning in chapter</para></shortcaption>
+</float>
+
+<menu endspaces=" ">
+<menuentry><menuleadingtext>* 
</menuleadingtext><menunode>section</menunode><menuseparator>::</menuseparator><menudescription><pre
 xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+<node name="section" spaces=" "><nodename>section</nodename><nodeup 
automatic="on">chapter</nodeup></node>
+<section spaces=" "><sectiontitle>A section</sectiontitle>
+
+<float name="text-in-section" type="Text" number="1.3" spaces=" " endspaces=" 
"><floattype>Text</floattype><floatname spaces=" ">text in section</floatname>
+
+<para>A text in float no caption a label a type.
+</para>
+</float>
+
+</section>
+</chapter>
+<node name="Unnumbered" spaces=" "><nodename>Unnumbered</nodename><nodenext 
automatic="on">Chapter with unnumbsubsec</nodenext><nodeprev 
automatic="on">chapter</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<unnumbered spaces=" "><sectiontitle>Unnumbered</sectiontitle>
+
+<menu endspaces=" ">
+<menuentry><menuleadingtext>* </menuleadingtext><menunode>Section within 
unnumbered</menunode><menuseparator>::</menuseparator><menudescription><pre 
xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+<float name="unnumbered-float" type="Text" number="5" spaces=" " endspaces=" 
"><floattype>Text</floattype><floatname spaces=" ">unnumbered float</floatname>
+<para>unnum
+</para><shortcaption><para>SC unnumbered float</para></shortcaption>
+<caption><para>C unnumbered float</para></caption>
+</float>
+<float name="label-but-no-type-in-unnumbered" type="" number="5" spaces=" " 
endspaces=" "><floatname>label but no type in unnumbered</floatname>
+<para>float with no type.
+</para>
+<caption><para>C No type in unnumbered</para></caption>
+<shortcaption><para>SC No type in unnumbered</para></shortcaption>
+</float>
+
+
+<node name="Section-within-unnumbered" spaces=" "><nodename>Section within 
unnumbered</nodename><nodeup automatic="on">Unnumbered</nodeup></node>
+<section spaces=" "><sectiontitle>Section within unnumbered</sectiontitle>
+
+
+<float name="Section-within-unnumbered-float" type="Text" number="6" spaces=" 
" endspaces=" "><floattype>Text</floattype><floatname spaces=" ">Section within 
unnumbered float</floatname>
+<para>Section within unnumbered
+</para><shortcaption><para>SC Section within unnumbered</para></shortcaption>
+<caption><para>C Section within unnumbered</para></caption>
+</float>
+
+</section>
+</unnumbered>
+<node name="Chapter-with-unnumbsubsec" spaces=" "><nodename>Chapter with 
unnumbsubsec</nodename><nodenext automatic="on">Appendix for 
float</nodenext><nodeprev automatic="on">Unnumbered</nodeprev><nodeup 
automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Chapter with unnumbsubsec</sectiontitle>
+
+<menu endspaces=" ">
+<menuentry><menuleadingtext>* </menuleadingtext><menunode>unnumbered 
sec</menunode><menuseparator>::</menuseparator><menudescription><pre 
xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+<float name="Chapter-with-subsec-float" type="Text" number="2.1" spaces=" " 
endspaces=" "><floattype>Text</floattype><floatname spaces=" ">Chapter with 
subsec float</floatname>
+<para>Chap
+</para><shortcaption><para>SC Chapter with subsec</para></shortcaption>
+<caption><para>C Chapter with subsec</para></caption>
+</float>
+
+<node name="unnumbered-sec" spaces=" "><nodename>unnumbered 
sec</nodename><nodeup automatic="on">Chapter with unnumbsubsec</nodeup></node>
+<unnumberedsec spaces=" "><sectiontitle>unnumbered sec</sectiontitle>
+
+<float name="unnumbered-sec-float" type="Text" number="2.2" spaces=" " 
endspaces=" "><floattype>Text</floattype><floatname spaces=" ">unnumbered sec 
float</floatname>
+<para>Chap
+</para><shortcaption><para>SC unnumbered sec float</para></shortcaption>
+<caption><para>C unnumbered sec float</para></caption>
+</float>
+
+<float name="label-but-no-type-in-unnumbered-subsec-in-chapter" type="" 
number="2.1" spaces=" " endspaces=" "><floatname>label but no type in 
unnumbered subsec in chapter</floatname>
+<para>float with no type.
+</para>
+<caption><para>C No type in unnumbered subsec in chapter</para></caption>
+<shortcaption><para>SC No type in unnumbered subsec in 
chapter</para></shortcaption>
+</float>
+
+</unnumberedsec>
+</chapter>
+<node name="Appendix-for-float" spaces=" "><nodename>Appendix for 
float</nodename><nodenext automatic="on">list of floats</nodenext><nodeprev 
automatic="on">Chapter with unnumbsubsec</nodeprev><nodeup 
automatic="on">Top</nodeup></node>
+<appendix spaces=" "><sectiontitle>Appendix for float</sectiontitle>
+
+<float name="appendix-sec-float" type="Text" number="A.1" spaces=" " 
endspaces=" "><floattype>Text</floattype><floatname spaces=" ">appendix sec 
float</floatname>
+
+<para>Appendix
+</para><shortcaption><para>SC appendix sec float</para></shortcaption>
+<caption><para>C appendix sec float</para></caption>
+</float>
+
+</appendix>
+<node name="list-of-floats" spaces=" "><nodename>list of 
floats</nodename><nodeprev automatic="on">Appendix for float</nodeprev><nodeup 
automatic="on">Top</nodeup></node>
+<unnumbered spaces=" "><sectiontitle>list of floats</sectiontitle>
+
+<para>See <ref label="text-in-section"><xrefnodename>text in 
section</xrefnodename></ref>.
+And (<pxref label="text-in-chapter"><xrefnodename>text in 
chapter</xrefnodename></pxref>).
+<xref label="text-with-a-lot-of-features"><xrefnodename>text with a lot of 
features</xrefnodename></xref>.
+</para>
+<para>And now a ref (without manual or printed manual)
+<ref label="text-with-a-lot-of-features"><xrefnodename>text with a lot of 
features</xrefnodename><xrefinfoname spaces=" ">cross 
ref</xrefinfoname><xrefprinteddesc spaces=" ">title</xrefprinteddesc></ref>.
+</para>
+<para>And now a ref (with manual without printed manual)
+<ref label="text-with-a-lot-of-features" manual="manual"><xrefnodename>text 
with a lot of features</xrefnodename><xrefinfoname spaces=" ">cross 
ref</xrefinfoname><xrefprinteddesc spaces=" 
">title</xrefprinteddesc><xrefinfofile spaces=" ">manual</xrefinfofile></ref>.
+</para>
+<para>And now a ref (without manual with a printed manual)
+<ref label="text-with-a-lot-of-features"><xrefnodename>text with a lot of 
features</xrefnodename><xrefinfoname spaces=" ">cross 
ref</xrefinfoname><xrefprinteddesc spaces=" 
">title</xrefprinteddesc><xrefprintedname spaces=" ">printed manual 
title</xrefprintedname></ref>.
+</para>
+<para>A ref to float without type <ref 
label="label-but-no-type"><xrefnodename>label but no type</xrefnodename></ref>.
+</para>
+<listoffloats type="Text" spaces=" ">Text</listoffloats>
+<listoffloats type="th@\'eor@`eme" spaces=" ">th<accent type="acute" 
bracketed="off">e</accent>or<accent type="grave" 
bracketed="off">e</accent>me</listoffloats>
+
+</unnumbered>
+<bye></bye>
+';
+
 1;
diff --git a/tp/t/results/float/ref_to_float.pl 
b/tp/t/results/float/ref_to_float.pl
index a545ed1c6b..28298ae52a 100644
--- a/tp/t/results/float/ref_to_float.pl
+++ b/tp/t/results/float/ref_to_float.pl
@@ -400,4 +400,18 @@ $result_converted_errors{'html'}->{'ref_to_float'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'ref_to_float'} = '<float name="Label1" type="Text" 
number="1" spaces=" " endspaces=" "><floattype>Text</floattype><floatname 
spaces=" ">Label1</floatname>
+<para>Float
+</para></float>
+
+<float name="Label2" type="" number="1" spaces=" " endspaces=" "><floatname 
spaces=" ">Label2</floatname>
+<para>In foat 2.
+</para></float>
+
+<para><ref label="Label1"><xrefnodename>Label1</xrefnodename></ref>
+</para>
+<para><ref label="Label2"><xrefnodename>Label2</xrefnodename></ref>
+</para>';
+
 1;
diff --git a/tp/t/results/float/simple.pl b/tp/t/results/float/simple.pl
index 153ad02e8d..e6c878cb1a 100644
--- a/tp/t/results/float/simple.pl
+++ b/tp/t/results/float/simple.pl
@@ -235,4 +235,11 @@ $result_converted_errors{'html'}->{'simple'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'simple'} = '<float name="Label" type="Type" 
number="1" spaces=" " endspaces=" "><floattype>Type</floattype><floatname 
spaces=" ">Label</floatname>
+
+<para>In float.
+</para><caption><para>Caption.</para></caption>
+</float>';
+
 1;



reply via email to

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