[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), util/texinfo.dtd, util/txixml2texi.pl: add trailing spaces in block commands arguments. |
Date: |
Sat, 10 Dec 2022 10:50:15 -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 0f1efbf0fd * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert),
util/texinfo.dtd, util/txixml2texi.pl: add trailing spaces in block commands
arguments.
0f1efbf0fd is described below
commit 0f1efbf0fddca1ab8cbe8e0dcfae2b4c20e07bb8
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Dec 10 16:42:21 2022 +0100
* tp/Texinfo/Convert/TexinfoMarkup.pm (_convert), util/texinfo.dtd,
util/txixml2texi.pl: add trailing spaces in block commands arguments.
* tp/t/converters_tests.t (@test_cases): add form feeds on @float
line in form_feeds test.
* tp/t/16raw.t: move spurious_arg_on_line, beginning_and_end_on_line
and space_before_end from @test_invalid to @test_cases. Output
XML in @test_cases.
* tp/t/08misc_commands.t: add XML output for
codequoteundirected_codequotebacktick and
comment_space_command_on_line tests.
* tp/t/57invalid_nestings.t: move ignored_text from @test_cases
to @formatted_cases.
* tp/t/30sectioning.t: add XML output for node_up_external_node,
space_in_node and next_no_prev_to_node.
---
ChangeLog | 22 +++
tp/TODO | 1 -
tp/Texinfo/Convert/TexinfoMarkup.pm | 7 +-
tp/t/08misc_commands.t | 2 +
tp/t/16raw.t | 83 ++++-----
tp/t/30sectioning.t | 6 +-
tp/t/57invalid_nestings.t | 12 +-
tp/t/converters_tests.t | 6 +
tp/t/results/converters_tests/form_feeds.pl | 195 +++++++++++++++++++++
tp/t/results/invalid_nestings/ignored_text.pl | 6 +
.../codequoteundirected_codequotebacktick.pl | 146 +++++++++++++++
.../misc_commands/comment_space_command_on_line.pl | 30 ++++
tp/t/results/preformatted/example_multi_class.pl | 2 +-
tp/t/results/raw/beginning_and_end_on_line.pl | 13 ++
tp/t/results/raw/braces_in_tex.pl | 23 +++
tp/t/results/raw/displaymath.pl | 12 ++
tp/t/results/raw/inline_in_example.pl | 13 ++
tp/t/results/raw/inlinefmt.pl | 5 +
tp/t/results/raw/inlineraw.pl | 5 +
tp/t/results/raw/lone_braces_in_html.pl | 10 ++
tp/t/results/raw/misc_raw.pl | 14 ++
tp/t/results/raw/misc_raw_comments.pl | 14 ++
tp/t/results/raw/nested_macros.pl | 8 +
tp/t/results/raw/raw_commands_and_end_of_lines.pl | 88 ++++++++++
tp/t/results/raw/raw_expanded_in_style.pl | 5 +
tp/t/results/raw/raw_in_example.pl | 29 +++
tp/t/results/raw/raw_in_para.pl | 22 +++
tp/t/results/raw/raw_in_style.pl | 7 +
tp/t/results/raw/space_before_end.pl | 19 ++
tp/t/results/raw/spurious_arg_on_line.pl | 19 ++
tp/t/results/raw/verbatim_and_verbatiminclude.pl | 66 +++++++
tp/t/results/raw/verbatim_in_brace_command.pl | 8 +
tp/t/results/sectioning/next_no_prev_to_node.pl | 13 ++
tp/t/results/sectioning/node_up_external_node.pl | 10 ++
tp/t/results/sectioning/space_in_node.pl | 17 ++
tp/t/results/xml_tests/commands_and_spaces.pl | 2 +-
util/texinfo.dtd | 4 +
util/txixml2texi.pl | 4 +
38 files changed, 892 insertions(+), 56 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 09781d6a3e..8996cbd2a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,28 @@
LaTeX \verb command and so that spaces in argument will always be
apparent to the reader.
+2022-12-10 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert), util/texinfo.dtd,
+ util/txixml2texi.pl: add trailing spaces in block commands arguments.
+
+ * tp/t/converters_tests.t (@test_cases): add form feeds on @float
+ line in form_feeds test.
+
+ * tp/t/16raw.t: move spurious_arg_on_line, beginning_and_end_on_line
+ and space_before_end from @test_invalid to @test_cases. Output
+ XML in @test_cases.
+
+ * tp/t/08misc_commands.t: add XML output for
+ codequoteundirected_codequotebacktick and
+ comment_space_command_on_line tests.
+
+ * tp/t/57invalid_nestings.t: move ignored_text from @test_cases
+ to @formatted_cases.
+
+ * tp/t/30sectioning.t: add XML output for node_up_external_node,
+ space_in_node and next_no_prev_to_node.
+
2022-12-10 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): associate end
diff --git a/tp/TODO b/tp/TODO
index 88b8603a97..a159487053 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -14,7 +14,6 @@ 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 6b39c4b17c..7e9071b467 100644
--- a/tp/Texinfo/Convert/TexinfoMarkup.pm
+++ b/tp/Texinfo/Convert/TexinfoMarkup.pm
@@ -1314,18 +1314,19 @@ sub _convert($$;$)
->[$arg_index]);
push @{$self->{'document_context'}->[-1]->{'monospace'}}, 1
if ($in_code);
+ if ($arg_index != 0) {
+ push @$spaces, _leading_spaces_arg($arg_element);
+ }
if ($arg_index+1 eq scalar(@{$element->{'args'}})) {
# last argument
($arg, $end_space, $end_line)
= $self->_convert_argument_and_end_line($element);
} else {
$arg = $self->_convert($arg_element);
+ push @$spaces, _trailing_spaces_arg($arg_element);
}
pop @{$self->{'document_context'}->[-1]->{'monospace'}}
if ($in_code);
- if ($arg_index != 0) {
- push @$spaces, _leading_spaces_arg($arg_element);
- }
}
# must add every variadic argument even if empty to get the
correct count
if ($arg ne '' or scalar(@$spaces) or $variadic_element) {
diff --git a/tp/t/08misc_commands.t b/tp/t/08misc_commands.t
index 97e379b9e3..bc869a3e9e 100644
--- a/tp/t/08misc_commands.t
+++ b/tp/t/08misc_commands.t
@@ -560,6 +560,8 @@ my %info_tests = (
);
my %xml_tests = (
+ 'codequoteundirected_codequotebacktick' => 1,
+ 'comment_space_command_on_line' => 1,
'definfoenclose_with_empty_arg' => 1,
'vskip' => 1,
);
diff --git a/tp/t/16raw.t b/tp/t/16raw.t
index 5ab9c32a25..84bcce6df5 100644
--- a/tp/t/16raw.t
+++ b/tp/t/16raw.t
@@ -342,6 +342,47 @@ after
{'test_formats' => ['html', 'docbook']},
{'HTML_MATH' => 'mathjax'}
],
+['spurious_arg_on_line',
+'
+@tex argt
+in tex
+@end tex
+
+@verbatim argverbatim
+in verbatim
+@end verbatim
+
+@html argh
+in html
+@end html
+',
+{'EXPANDED_FORMATS' => ['tex']}
+],
+['beginning_and_end_on_line',
+'
+@tex in tex @end tex
+
+@verbatim in verbatim @end verbatim
+
+@html in html @end html
+',
+{'EXPANDED_FORMATS' => ['tex']}
+],
+['space_before_end',
+'@tex
+in tex
+ @end tex
+
+@verbatim
+in verbatim
+ @end verbatim
+
+@html
+in html
+ @end html
+',
+{'EXPANDED_FORMATS' => ['tex']}
+],
);
my @test_invalid = (
@@ -389,47 +430,6 @@ in displaymath
['inline_missing_first_arg',
'@inlinefmt{ , aaa}. @inlineraw{, bbb}.
'],
-['spurious_arg_on_line',
-'
-@tex argt
-in tex
-@end tex
-
-@verbatim argverbatim
-in verbatim
-@end verbatim
-
-@html argh
-in html
-@end html
-',
-{'EXPANDED_FORMATS' => ['tex']}
-],
-['beginning_and_end_on_line',
-'
-@tex in tex @end tex
-
-@verbatim in verbatim @end verbatim
-
-@html in html @end html
-',
-{'EXPANDED_FORMATS' => ['tex']}
-],
-['space_before_end',
-'@tex
-in tex
- @end tex
-
-@verbatim
-in verbatim
- @end verbatim
-
-@html
-in html
- @end html
-',
-{'EXPANDED_FORMATS' => ['tex']}
-],
);
my %html_tests = (
@@ -442,6 +442,7 @@ my %html_tests = (
foreach my $test (@test_cases) {
push @{$test->[2]->{'test_formats'}}, 'plaintext';
+ push @{$test->[2]->{'test_formats'}}, 'xml';
if ($html_tests{$test->[0]}) {
push @{$test->[2]->{'test_formats'}}, 'html_text';
}
diff --git a/tp/t/30sectioning.t b/tp/t/30sectioning.t
index 070a36af7c..4a2d2ec698 100644
--- a/tp/t/30sectioning.t
+++ b/tp/t/30sectioning.t
@@ -2110,7 +2110,7 @@ foreach my $test (@test_out_files) {
my @xml_tests_converted_tests = ('section_before_part', 'chapter_before_part',
'part_before_top', 'double_part', 'section_in_unnumbered_plaintext',
'two_unnumbered_no_argument', 'two_nodes_between_chapters',
- 'chapter_before_and_after_part');
+ 'chapter_before_and_after_part', 'node_up_external_node');
my @docbook_tests_converted_tests = ('node_sectop_before_chapter_no_node',
'node_sectop_before_lone_node_Top');
@@ -2149,7 +2149,7 @@ my @xml_tests_info_tests = ('part_chapter_after_top',
'part_node_part_appendix', 'part_node_chapter_node_appendix',
'part_node_part_node_appendix', 'part_node_node_part_appendix',
'explicit_node_directions', 'nodes_after_top_before_chapter_nodes',
- 'double_node_anchor_float');
+ 'double_node_anchor_float', 'space_in_node');
my @docbook_tests_info_tests = ('character_and_spaces_in_refs',
'chapter_between_nodes', 'section_before_after_top_node_last_node',
@@ -2197,7 +2197,7 @@ my @xml_tests_cases_tests = ('part_before_section',
'section_chapter_before_top', 'sectioning_part_appendix',
'part_chapter_appendix', 'sectioning_part_appendix_no_top',
'top_chapter_sections', 'chapter_sections',
-'more_sections_than_nodes');
+'more_sections_than_nodes', 'next_no_prev_to_node');
my @docbook_tests_cases_tests = ('hole_in_sectioning');
diff --git a/tp/t/57invalid_nestings.t b/tp/t/57invalid_nestings.t
index f4b010a226..15b7f9c485 100644
--- a/tp/t/57invalid_nestings.t
+++ b/tp/t/57invalid_nestings.t
@@ -33,12 +33,6 @@ my @test_cases = (
',
{'EXPANDED_FORMATS' => ['tex']}
],
-['ignored_text',
-'@node before ignore @ifinfo
-in ifinfo
-@end ifinfo on the node line',
-{'EXPANDED_FORMATS' => []}
-],
['in_table',
'
@node Top
@@ -593,6 +587,12 @@ Something
@itemize @ringaccent @section fourth
'],
+['ignored_text',
+'@node before ignore @ifinfo
+in ifinfo
+@end ifinfo on the node line',
+{'EXPANDED_FORMATS' => []}
+],
);
foreach my $test (@formatted_cases) {
diff --git a/tp/t/converters_tests.t b/tp/t/converters_tests.t
index b5e3bb2268..abc8b322b1 100644
--- a/tp/t/converters_tests.t
+++ b/tp/t/converters_tests.t
@@ -182,6 +182,12 @@ a float
@shortcaption{'."\f".' shc within '."\f".' shortcaption '."\f".'} '."\f".'
After shc
@end float '."\f".'
+@float type '."\f".', fl '."\f".'
+in float
+@end float
+
+@listoffloats type '."\f".'
+
'],
['some_at_commands_in_ref_nodes',
'
diff --git a/tp/t/results/converters_tests/form_feeds.pl
b/tp/t/results/converters_tests/form_feeds.pl
index 457fec4b79..07cf8b3479 100644
--- a/tp/t/results/converters_tests/form_feeds.pl
+++ b/tp/t/results/converters_tests/form_feeds.pl
@@ -849,6 +849,137 @@ $result_trees{'form_feeds'} = {
},
{
'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'type'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => ' '
+ },
+ 'type' => 'block_line_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'fl'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => '
+',
+ 'spaces_before_argument' => ' '
+ },
+ 'type' => 'block_line_arg'
+ }
+ ],
+ 'cmdname' => 'float',
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'in float
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'float'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => '
+'
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'end',
+ 'extra' => {
+ 'text_arg' => 'float'
+ },
+ 'info' => {
+ 'spaces_before_argument' => ' '
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 40,
+ 'macro' => ''
+ }
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'fl',
+ 'type' => {
+ 'content' => [
+ {}
+ ],
+ 'normalized' => 'type'
+ }
+ },
+ 'info' => {
+ 'spaces_before_argument' => ' '
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 38,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'type'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => '
+'
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'listoffloats',
+ 'extra' => {
+ 'type' => {
+ 'content' => [
+ {}
+ ],
+ 'normalized' => 'type'
+ }
+ },
+ 'info' => {
+ 'spaces_before_argument' => ' '
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 42,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
',
'type' => 'empty_line'
}
@@ -893,6 +1024,9 @@
$result_trees{'form_feeds'}{'contents'}[2]{'contents'}[29]{'contents'}[1]{'extra
$result_trees{'form_feeds'}{'contents'}[2]{'contents'}[29]{'contents'}[4]{'extra'}{'float'}
= $result_trees{'form_feeds'}{'contents'}[2]{'contents'}[29];
$result_trees{'form_feeds'}{'contents'}[2]{'contents'}[29]{'extra'}{'caption'}
= $result_trees{'form_feeds'}{'contents'}[2]{'contents'}[29]{'contents'}[1];
$result_trees{'form_feeds'}{'contents'}[2]{'contents'}[29]{'extra'}{'shortcaption'}
= $result_trees{'form_feeds'}{'contents'}[2]{'contents'}[29]{'contents'}[4];
+$result_trees{'form_feeds'}{'contents'}[2]{'contents'}[31]{'extra'}{'node_content'}[0]
=
$result_trees{'form_feeds'}{'contents'}[2]{'contents'}[31]{'args'}[1]{'contents'}[0];
+$result_trees{'form_feeds'}{'contents'}[2]{'contents'}[31]{'extra'}{'type'}{'content'}[0]
=
$result_trees{'form_feeds'}{'contents'}[2]{'contents'}[31]{'args'}[0]{'contents'}[0];
+$result_trees{'form_feeds'}{'contents'}[2]{'contents'}[33]{'extra'}{'type'}{'content'}[0]
=
$result_trees{'form_feeds'}{'contents'}[2]{'contents'}[33]{'args'}[0]{'contents'}[0];
$result_trees{'form_feeds'}{'contents'}[2]{'extra'}{'node_content'}[0] =
$result_trees{'form_feeds'}{'contents'}[2]{'args'}[0]{'contents'}[0];
$result_trees{'form_feeds'}{'contents'}[2]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
= $result_trees{'form_feeds'}{'contents'}[2]{'args'}[0]{'contents'}[0];
@@ -933,6 +1067,12 @@ a float
@shortcaption{ shc within shortcaption } After shc
@end float
+@float type , fl
+in float
+@end float
+
+@listoffloats type
+
';
@@ -966,6 +1106,10 @@ a float
Toto
After shc
+type, fl
+in float
+
+
';
$result_nodes{'form_feeds'} = {
@@ -1025,6 +1169,26 @@ $result_floats{'form_feeds'} = {
}
}
}
+ ],
+ 'type' => [
+ {
+ 'cmdname' => 'float',
+ 'extra' => {
+ 'normalized' => 'fl',
+ 'type' => {
+ 'content' => [
+ {
+ 'text' => 'type'
+ }
+ ],
+ 'normalized' => 'type'
+ }
+ },
+ 'info' => {},
+ 'structure' => {
+ 'float_number' => 1
+ }
+ }
]
};
$result_floats{'form_feeds'}{''}[0]{'extra'}{'caption'}{'extra'}{'float'} =
$result_floats{'form_feeds'}{''}[0];
@@ -1073,6 +1237,13 @@ within
cation
+in float
+
+type 1
+* Menu:
+
+* type 1: fl.
+
';
@@ -1122,6 +1293,13 @@ $result_converted{'html_text'}->{'form_feeds'} = '<a
class="node-id" id="Top"></
</p><p>Toto
</p><p>After shc
</p><div class="caption"><p>within </p><p>cation </p></div></div>
+<div class="float" id="fl">
+<p>in float
+</p><div class="type-number-float"><p><strong class="strong">type
1</strong></p></div></div>
+<dl class="listoffloats">
+<dt><a href="#fl">type 1</a></dt><dd></dd>
+</dl>
+
';
@@ -1162,6 +1340,12 @@ $result_converted{'xml'}->{'form_feeds'} = '<node
name="Top" spaces=" "><nodenam
</para><shortcaption spaces="\\f "><para>shc within </para>&formfeed;
<para>shortcaption </para>&formfeed;</shortcaption> &formfeed; <para>After shc
</para></float> &formfeed;
+<float name="fl" type="type" number="1" spaces=" " endspaces=" "><floattype
trailingspaces=" \\f">type</floattype><floatname spaces=" ">fl
&formfeed;</floatname>
+<para>in float
+</para></float>
+
+<listoffloats type="type" spaces=" ">type &formfeed;</listoffloats>
+
';
@@ -1195,6 +1379,10 @@ $result_converted{'docbook'}->{'form_feeds'} = '<anchor
id="first-node"/>
</para><para>Toto
</para><para>After shc
</para>
+<anchor id="fl"/>
+<para>in float
+</para>
+
';
@@ -1255,6 +1443,13 @@ a float
\\par{}After shc
\\end{TexinfoFloat}
+\\begin{TexinfoFloattype}
+in float
+\\label{anchor:fl}%
+\\end{TexinfoFloattype}
+
+\\listof{TexinfoFloattype}{}
+
';
1;
diff --git a/tp/t/results/invalid_nestings/ignored_text.pl
b/tp/t/results/invalid_nestings/ignored_text.pl
index f7462a3f55..8abd004a49 100644
--- a/tp/t/results/invalid_nestings/ignored_text.pl
+++ b/tp/t/results/invalid_nestings/ignored_text.pl
@@ -100,4 +100,10 @@ $result_errors{'ignored_text'} = [
$result_floats{'ignored_text'} = {};
+
+$result_converted{'plaintext'}->{'ignored_text'} = '';
+
+
+$result_converted{'xml'}->{'ignored_text'} = '<node name="before-ignore"
spaces=" "><nodename trailingspaces=" ">before ignore</nodename></node>';
+
1;
diff --git
a/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl
b/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl
index 3cf6a0c914..c2dce5160d 100644
--- a/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl
+++ b/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl
@@ -4473,4 +4473,150 @@ samp:
‘<literal>``simple-double--three---four----\'\' `simple\' quotedblle
</book>
';
+
+$result_converted{'xml'}->{'codequoteundirected_codequotebacktick'} = '<macro
name="quotes" line=" quotes" endspaces="
">``simple-double--three---four----\'\' `simple\' quotedblleft: @quotedblleft{}
@*
+code: @code{``simple-double--three---four----\'\' `simple\' quotedblleft:
@quotedblleft{}} @*
+asis: @asis{``simple-double--three---four----\'\' `simple\' quotedblleft:
@quotedblleft{}} @*
+strong: @strong{``simple-double--three---four----\'\' `simple\' quotedblleft:
@quotedblleft{}} @*
+kbd: @kbd{``simple-double--three---four----\'\' `simple\' quotedblleft:
@quotedblleft{}} @*
+samp: @samp{``simple-double--three---four----\'\' `simple\' quotedblleft:
@quotedblleft{}} @*
+</macro>
+
+<macro name="allquotes" line=" allquotes" endspaces=" ">@quotes{}
+
+@example
+@@codequoteundirected on
+@@codequotebacktick on
+@end example
+@codequoteundirected
+@codequotebacktick
+@quotes{}
+
+@example
+@@codequoteundirected off
+@@codequotebacktick off
+@end example
+@codequoteundirected off
+@codequotebacktick off
+@quotes{}
+</macro>
+
+<copying endspaces=" ">
+<para>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “ &linebreak;
+code: <code>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</code> &linebreak;
+asis:
<asis>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</asis> &linebreak;
+strong:
<strong>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</strong> &linebreak;
+kbd: <kbd>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</kbd> &linebreak;
+samp: <samp>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</samp> &linebreak;
+</para>
+<example endspaces=" ">
+<pre xml:space="preserve">&arobase;codequoteundirected on
+&arobase;codequotebacktick on
+</pre></example>
+<codequoteundirected></codequoteundirected>
+<codequotebacktick></codequotebacktick>
+<para>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “ &linebreak;
+code: <code>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</code> &linebreak;
+asis:
<asis>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</asis> &linebreak;
+strong:
<strong>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</strong> &linebreak;
+kbd: <kbd>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</kbd> &linebreak;
+samp: <samp>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</samp> &linebreak;
+</para>
+<example endspaces=" ">
+<pre xml:space="preserve">&arobase;codequoteundirected off
+&arobase;codequotebacktick off
+</pre></example>
+<codequoteundirected spaces=" " value="off" line="off"></codequoteundirected>
+<codequotebacktick spaces=" " value="off" line="off"></codequotebacktick>
+<para>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “ &linebreak;
+code: <code>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</code> &linebreak;
+asis:
<asis>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</asis> &linebreak;
+strong:
<strong>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</strong> &linebreak;
+kbd: <kbd>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</kbd> &linebreak;
+samp: <samp>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</samp> &linebreak;
+</para></copying>
+<titlepage endspaces=" ">
+<para>Titlepage
+</para><insertcopying></insertcopying>
+</titlepage>
+
+
+<node name="Top" spaces=" "><nodename trailingspaces="
">Top</nodename><nodenext automatic="on">chap</nodenext></node>
+<top spaces=" "><sectiontitle>test quotes</sectiontitle>
+
+</top>
+<node name="chap" spaces=" "><nodename>chap</nodename><nodeprev
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Chapter</sectiontitle>
+
+<para>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “ &linebreak;
+code: <code>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</code> &linebreak;
+asis:
<asis>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</asis> &linebreak;
+strong:
<strong>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</strong> &linebreak;
+kbd: <kbd>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</kbd> &linebreak;
+samp: <samp>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</samp> &linebreak;
+</para>
+<example endspaces=" ">
+<pre xml:space="preserve">&arobase;codequoteundirected on
+&arobase;codequotebacktick on
+</pre></example>
+<codequoteundirected></codequoteundirected>
+<codequotebacktick></codequotebacktick>
+<para>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “ &linebreak;
+code: <code>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</code> &linebreak;
+asis:
<asis>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</asis> &linebreak;
+strong:
<strong>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</strong> &linebreak;
+kbd: <kbd>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</kbd> &linebreak;
+samp: <samp>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</samp> &linebreak;
+</para>
+<example endspaces=" ">
+<pre xml:space="preserve">&arobase;codequoteundirected off
+&arobase;codequotebacktick off
+</pre></example>
+<codequoteundirected spaces=" " value="off" line="off"></codequoteundirected>
+<codequotebacktick spaces=" " value="off" line="off"></codequotebacktick>
+<para>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “ &linebreak;
+code: <code>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</code> &linebreak;
+asis:
<asis>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</asis> &linebreak;
+strong:
<strong>&textldquo;simple-double&textndash;three&textmdash;four&textmdash;-&textrdquo;
&textlsquo;simple&textrsquo; quotedblleft: “</strong> &linebreak;
+kbd: <kbd>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</kbd> &linebreak;
+samp: <samp>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</samp> &linebreak;
+</para>
+<example endspaces=" ">
+<pre xml:space="preserve">``simple-double--three---four----\'\' `simple\'
quotedblleft: “ &linebreak;
+code: <code>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</code> &linebreak;
+asis: <asis>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</asis> &linebreak;
+strong: <strong>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</strong> &linebreak;
+kbd: <kbd>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</kbd> &linebreak;
+samp: <samp>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</samp> &linebreak;
+
+</pre><example endspaces=" ">
+<pre xml:space="preserve">&arobase;codequoteundirected on
+&arobase;codequotebacktick on
+</pre></example>
+<pre xml:space="preserve"><codequoteundirected></codequoteundirected>
+<codequotebacktick></codequotebacktick>
+``simple-double--three---four----\'\' `simple\' quotedblleft: “
&linebreak;
+code: <code>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</code> &linebreak;
+asis: <asis>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</asis> &linebreak;
+strong: <strong>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</strong> &linebreak;
+kbd: <kbd>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</kbd> &linebreak;
+samp: <samp>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</samp> &linebreak;
+
+</pre><example endspaces=" ">
+<pre xml:space="preserve">&arobase;codequoteundirected off
+&arobase;codequotebacktick off
+</pre></example>
+<pre xml:space="preserve"><codequoteundirected spaces=" " value="off"
line="off"></codequoteundirected>
+<codequotebacktick spaces=" " value="off" line="off"></codequotebacktick>
+``simple-double--three---four----\'\' `simple\' quotedblleft: “
&linebreak;
+code: <code>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</code> &linebreak;
+asis: <asis>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</asis> &linebreak;
+strong: <strong>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</strong> &linebreak;
+kbd: <kbd>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</kbd> &linebreak;
+samp: <samp>``simple-double--three---four----\'\' `simple\' quotedblleft:
“</samp> &linebreak;
+</pre></example>
+
+</chapter>
+';
+
1;
diff --git a/tp/t/results/misc_commands/comment_space_command_on_line.pl
b/tp/t/results/misc_commands/comment_space_command_on_line.pl
index 9a7f8bd184..949c420d55 100644
--- a/tp/t/results/misc_commands/comment_space_command_on_line.pl
+++ b/tp/t/results/misc_commands/comment_space_command_on_line.pl
@@ -1127,6 +1127,36 @@ End:
';
+$result_converted{'xml'}->{'comment_space_command_on_line'} = '<settitle
spaces=" ">Settitle <spacecmd type="spc"/></settitle><!-- c settittle -->
+
+<node name="Top" spaces=" "><nodename trailingspaces="
">Top</nodename><nodenext automatic="on">chap</nodenext></node><!-- comment
@node Top -->
+<top spaces=" "><sectiontitle>top element<spacecmd type="spc"/>
</sectiontitle><!-- comment @top -->
+
+</top>
+<node name="chap" spaces=" "><nodename trailingspaces="
">chap</nodename><nodeprev automatic="on">Top</nodeprev><nodeup
automatic="on">Top</nodeup></node><!-- comment @node chap -->
+<chapter spaces=" "><sectiontitle>Chapter<spacecmd type="spc"/>
</sectiontitle><!-- comment @chapter -->
+
+<frenchspacing spaces=" " value="on" line="on @c comment
frenchspacing"></frenchspacing><!-- c comment frenchspacing -->
+
+<microtype spaces=" " value="off" line="off@c comment
microtype"></microtype><!-- c comment microtype -->
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">index entry
<spacecmd type="spc"/></indexterm></cindex> <!-- c index entry -->
+
+<heading spaces=" ">Heading <spacecmd type="spc"/> </heading><!-- c heading
-->
+
+<printindex spaces=" " value="cp" line="cp @c printindex "></printindex><!-- c
printindex -->
+
+<float name="label" type="Text" number="1.1" spaces=" " endspaces="
"><floattype>Text</floattype><floatname spaces=" ">label</floatname>
+<para>float
+</para></float> <!-- c end -->
+
+<listoffloats type="Text @ " spaces=" ">Text <spacecmd
type="spc"/></listoffloats><!-- c listoffloats -->
+
+</chapter>
+<bye></bye>
+';
+
+
$result_converted{'xml'}->{'comment_space_command_on_line'} = '<settitle
spaces=" ">Settitle <spacecmd type="spc"/></settitle><!-- c settittle -->
<node name="Top" spaces=" "><nodename trailingspaces="
">Top</nodename><nodenext automatic="on">chap</nodenext></node><!-- comment
@node Top -->
diff --git a/tp/t/results/preformatted/example_multi_class.pl
b/tp/t/results/preformatted/example_multi_class.pl
index e4efb63682..56997697a7 100644
--- a/tp/t/results/preformatted/example_multi_class.pl
+++ b/tp/t/results/preformatted/example_multi_class.pl
@@ -345,7 +345,7 @@ $result_converted{'docbook'}->{'example_multi_class'} =
'<screen>void StateManag
</screen>';
-$result_converted{'xml'}->{'example_multi_class'} = '<example spaces=" "
endspaces=" "><examplelanguage>C++</examplelanguage><examplearg spaces="
">gothic</examplearg><examplearg spaces=" ">purple</examplearg><examplearg
spaces=" ">embed</examplearg>
+$result_converted{'xml'}->{'example_multi_class'} = '<example spaces=" "
endspaces=" "><examplelanguage trailingspaces="
">C++</examplelanguage><examplearg spaces=" ">gothic</examplearg><examplearg
spaces=" ">purple</examplearg><examplearg spaces=" ">embed</examplearg>
<pre xml:space="preserve">void StateManager::deallocate() {
if(buffer) {
delete [] buffer;
diff --git a/tp/t/results/raw/beginning_and_end_on_line.pl
b/tp/t/results/raw/beginning_and_end_on_line.pl
index 1a7aa09fee..b6383a8390 100644
--- a/tp/t/results/raw/beginning_and_end_on_line.pl
+++ b/tp/t/results/raw/beginning_and_end_on_line.pl
@@ -244,4 +244,17 @@ $result_errors{'beginning_and_end_on_line'} = [
$result_floats{'beginning_and_end_on_line'} = {};
+
+$result_converted{'plaintext'}->{'beginning_and_end_on_line'} = '
+';
+
+
+$result_converted{'xml'}->{'beginning_and_end_on_line'} = '
+<tex spaces=" " endspaces=" "> </tex>
+
+<verbatim xml:space="preserve" spaces=" " endspaces=" "> </verbatim>
+
+<html spaces=" " endspaces=" "> </html>
+';
+
1;
diff --git a/tp/t/results/raw/braces_in_tex.pl
b/tp/t/results/raw/braces_in_tex.pl
index 8634a42fe1..f196f33fef 100644
--- a/tp/t/results/raw/braces_in_tex.pl
+++ b/tp/t/results/raw/braces_in_tex.pl
@@ -283,4 +283,27 @@ $result_floats{'braces_in_tex'} = {};
$result_converted{'plaintext'}->{'braces_in_tex'} = '
';
+
+$result_converted{'xml'}->{'braces_in_tex'} = '
+<tex endspaces=" ">
+$$
+\\chi^2 = \\sum_{i=1}^N
+\\left(y_i - (a + b x_i)
+\\over \\sigma_i\\right)^2
+$$
+</tex>
+
+
+<example endspaces=" ">
+<pre xml:space="preserve"><tex endspaces=" ">
+$$
+\\chi^2 = \\sum_{i=1}^N
+\\left(y_i - (a + b x_i)
+\\over \\sigma_i\\right)^2
+$$
+</tex>
+</pre></example>
+
+';
+
1;
diff --git a/tp/t/results/raw/displaymath.pl b/tp/t/results/raw/displaymath.pl
index f88d761e5e..5f63db2173 100644
--- a/tp/t/results/raw/displaymath.pl
+++ b/tp/t/results/raw/displaymath.pl
@@ -297,4 +297,16 @@ $result_converted{'plaintext'}->{'displaymath'} = '\\int_D
({\\nabla\\cdot} F)dV
after
';
+
+$result_converted{'xml'}->{'displaymath'} = '<displaymath endspaces=" ">
+\\int_D ({\\nabla\\cdot} F)dV=\\int_{\\partial D} F\\cdot ndS
+</displaymath>
+
+<para>before
+</para><displaymath endspaces=" ">
+\\int_D ({\\nabla\\cdot} F)dV=\\int_{\\partial D} F\\cdot ndS
+</displaymath>
+<para>after
+</para>';
+
1;
diff --git a/tp/t/results/raw/inline_in_example.pl
b/tp/t/results/raw/inline_in_example.pl
index 45ab858190..8d15109c70 100644
--- a/tp/t/results/raw/inline_in_example.pl
+++ b/tp/t/results/raw/inline_in_example.pl
@@ -280,4 +280,17 @@ $result_converted{'plaintext'}->{'inline_in_example'} = '
A plaintext
.
';
+
+$result_converted{'xml'}->{'inline_in_example'} = '<example endspaces=" ">
+<pre xml:space="preserve">A
<inlineraw><inlinerawformat>plaintext</inlinerawformat><inlinerawcontent
spaces=" ">plaintext
+
+`` &lbracechar; </inlinerawcontent></inlineraw> a.
+<inlinefmt><inlinefmtformat>plaintext</inlinefmtformat><inlinefmtcontent
spaces=" ">`` </inlinefmtcontent></inlinefmt>.
+
+ Now html
+<inlineraw><inlinerawformat>html</inlinerawformat><inlinerawcontent spaces="
\\n">
+in
<i><acronym><acronymword>HTML</acronymword></acronym></i></inlinerawcontent></inlineraw>.
+</pre></example>
+';
+
1;
diff --git a/tp/t/results/raw/inlinefmt.pl b/tp/t/results/raw/inlinefmt.pl
index cab792542b..d4cf511237 100644
--- a/tp/t/results/raw/inlinefmt.pl
+++ b/tp/t/results/raw/inlinefmt.pl
@@ -154,4 +154,9 @@ $result_floats{'inlinefmt'} = {};
$result_converted{'plaintext'}->{'inlinefmt'} = 'A plaintext “ { a. Now html .
';
+
+$result_converted{'xml'}->{'inlinefmt'} = '<para>A
<inlinefmt><inlinefmtformat>plaintext</inlinefmtformat><inlinefmtcontent
spaces=" ">plaintext &textldquo; &lbracechar; </inlinefmtcontent></inlinefmt>
a. Now html
+<inlinefmt><inlinefmtformat>html</inlinefmtformat><inlinefmtcontent spaces="
">in
<i><acronym><acronymword>HTML</acronymword></acronym></i></inlinefmtcontent></inlinefmt>.
+</para>';
+
1;
diff --git a/tp/t/results/raw/inlineraw.pl b/tp/t/results/raw/inlineraw.pl
index 25f4e01dfd..7e2444ff4b 100644
--- a/tp/t/results/raw/inlineraw.pl
+++ b/tp/t/results/raw/inlineraw.pl
@@ -154,4 +154,9 @@ $result_floats{'inlineraw'} = {};
$result_converted{'plaintext'}->{'inlineraw'} = 'A plaintext `` { a. Now html
.
';
+
+$result_converted{'xml'}->{'inlineraw'} = '<para>A
<inlineraw><inlinerawformat>plaintext</inlinerawformat><inlinerawcontent
spaces=" ">plaintext &textldquo; &lbracechar; </inlinerawcontent></inlineraw>
a. Now html
+<inlineraw><inlinerawformat>html</inlinerawformat><inlinerawcontent spaces="
">in
<i><acronym><acronymword>HTML</acronymword></acronym></i></inlinerawcontent></inlineraw>.
+</para>';
+
1;
diff --git a/tp/t/results/raw/lone_braces_in_html.pl
b/tp/t/results/raw/lone_braces_in_html.pl
index ea9d4bdf05..5de696d98b 100644
--- a/tp/t/results/raw/lone_braces_in_html.pl
+++ b/tp/t/results/raw/lone_braces_in_html.pl
@@ -156,6 +156,16 @@ $result_floats{'lone_braces_in_html'} = {};
$result_converted{'plaintext'}->{'lone_braces_in_html'} = '';
+$result_converted{'xml'}->{'lone_braces_in_html'} = '<html endspaces=" ">
+}
+</html>
+
+<html endspaces=" ">
+{
+</html>
+';
+
+
$result_converted{'html_text'}->{'lone_braces_in_html'} = '}
{
diff --git a/tp/t/results/raw/misc_raw.pl b/tp/t/results/raw/misc_raw.pl
index 27559c02b8..2e329362fd 100644
--- a/tp/t/results/raw/misc_raw.pl
+++ b/tp/t/results/raw/misc_raw.pl
@@ -240,4 +240,18 @@ $result_converted{'plaintext'}->{'misc_raw'} = 'in
v---erbatim`` <>
in verbatim2
';
+
+$result_converted{'xml'}->{'misc_raw'} = '
+<html endspaces=" ">
+in html <br> </html>
+
+<tex spaces=" " endspaces=" ">
+</tex>
+
+<verbatim xml:space="preserve" endspaces=" ">
+in v---erbatim`` <>
+in verbatim2
+</verbatim>
+';
+
1;
diff --git a/tp/t/results/raw/misc_raw_comments.pl
b/tp/t/results/raw/misc_raw_comments.pl
index 2be4869a22..9c2229439d 100644
--- a/tp/t/results/raw/misc_raw_comments.pl
+++ b/tp/t/results/raw/misc_raw_comments.pl
@@ -286,4 +286,18 @@ $result_converted{'plaintext'}->{'misc_raw_comments'} =
'in verbatim @c in verba
in verbatim2
';
+
+$result_converted{'xml'}->{'misc_raw_comments'} = '
+<html spaces=" " endspaces=" "><!-- c comment space -->
+in html </html><!-- c comment no space -->
+
+<tex spaces=" " endspaces=" ">
+</tex> <!-- c comment after end tex -->
+
+<verbatim xml:space="preserve" endspaces=" ">
+in verbatim @c in verbatim
+in verbatim2
+</verbatim>
+';
+
1;
diff --git a/tp/t/results/raw/nested_macros.pl
b/tp/t/results/raw/nested_macros.pl
index 83629aefe9..b1ec47b2ee 100644
--- a/tp/t/results/raw/nested_macros.pl
+++ b/tp/t/results/raw/nested_macros.pl
@@ -178,4 +178,12 @@ $result_floats{'nested_macros'} = {};
$result_converted{'plaintext'}->{'nested_macros'} = '';
+
+$result_converted{'xml'}->{'nested_macros'} = '<macro name="truc" line=" truc
{ arg, ex}" endspaces="
"><formalarg>arg</formalarg><formalarg>ex</formalarg>in macro \\arg\\
+<macro line=" othermacro " endspaces=" ">other macro
+</macro>
+<macro endspaces=" "></macro>
+</macro>
+';
+
1;
diff --git a/tp/t/results/raw/raw_commands_and_end_of_lines.pl
b/tp/t/results/raw/raw_commands_and_end_of_lines.pl
index bac1f879b0..56712559b8 100644
--- a/tp/t/results/raw/raw_commands_and_end_of_lines.pl
+++ b/tp/t/results/raw/raw_commands_and_end_of_lines.pl
@@ -1605,4 +1605,92 @@ in block
in block
';
+
+$result_converted{'xml'}->{'raw_commands_and_end_of_lines'} = '
+<html endspaces=" ">
+Surrounded by empty lines.
+</html>
+
+<para>Block commands on a line
+<html endspaces=" ">
+in block
+in block l2
+</html>
+end commands on a line.
+</para>
+<para>Before the opening command <html endspaces=" ">
+in block
+</html>
+end commands on a line.
+</para>
+<para>Before the opening command <html endspaces=" ">
+in block
+</html>
+</para>
+<para>Before the opening command <html endspaces=" ">
+in block
+</html>
+. A symbol on a line.
+</para>
+<para>Before the opening command <html endspaces=" ">
+in block
+</html>
+</para>
+<tex endspaces=" ">
+Surrounded by empty lines.
+</tex>
+
+<para>Block commands on a line
+<tex endspaces=" ">
+in block
+</tex>
+end commands on a line.
+</para>
+<para>Before the opening command <tex endspaces=" ">
+in block
+</tex>
+end commands on a line.
+</para>
+<para>Before the opening command <tex endspaces=" ">
+in block
+</tex>
+</para>
+<para>Before the opening command <tex endspaces=" ">
+in block
+</tex>
+. A symbol on a line.
+</para>
+<para>Before the opening command <tex endspaces=" ">
+in block
+</tex>
+</para>
+<verbatim xml:space="preserve" endspaces=" ">
+Surrounded by empty lines.
+</verbatim>
+
+<para>Block commands on a line
+</para><verbatim xml:space="preserve" endspaces=" ">
+in block
+</verbatim>
+<para>end commands on a line.
+</para>
+<para>Before the opening command </para><verbatim xml:space="preserve"
endspaces=" ">
+in block
+</verbatim>
+<para>end commands on a line.
+</para>
+<para>Before the opening command </para><verbatim xml:space="preserve"
endspaces=" ">
+in block
+</verbatim>
+
+<para>Before the opening command </para><verbatim xml:space="preserve"
endspaces=" ">
+in block
+</verbatim>
+<para>. A symbol on a line.
+</para>
+<para>Before the opening command </para><verbatim xml:space="preserve"
endspaces=" ">
+in block
+</verbatim>
+';
+
1;
diff --git a/tp/t/results/raw/raw_expanded_in_style.pl
b/tp/t/results/raw/raw_expanded_in_style.pl
index 7f6241e528..914cd90098 100644
--- a/tp/t/results/raw/raw_expanded_in_style.pl
+++ b/tp/t/results/raw/raw_expanded_in_style.pl
@@ -119,6 +119,11 @@ in html
';
+$result_converted{'xml'}->{'raw_expanded_in_style'} = '<para><code>
+in html
+</code></para>';
+
+
$result_converted{'html_text'}->{'raw_expanded_in_style'} = '<p><code
class="code">
in html
</code></p>';
diff --git a/tp/t/results/raw/raw_in_example.pl
b/tp/t/results/raw/raw_in_example.pl
index 16a4e6e3ae..b098066e5a 100644
--- a/tp/t/results/raw/raw_in_example.pl
+++ b/tp/t/results/raw/raw_in_example.pl
@@ -403,6 +403,35 @@ $result_converted{'plaintext'}->{'raw_in_example'} = '
+';
+
+
+$result_converted{'xml'}->{'raw_in_example'} = '<example endspaces=" ">
+<pre xml:space="preserve"><html endspaces=" ">
+in html
+</html>
+</pre></example>
+
+<example endspaces=" ">
+<pre xml:space="preserve">
+<html endspaces=" ">
+
+Some html <code>some code</code>.
+
+</html>
+
+<tex endspaces=" ">
+
+$$
+\\chi^2 = \\sum_{i=1}^N
+\\left(y_i - (a + b x_i)
+\\over \\sigma_i\\right)^2
+$$
+
+</tex>
+
+</pre></example>
+
';
diff --git a/tp/t/results/raw/raw_in_para.pl b/tp/t/results/raw/raw_in_para.pl
index 29b5baa1a0..2b4d89695e 100644
--- a/tp/t/results/raw/raw_in_para.pl
+++ b/tp/t/results/raw/raw_in_para.pl
@@ -294,4 +294,26 @@ in verbatim
End.
';
+
+$result_converted{'xml'}->{'raw_in_para'} = '<para>para
+</para><verbatim xml:space="preserve" endspaces=" ">
+in verbatim
+</verbatim>
+
+<para>para b html
+<html endspaces=" ">
+in html
+</html>
+in para
+</para>
+<para>para b tex
+<tex endspaces=" ">
+in tex1
+
+in tex2
+</tex>
+</para>
+<para>End.
+</para>';
+
1;
diff --git a/tp/t/results/raw/raw_in_style.pl b/tp/t/results/raw/raw_in_style.pl
index 6aac5a449f..91f5f88854 100644
--- a/tp/t/results/raw/raw_in_style.pl
+++ b/tp/t/results/raw/raw_in_style.pl
@@ -117,6 +117,13 @@ $result_converted{'plaintext'}->{'raw_in_style'} = '‘ ’
';
+$result_converted{'xml'}->{'raw_in_style'} = '<para><code>
+<html endspaces=" ">
+in html
+</html>
+</code></para>';
+
+
$result_converted{'html_text'}->{'raw_in_style'} = '<p><code class="code">
in html
</code></p>';
diff --git a/tp/t/results/raw/space_before_end.pl
b/tp/t/results/raw/space_before_end.pl
index 0a3f7b53ef..e60d847da3 100644
--- a/tp/t/results/raw/space_before_end.pl
+++ b/tp/t/results/raw/space_before_end.pl
@@ -228,4 +228,23 @@ $result_errors{'space_before_end'} = [
$result_floats{'space_before_end'} = {};
+
+$result_converted{'plaintext'}->{'space_before_end'} = 'in verbatim
+
+
+';
+
+
+$result_converted{'xml'}->{'space_before_end'} = '<tex endspaces=" ">
+in tex
+ </tex>
+
+<verbatim xml:space="preserve" endspaces=" ">
+in verbatim
+ </verbatim>
+
+<html endspaces=" ">
+ </html>
+';
+
1;
diff --git a/tp/t/results/raw/spurious_arg_on_line.pl
b/tp/t/results/raw/spurious_arg_on_line.pl
index f32d54ca73..294b1d3738 100644
--- a/tp/t/results/raw/spurious_arg_on_line.pl
+++ b/tp/t/results/raw/spurious_arg_on_line.pl
@@ -239,4 +239,23 @@ $result_errors{'spurious_arg_on_line'} = [];
$result_floats{'spurious_arg_on_line'} = {};
+
+$result_converted{'plaintext'}->{'spurious_arg_on_line'} = 'in verbatim
+
+';
+
+
+$result_converted{'xml'}->{'spurious_arg_on_line'} = '
+<tex spaces=" " endspaces=" ">
+in tex
+</tex>
+
+<verbatim xml:space="preserve" spaces=" " endspaces=" ">
+in verbatim
+</verbatim>
+
+<html spaces=" " endspaces=" ">
+</html>
+';
+
1;
diff --git a/tp/t/results/raw/verbatim_and_verbatiminclude.pl
b/tp/t/results/raw/verbatim_and_verbatiminclude.pl
index 06282c0fa3..b79a626fbf 100644
--- a/tp/t/results/raw/verbatim_and_verbatiminclude.pl
+++ b/tp/t/results/raw/verbatim_and_verbatiminclude.pl
@@ -1078,4 +1078,70 @@
$result_converted_errors{'plaintext'}->{'verbatim_and_verbatiminclude'} = [
];
+
+$result_converted{'xml'}->{'verbatim_and_verbatiminclude'} = '<verbatim
xml:space="preserve" endspaces=" ">
+In verbatim @@
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbb
+</verbatim>
+
+<para>Text before
+</para><verbatim xml:space="preserve" endspaces=" ">
+in verbatime
+</verbatim>
+<para>Text after
+</para>
+<quotation endspaces=" ">
+<para>In quotation
+</para><verbatim xml:space="preserve" endspaces=" ">
+In verbatim in quotation
+In verbatim @@
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbb
+</verbatim>
+</quotation>
+
+<para>Before
+</para><verbatim xml:space="preserve" endspaces=" ">
+In verbatim test text
+</verbatim>
+<para>After
+</para>
+<verbatiminclude file="verb.txt" spaces=" ">verb.txt</verbatiminclude>
+
+<quotation endspaces=" ">
+<para>In quotation include
+</para><verbatiminclude file="verb.txt" spaces=" ">verb.txt</verbatiminclude>
+</quotation>
+
+<para>Before include
+</para><verbatiminclude file="verb.txt" spaces=" ">verb.txt</verbatiminclude>
+<para>After
+</para>
+<example endspaces=" ">
+<pre xml:space="preserve">In example
+
+</pre><verbatim xml:space="preserve" endspaces=" ">
+In verbatim in example
+In verbatim @@
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbb
+</verbatim>
+<pre xml:space="preserve">
+</pre></example>
+
+<quotation endspaces=" ">
+<para>In quotation with spaces
+</para>
+<verbatim xml:space="preserve" endspaces=" ">
+In verbatim in quotation with spaces
+In verbatim @@
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbb
+</verbatim>
+
+</quotation>
+
+<quotation endspaces=" ">
+<para>In quotation
+</para>
+<verbatim xml:space="preserve" endspaces=" ">
+In verbatim in quotation
+</verbatim>
+<para>in quotation after end verbaatim
+</para></quotation>
+';
+
1;
diff --git a/tp/t/results/raw/verbatim_in_brace_command.pl
b/tp/t/results/raw/verbatim_in_brace_command.pl
index 676e82eb63..9a432a39c2 100644
--- a/tp/t/results/raw/verbatim_in_brace_command.pl
+++ b/tp/t/results/raw/verbatim_in_brace_command.pl
@@ -149,4 +149,12 @@ in verbatim
';
+
+$result_converted{'xml'}->{'verbatim_in_brace_command'} = '<para><samp>
+</samp></para><verbatim xml:space="preserve" endspaces=" ">
+in verbatim
+</verbatim>
+
+';
+
1;
diff --git a/tp/t/results/sectioning/next_no_prev_to_node.pl
b/tp/t/results/sectioning/next_no_prev_to_node.pl
index d8d0049935..8b21ed5fe5 100644
--- a/tp/t/results/sectioning/next_no_prev_to_node.pl
+++ b/tp/t/results/sectioning/next_no_prev_to_node.pl
@@ -474,4 +474,17 @@ $result_errors{'next_no_prev_to_node'} = [];
$result_floats{'next_no_prev_to_node'} = {};
+
+$result_converted{'xml'}->{'next_no_prev_to_node'} = '<node name="Top"
spaces=" "><nodename>Top</nodename><nodenext automatic="on">first
node</nodenext></node>
+
+<menu endspaces=" ">
+<menuentry><menuleadingtext>* </menuleadingtext><menunode>first
node</menunode><menuseparator>::</menuseparator><menudescription><pre
xml:space="preserve">
+</pre></menudescription></menuentry><menuentry><menuleadingtext>*
</menuleadingtext><menunode>no
return</menunode><menuseparator>::</menuseparator><menudescription><pre
xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+<node name="first-node" spaces=" "><nodename>first node</nodename><nodenext
spaces=" ">no return</nodenext><nodeprev automatic="on">Top</nodeprev><nodeup
spaces=" ">Top</nodeup></node>
+
+<node name="no-return" spaces=" "><nodename>no
return</nodename><nodenext></nodenext><nodeprev></nodeprev><nodeup spaces=" "
trailingspaces=" ">Top</nodeup></node>
+';
+
1;
diff --git a/tp/t/results/sectioning/node_up_external_node.pl
b/tp/t/results/sectioning/node_up_external_node.pl
index 3d8936c28d..f2e7d19d16 100644
--- a/tp/t/results/sectioning/node_up_external_node.pl
+++ b/tp/t/results/sectioning/node_up_external_node.pl
@@ -709,4 +709,14 @@
$result_converted_errors{'html'}->{'node_up_external_node'} = [
];
+
+$result_converted{'xml'}->{'node_up_external_node'} = '<node name="Top"
spaces=" "><nodename>Top</nodename><nodenext
automatic="on">first</nodenext></node>
+
+<menu endspaces=" ">
+<menuentry><menuleadingtext>*
</menuleadingtext><menunode>first</menunode><menuseparator>::</menuseparator><menudescription><pre
xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+<node name="first" spaces=" "><nodename>first</nodename><nodenext spaces="
">(manual1)</nodenext><nodeprev spaces=" " trailingspaces="
">(manual2)</nodeprev><nodeup spaces=" ">(manual3)</nodeup></node>
+';
+
1;
diff --git a/tp/t/results/sectioning/space_in_node.pl
b/tp/t/results/sectioning/space_in_node.pl
index 95a60c4632..1c86a2ebe1 100644
--- a/tp/t/results/sectioning/space_in_node.pl
+++ b/tp/t/results/sectioning/space_in_node.pl
@@ -678,4 +678,21 @@ $result_converted_errors{'html'}->{'space_in_node'} = [
];
+
+$result_converted{'xml'}->{'space_in_node'} = '
+<node name="Top" spaces=" "><nodename>Top</nodename><nodenext
automatic="on">Chap first here</nodenext></node>
+
+<menu endspaces=" ">
+<menuentry><menuleadingtext>* </menuleadingtext><menunode>Chap first
here</menunode><menuseparator>::</menuseparator><menudescription><pre
xml:space="preserve">
+</pre></menudescription></menuentry><menuentry><menuleadingtext>*
</menuleadingtext><menutitle>Test title
</menutitle><menuseparator>:</menuseparator><menunode>Test
title</menunode><menuseparator>.</menuseparator><menudescription><pre
xml:space="preserve">
+</pre></menudescription></menuentry><menuentry><menuleadingtext>*
</menuleadingtext><menunode>Last with spaces
</menunode><menuseparator>::</menuseparator><menudescription><pre
xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+<node name="Chap-first-here" spaces=" "><nodename>Chap first
here</nodename><nodenext automatic="on">Test
title</nodenext><nodeprev automatic="on">Top</nodeprev><nodeup
automatic="on">Top</nodeup></node>
+
+<node name="Test-title" spaces=" "><nodename>Test
title</nodename><nodenext automatic="on">Last with spaces</nodenext><nodeprev
automatic="on">Chap first here</nodeprev><nodeup
automatic="on">Top</nodeup></node>
+
+<node name="Last-with-spaces" spaces=" "><nodename trailingspaces=" ">Last
with spaces</nodename><nodeprev automatic="on">Test
title</nodeprev><nodeup automatic="on">Top</nodeup></node>
+';
+
1;
diff --git a/tp/t/results/xml_tests/commands_and_spaces.pl
b/tp/t/results/xml_tests/commands_and_spaces.pl
index ddb0dac86a..6e923f56c6 100644
--- a/tp/t/results/xml_tests/commands_and_spaces.pl
+++ b/tp/t/results/xml_tests/commands_and_spaces.pl
@@ -1882,7 +1882,7 @@ $result_converted{'xml'}->{'commands_and_spaces'} = '<set
name="foo" line=" foo
<para>Q
</para></quotation>
-<float name="b" type="ff" number="1" spaces=" " endspaces="
"><floattype>ff</floattype><floatname spaces=" ">b </floatname>
+<float name="b" type="ff" number="1" spaces=" " endspaces=" "><floattype
trailingspaces=" ">ff</floattype><floatname spaces=" ">b </floatname>
<para>f
</para><caption spaces=" "><para>In caption </para></caption><para>j.
</para><shortcaption><para>Short</para></shortcaption><para> g.
diff --git a/util/texinfo.dtd b/util/texinfo.dtd
index 9fa1b201f5..8e5f60f2cd 100644
--- a/util/texinfo.dtd
+++ b/util/texinfo.dtd
@@ -628,6 +628,8 @@
<!ATTLIST example
%spacesblockattr;>
<!ELEMENT examplelanguage (#PCDATA | %Inline.line;)*>
+<!ATTLIST examplelanguage
+ %trailingspacesattr;>
<!ELEMENT examplearg (#PCDATA | %Inline.line;)*>
<!ATTLIST examplearg
%spacesattr;>
@@ -794,6 +796,8 @@
name CDATA #IMPLIED
type CDATA #IMPLIED>
<!ELEMENT floattype (#PCDATA | %Inline.line;)*>
+<!ATTLIST floattype
+ %trailingspacesattr;>
<!ELEMENT floatname (#PCDATA | %Inline.line;)*>
<!ATTLIST floatname
%spacesattr;>
diff --git a/util/txixml2texi.pl b/util/txixml2texi.pl
index a1cd1ba323..9ce45b626e 100755
--- a/util/txixml2texi.pl
+++ b/util/txixml2texi.pl
@@ -506,6 +506,9 @@ while ($reader->read) {
if (defined($reader->getAttribute('bracketed'))
and $reader->getAttribute('bracketed') eq 'on') {
print "$trailingspaces";
+ # such that spaces are not prepended below when prepended
+ # for elements without bracketed attribute below
+ $trailingspaces = '';
print '}';
}
}
@@ -548,6 +551,7 @@ while ($reader->read) {
$eat_space = 1;
} else {
print STDERR "END UNKNOWN $name\n" if ($debug);
+ print "$trailingspaces";
}
} elsif ($reader->nodeType() eq XML_READER_TYPE_ENTITY_REFERENCE) {
# for some reason XML_READER_TYPE_ENTITY is never emitted
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert), util/texinfo.dtd, util/txixml2texi.pl: add trailing spaces in block commands arguments.,
Patrice Dumas <=