[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Mon, 31 Jul 2023 10:17:31 -0400 (EDT) |
branch: master
commit bdba06e99d78bdb4f05e724a88724f3b4b25eb6d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Jul 31 15:28:19 2023 +0200
@nodedescriptionblock output
* tp/Texinfo/Convert/HTML.pm (convert_tree_new_formatting_context)
(_convert_paragraph_type, _convert_menu_entry_type): add formatting
of @nodedescriptionblock. Check if node description was formatted more
than once, and use convert_tree_new_formatting_context in that case.
pass block_command to convert_tree_new_formatting_context to be able
tp avoid paragraph markup for the first nodedescriptionblock
paragraph.
* tp/Texinfo/Convert/Plaintext.pm (converter_initialize)
(new_formatter, _convert): formatting of @nodedescriptionblock. Add
'indent_length' to format_context considered variables for
new_formatter. Use text_element_context to set the counter for
nodedescription and nodedescriptionblock. Add seen_node_descriptions
to the converter state to be able to be silent if a node description
is formatted more than once. Determine $description_indent_length
by applying a factor on text_element_context max.
* tp/Texinfo/Convert/HTML.pm (_convert_printindex_command): multiple
pass argument of convert_tree_new_formatting_context usable as
identifier.
* tp/Makefile.tres, tp/t/10menu.t (commands_in_nodedescriptionblock):
test multiple @nodedescriptionblock with commands in it.
---
ChangeLog | 28 +
doc/texi2any_api.texi | 7 +-
tp/Makefile.tres | 1 +
tp/TODO | 4 +-
tp/Texinfo/Convert/HTML.pm | 82 +-
tp/Texinfo/Convert/Plaintext.pm | 84 +-
tp/t/10menu.t | 43 +-
.../menu/commands_in_nodedescriptionblock.pl | 1576 ++++++++++++++++++++
.../menu/nodedescriptionblock_descriptions.pl | 20 +-
tp/t/results/misc_commands/nodedescription.pl | 4 +-
10 files changed, 1808 insertions(+), 41 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3a4c17178b..df54da5e66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2023-07-31 Patrice Dumas <pertusus@free.fr>
+
+ @nodedescriptionblock output
+
+ * tp/Texinfo/Convert/HTML.pm (convert_tree_new_formatting_context)
+ (_convert_paragraph_type, _convert_menu_entry_type): add formatting
+ of @nodedescriptionblock. Check if node description was formatted more
+ than once, and use convert_tree_new_formatting_context in that case.
+ pass block_command to convert_tree_new_formatting_context to be able
+ tp avoid paragraph markup for the first nodedescriptionblock
+ paragraph.
+
+ * tp/Texinfo/Convert/Plaintext.pm (converter_initialize)
+ (new_formatter, _convert): formatting of @nodedescriptionblock. Add
+ 'indent_length' to format_context considered variables for
+ new_formatter. Use text_element_context to set the counter for
+ nodedescription and nodedescriptionblock. Add seen_node_descriptions
+ to the converter state to be able to be silent if a node description
+ is formatted more than once. Determine $description_indent_length
+ by applying a factor on text_element_context max.
+
+ * tp/Texinfo/Convert/HTML.pm (_convert_printindex_command): multiple
+ pass argument of convert_tree_new_formatting_context usable as
+ identifier.
+
+ * tp/Makefile.tres, tp/t/10menu.t (commands_in_nodedescriptionblock):
+ test multiple @nodedescriptionblock with commands in it.
+
2023-07-31 Patrice Dumas <pertusus@free.fr>
@nodedescriptionblock parsing
diff --git a/doc/texi2any_api.texi b/doc/texi2any_api.texi
index 832e46d40e..8653f4a409 100644
--- a/doc/texi2any_api.texi
+++ b/doc/texi2any_api.texi
@@ -1352,7 +1352,8 @@ For such cases, the function is
@code{convert_tree_new_formatting_context} ultimately calls
@code{convert_tree}.
@deftypefun {@var{$converted_text} =}
@var{$converter}->convert_tree_new_formatting_context @
- (@var{\%element}, @var{$context}, @var{$multiple_pass},
@var{$global_context})
+ (@var{\%element}, @var{$context}, @var{$multiple_pass},
@var{$global_context}, @
+ @var{$block_command_name})
@var{\%element} is a Texinfo tree element. @var{$context} is an optional
string describing the new context to be setup to format out of the main
conversion flow. If not defined, the conversion is done in the main document
@@ -1360,7 +1361,9 @@ flow. @var{$multiple_pass} is an optional string that
marks that the
conversion is done more than once. It should be unique and suitable for
inclusion in targets and identifiers. @var{$global_context} is an optional
string that marks that the formatting may be done in advance, and can be
-redone.
+redone. @var{$block_command_name} is an optional block command name that is
+used to initialized the new context. It can be useful, in particular, to
propagate
+the topmost block command in the new context.
The function returns @var{\%element} converted, setting the conversion context
according to the arguments.
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index 34f99b7e5d..fb471dbfad 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -1378,6 +1378,7 @@ test_files_generated_list =
$(test_tap_files_generated_list) \
t/results/macro/zero_argument_comment.pl \
t/results/menu/bad_beginning.pl \
t/results/menu/block_commands_in_menu_description.pl \
+ t/results/menu/commands_in_nodedescriptionblock.pl \
t/results/menu/comment_on_menu_line.pl \
t/results/menu/dash_in_menu.pl \
t/results/menu/detailmenu.pl \
diff --git a/tp/TODO b/tp/TODO
index 3c8a519a38..cbbe1b408b 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -10,7 +10,7 @@ This is the todo list for texi2any
Before next release
===================
-add @nodedescriptionblock command (if no more input from the mailing list).
+add @nodedescription customization
Bugs
====
@@ -29,6 +29,8 @@ Some private function used in conversion
Missing documentation
=====================
+HTML API ignore_notice _noticed_line_warn. Add to API before?
+
Tree documentation in ParserNonXS.pm
------------------------------------
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index bb4b0ee394..849759cc83 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -1052,8 +1052,8 @@ sub command_text($$;$)
'contents' => [$tree]};
}
my $result = $self->convert_tree_new_formatting_context(
- # FIXME check if $document_global_context argument is really needed
- $tree, $command->{'cmdname'}, 'command_text manual_content');
+ # FIXME check if $document_global_context argument would be needed?
+ $tree, $command->{'cmdname'}, 'command_text-manual_content');
return $result;
}
}
@@ -1829,17 +1829,19 @@ sub get_info($$)
# This function should be used in formatting functions when some
# Texinfo tree need to be converted.
-sub convert_tree_new_formatting_context($$;$$$)
+sub convert_tree_new_formatting_context($$;$$$$)
{
my $self = shift;
my $tree = shift;
my $context_string = shift;
my $multiple_pass = shift;
my $document_global_context = shift;
+ my $block_command = shift;
my $context_string_str = '';
if (defined($context_string)) {
- $self->_new_document_context($context_string, $document_global_context);
+ $self->_new_document_context($context_string, $document_global_context,
+ $block_command);
$context_string_str = "C($context_string)";
}
my $multiple_pass_str = '';
@@ -5657,7 +5659,7 @@ sub _convert_printindex_command($$$$)
# call with multiple_pass argument
$entry = $self->convert_tree_new_formatting_context($result_tree,
"index $index_name l $letter index entry $entry_nr seenentry",
- "index formatted
$formatted_index_entries->{$index_entry_ref}")
+
"index-formatted-$formatted_index_entries->{$index_entry_ref}")
} else {
$entry = $self->convert_tree($result_tree,
"index $index_name l $letter index entry $entry_nr
seenentry");
@@ -5672,11 +5674,11 @@ sub _convert_printindex_command($$$$)
# call with multiple_pass argument
$entry =
$self->convert_tree_new_formatting_context($entry_ref_tree,
"index $index_name l $letter index entry $entry_nr (with
seealso)",
- "index formatted $formatted_index_entries->{$index_entry_ref}");
+ "index-formatted-$formatted_index_entries->{$index_entry_ref}");
$reference
= $self->convert_tree_new_formatting_context($reference_tree,
"index $index_name l $letter index entry $entry_nr seealso",
- "index formatted
$formatted_index_entries->{$index_entry_ref}");
+
"index-formatted-$formatted_index_entries->{$index_entry_ref}");
} else {
$entry = $self->convert_tree($entry_ref_tree,
"index $index_name l $letter index entry $entry_nr (with
seealso)");
@@ -5768,7 +5770,7 @@ sub _convert_printindex_command($$$$)
# call with multiple_pass argument
$entry =
$self->convert_tree_new_formatting_context($entry_trees[$level],
"index $index_name l $letter index entry $entry_nr subentry
$level",
- "index formatted
$formatted_index_entries->{$index_entry_ref}")
+
"index-formatted-$formatted_index_entries->{$index_entry_ref}")
} else {
$entry = $self->convert_tree($entry_trees[$level],
"index $index_name l $letter index entry $entry_nr subentry
$level");
@@ -5796,7 +5798,7 @@ sub _convert_printindex_command($$$$)
# call with multiple_pass argument
$entry = $self->convert_tree_new_formatting_context($entry_tree,
"index $index_name l $letter index entry $entry_nr",
- "index formatted
$formatted_index_entries->{$index_entry_ref}")
+
"index-formatted-$formatted_index_entries->{$index_entry_ref}")
} else {
$entry = $self->convert_tree($entry_tree,
"index $index_name l $letter index entry
$entry_nr");
@@ -6161,7 +6163,10 @@ sub _convert_paragraph_type($$$$)
# no first paragraph in those environment to avoid extra spacing
if ($in_format eq 'itemize'
or $in_format eq 'enumerate'
- or $in_format eq 'multitable') {
+ or $in_format eq 'multitable'
+ # this should only happen if in @nodedescriptionblock, otherwise
+ # there are no paragraphs, but preformatted
+ or $in_format eq 'menu') {
return $content;
}
}
@@ -6554,6 +6559,9 @@ sub _convert_menu_entry_type($$$)
my $section;
my $label_info = $menu_entry_node->{'extra'};
+ my $formatted_nodedescriptions
+ = $self->shared_conversion_state('formatted_nodedescriptions', {});
+ my $use_nodedescription;
# external node
my $external_node;
if ($label_info and $label_info->{'manual_content'}) {
@@ -6593,9 +6601,20 @@ sub _convert_menu_entry_type($$$)
->{'contents'}->[0]->{'text'})
and $menu_description->{'contents'}->[0]
->{'contents'}->[0]->{'text'} !~ /\S/)))) {
-
- $menu_description
- = $node->{'extra'}->{'node_description'}->{'args'}->[0];
+ my $node_description = $node->{'extra'}->{'node_description'};
+ if ($node->{'extra'}->{'node_description'}->{'cmdname'}
+ eq 'nodedescription') {
+ $menu_description = $node_description->{'args'}->[0];
+ } else {
+ $menu_description = {'contents' =>
$node_description->{'contents'}};
+ }
+ # update the number of time the node description was formatted
+ if (!$formatted_nodedescriptions->{$node_description}) {
+ $formatted_nodedescriptions->{$node_description} = 1;
+ } else {
+ $formatted_nodedescriptions->{$node_description}++;
+ }
+ $use_nodedescription =
$formatted_nodedescriptions->{$node_description};
}
}
}
@@ -6656,8 +6675,21 @@ sub _convert_menu_entry_type($$$)
my $description = '';
if ($menu_description) {
- $description .= $self->convert_tree($menu_description,
- "menu_arg description preformatted");
+ if ($use_nodedescription) {
+ my $multiple_formatted;
+ if ($use_nodedescription > 1) {
+ $multiple_formatted
+ = 'preformatted-node-description-'.$use_nodedescription;
+ }
+ $description .= $self->convert_tree_new_formatting_context(
+ $menu_description,
+ 'menu_arg node description preformatted',
+ $multiple_formatted, undef,
+ 'menu');
+ } else {
+ $description .= $self->convert_tree($menu_description,
+ 'menu_arg description preformatted');
+ }
}
return $result_name_node . $description;
@@ -6696,8 +6728,19 @@ sub _convert_menu_entry_type($$$)
}
my $description = '';
if ($menu_description) {
- $description = $self->convert_tree($menu_description,
- 'menu_arg description');
+ if ($use_nodedescription) {
+ my $multiple_formatted;
+ if ($use_nodedescription > 1) {
+ $multiple_formatted
+ = 'node-description-'.$use_nodedescription;
+ }
+ $description = $self->convert_tree_new_formatting_context(
+ $menu_description, 'menu_arg node description',
+ $multiple_formatted, undef, 'menu');
+ } else {
+ $description = $self->convert_tree($menu_description,
+ 'menu_arg description');
+ }
if ($self->get_conf('AVOID_MENU_REDUNDANCY')) {
$description = '' if (_simplify_text_for_comparison($name_no_number)
eq _simplify_text_for_comparison($description));
@@ -7324,6 +7367,7 @@ sub _new_document_context($;$$)
my $self = shift;
my $context = shift;
my $document_global_context = shift;
+ my $block_command = shift;
push @{$self->{'document_context'}},
{'context' => $context,
@@ -7337,6 +7381,10 @@ sub _new_document_context($;$$)
if (defined($document_global_context)) {
$self->{'document_global_context'}++;
}
+ if (defined($block_command)) {
+ push @{$self->{'document_context'}->[-1]->{'block_commands'}},
+ $block_command;
+ }
}
sub _pop_document_context($)
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 4e5e04aa01..a39044d6cd 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -428,6 +428,7 @@ sub converter_initialize($)
$self->{'pending_footnotes'} = [];
$self->{'index_entry_node_colon'} = {};
$self->{'index_entries_no_node'} = {};
+ $self->{'seen_node_descriptions'} = {};
foreach my $format (keys(%format_raw_commands)) {
$self->{'ignored_commands'}->{$format} = 1
@@ -691,6 +692,11 @@ sub new_formatter($$;$)
'max' => $self->{'text_element_context'}->[-1]->{'max'},
'indent_level' => $self->{'format_context'}->[-1]->{'indent_level'},
};
+
+ $container_conf->{'indent_length'}
+ = $self->{'format_context'}->[-1]->{'indent_length'}
+ if (defined($self->{'format_context'}->[-1]->{'indent_length'}));
+
$container_conf->{'frenchspacing'} = 1
if ($self->{'conf'}->{'frenchspacing'} eq 'on');
#if ($self->get_conf('frenchspacing') eq 'on');
@@ -700,11 +706,13 @@ sub new_formatter($$;$)
= $self->{'text_element_context'}->[-1]->{'counter'}
if (defined($self->{'text_element_context'}->[-1]->{'counter'}));
$container_conf->{'DEBUG'} = 1 if ($self->{'debug'});
+
if ($conf) {
foreach my $key (keys(%$conf)) {
$container_conf->{$key} = $conf->{$key};
}
}
+
my $indent = $container_conf->{'indent_length'};
$indent = $indent_length*$container_conf->{'indent_level'}
if (!defined($indent));
@@ -1716,7 +1724,9 @@ sub _get_form_feeds($)
return $form_feeds;
}
-my $description_indent_length = 31;
+#my $description_indent_length = 31;
+# computed as 72/31
+my $description_indent_length_factor = 2.32;
sub _convert($$);
@@ -3468,28 +3478,74 @@ sub _convert($$)
and $self->{'labels'}
->{$menu_entry_node->{'extra'}->{'normalized'}}->{'extra'}
->{'node_description'})
{
+ my $description_indent_length
+ = int($self->{'text_element_context'}->[-1]->{'max'}
+ / $description_indent_length_factor);
my $description_element = $self->{'labels'}
->{$menu_entry_node->{'extra'}->{'normalized'}}->{'extra'}
->{'node_description'};
+ if (! exists($self->{'seen_node_descriptions'}
+ ->{$description_element})) {
+ $self->{'seen_node_descriptions'}->{$description_element} = 0;
+ }
+ $self->{'seen_node_descriptions'}->{$description_element}++;
# flush the current unfilled container
$result .= _count_added($self,
$formatter->{'container'},
add_pending_word($formatter->{'container'}, 1));
- # push a paragraph container to format the description.
- my $description_para = $self->new_formatter('paragraph',
- { 'indent_length' => $description_indent_length,
- 'counter'
- =>
Texinfo::Convert::Paragraph::counter($formatter->{'container'}),
- });
- if ($result !~ /\s$/) {
+ my $formatted_elt;
+ my $description_para;
+ my $text_element_context = {
+ 'max' =>
$self->{'text_element_context'}->[-1]->{'max'},
+ 'counter'
+ =>
Texinfo::Convert::Paragraph::counter($formatter->{'container'})
+ };
+ push @{$self->{'text_element_context'}}, $text_element_context;
+ # FIXME set max
+ if ($self->{'seen_node_descriptions'}->{$description_element} > 1)
{
+ $self->{'silent'} = 0 if (!defined($self->{'silent'}));
+ $self->{'silent'}++;
+ }
+ if ($description_element->{'cmdname'} eq 'nodedescription') {
+ # push a paragraph container to format the description.
+ $description_para = $self->new_formatter('paragraph',
+ { 'indent_length' => $description_indent_length });
+ if ($result !~ /\s$/) {
+ $result .= _count_added($self,
$description_para->{'container'},
+ add_text($description_para->{'container'}, '
'));
+ }
+ push @{$self->{'formatters'}}, $description_para;
+ $formatted_elt = $description_element->{'args'}->[0];
+ } else {
+ if ($result !~ /\s$/) {
+ $result .= _count_added($self, $formatter->{'container'},
+ add_text($formatter->{'container'}, ' '));
+ $result .= _count_added($self,
+ $formatter->{'container'},
+ add_pending_word($formatter->{'container'}, 1));
+ }
+ push @{$self->{'format_context'}},
+ { 'cmdname' => $description_element->{'cmdname'},
+ 'paragraph_count' => 0,
+ 'indent_length' => $description_indent_length,
+ # for block commands. Not an exact value
+ 'indent_level' => int($description_indent_length /
$indent_length),
+ };
+
+ $formatted_elt = {'contents' =>
$description_element->{'contents'}};
+ }
+ $result .= _convert($self, $formatted_elt);
+ if ($description_element->{'cmdname'} eq 'nodedescription') {
$result .= _count_added($self, $description_para->{'container'},
- add_text($description_para->{'container'}, '
'));
+
Texinfo::Convert::Paragraph::end($description_para->{'container'}));
+ pop @{$self->{'formatters'}};
+ } else {
+ pop @{$self->{'format_context'}};
+ }
+ pop @{$self->{'text_element_context'}};
+ if ($self->{'seen_node_descriptions'}->{$description_element} > 1)
{
+ $self->{'silent'}--;
}
- push @{$self->{'formatters'}}, $description_para;
- $result .= _convert($self, $description_element->{'args'}->[0]);
- $result .= _count_added($self, $description_para->{'container'},
-
Texinfo::Convert::Paragraph::end($description_para->{'container'}));
- pop @{$self->{'formatters'}};
} else {
$result .= _convert($self, $content);
}
diff --git a/tp/t/10menu.t b/tp/t/10menu.t
index d1479e3ab2..bb9f78d593 100644
--- a/tp/t/10menu.t
+++ b/tp/t/10menu.t
@@ -626,7 +626,48 @@ block desc 2
@end nodedescriptionblock
'],
-);
+['commands_in_nodedescriptionblock',
+'@node Top
+@top test commands in nodedescriptionblock
+
+@menu
+* node1::
+* node2::
+@end menu
+
+@ref{in nodescription}, @ref{f1}.
+
+@node node1
+@chapter chap1
+
+@nodedescriptionblock
+@anchor{in nodescription}
+
+@ref{node2}. Footnote@footnote{in footnote}.
+@cindex in nodedescriptionblock
+
+@float tfloat, f1
+@image{float_image}
+@caption{Cap1}
+@end float
+
+
+@end nodedescriptionblock
+
+@node node2
+@chapter chap2
+
+@ref{in nodescription}, @ref{f1}.
+
+@menu
+* node1::
+@end menu
+
+@printindex cp
+
+@listoffloats tfloat
+
+'],);
my @test_invalid = (
['bad_beginning',
diff --git a/tp/t/results/menu/commands_in_nodedescriptionblock.pl
b/tp/t/results/menu/commands_in_nodedescriptionblock.pl
new file mode 100644
index 0000000000..f0173c6567
--- /dev/null
+++ b/tp/t/results/menu/commands_in_nodedescriptionblock.pl
@@ -0,0 +1,1576 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted %result_converted_errors
+ %result_elements %result_directions_text %result_indices_sort_strings);
+
+use utf8;
+
+$result_trees{'commands_in_nodedescriptionblock'} = {
+ 'contents' => [
+ {
+ 'type' => 'before_node_section'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'Top'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'test commands in nodedescriptionblock'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'top',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'block_line_arg'
+ }
+ ],
+ 'cmdname' => 'menu',
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'text' => '* ',
+ 'type' => 'menu_entry_leading_text'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'node1'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'node1'
+ },
+ 'type' => 'menu_entry_node'
+ },
+ {
+ 'text' => '::',
+ 'type' => 'menu_entry_separator'
+ },
+ {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'text' => '
+'
+ }
+ ],
+ 'type' => 'preformatted'
+ }
+ ],
+ 'type' => 'menu_entry_description'
+ }
+ ],
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 5,
+ 'macro' => ''
+ },
+ 'type' => 'menu_entry'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => '* ',
+ 'type' => 'menu_entry_leading_text'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'node2'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'node2'
+ },
+ 'type' => 'menu_entry_node'
+ },
+ {
+ 'text' => '::',
+ 'type' => 'menu_entry_separator'
+ },
+ {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'text' => '
+'
+ }
+ ],
+ 'type' => 'preformatted'
+ }
+ ],
+ 'type' => 'menu_entry_description'
+ }
+ ],
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 6,
+ 'macro' => ''
+ },
+ 'type' => 'menu_entry'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'menu'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'end',
+ 'extra' => {
+ 'text_arg' => 'menu'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 7,
+ 'macro' => ''
+ }
+ }
+ ],
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 4,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'in nodescription'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'in-nodescription'
+ },
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 9,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => ', '
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'f1'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'f1'
+ },
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 9,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '.
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {},
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => ''
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'node1'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'node_description' => {
+ 'args' => [
+ {
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'block_line_arg'
+ }
+ ],
+ 'cmdname' => 'nodedescriptionblock',
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'in nodescription'
+ }
+ ],
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'anchor',
+ 'extra' => {
+ 'normalized' => 'in-nodescription'
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 15,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'spaces_after_close_brace'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'node2'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'node2'
+ },
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 17,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '. Footnote'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'in footnote'
+ }
+ ],
+ 'type' => 'paragraph'
+ }
+ ],
+ 'type' => 'brace_command_context'
+ }
+ ],
+ 'cmdname' => 'footnote',
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 17,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '.
+'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'in nodedescriptionblock'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'cindex',
+ 'extra' => {
+ 'element_node' => {},
+ 'index_entry' => [
+ 'cp',
+ 1
+ ]
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 18,
+ 'macro' => ''
+ },
+ 'type' => 'index_entry_command'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'tfloat'
+ }
+ ],
+ 'type' => 'block_line_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'f1'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ },
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'type' => 'block_line_arg'
+ }
+ ],
+ 'cmdname' => 'float',
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'float_image'
+ }
+ ],
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'image',
+ 'extra' => {
+ 'input_encoding_name' => 'utf-8'
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 21,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'Cap1'
+ }
+ ],
+ 'type' => 'paragraph'
+ }
+ ],
+ 'type' => 'brace_command_context'
+ }
+ ],
+ 'cmdname' => 'caption',
+ 'extra' => {
+ 'float' => {}
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 22,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'spaces_after_close_brace'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'float'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'end',
+ 'extra' => {
+ 'text_arg' => 'float'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 23,
+ 'macro' => ''
+ }
+ }
+ ],
+ 'extra' => {
+ 'caption' => {},
+ 'float_section' => {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'chap1'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'chapter',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {},
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {},
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 12,
+ 'macro' => ''
+ }
+ },
+ 'float_type' => 'tfloat',
+ 'normalized' => 'f1'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 20,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'nodedescriptionblock'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'end',
+ 'extra' => {
+ 'text_arg' => 'nodedescriptionblock'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 26,
+ 'macro' => ''
+ }
+ }
+ ],
+ 'extra' => {
+ 'element_node' => {}
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 14,
+ 'macro' => ''
+ }
+ },
+ 'node_long_description' => {},
+ 'normalized' => 'node1'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 11,
+ 'macro' => ''
+ }
+ },
+ {},
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'node2'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'isindex' => 1,
+ 'normalized' => 'node2'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 28,
+ 'macro' => ''
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'chap2'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'chapter',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'in nodescription'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'in-nodescription'
+ },
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 31,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => ', '
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'f1'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'f1'
+ },
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'ref',
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 31,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '.
+'
+ }
+ ],
+ 'type' => 'paragraph'
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'block_line_arg'
+ }
+ ],
+ 'cmdname' => 'menu',
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'text' => '* ',
+ 'type' => 'menu_entry_leading_text'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => 'node1'
+ }
+ ],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'node1'
+ },
+ 'type' => 'menu_entry_node'
+ },
+ {
+ 'text' => '::',
+ 'type' => 'menu_entry_separator'
+ },
+ {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'text' => '
+'
+ }
+ ],
+ 'type' => 'preformatted'
+ }
+ ],
+ 'type' => 'menu_entry_description'
+ }
+ ],
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 34,
+ 'macro' => ''
+ },
+ 'type' => 'menu_entry'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'menu'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'end',
+ 'extra' => {
+ 'text_arg' => 'menu'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 35,
+ 'macro' => ''
+ }
+ }
+ ],
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 33,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'cp'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'printindex',
+ 'extra' => {
+ 'misc_args' => [
+ 'cp'
+ ]
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 37,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'tfloat'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'listoffloats',
+ 'extra' => {
+ 'float_type' => 'tfloat'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 39,
+ 'macro' => ''
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {},
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 29,
+ 'macro' => ''
+ }
+ }
+ ],
+ 'type' => 'document_root'
+};
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[2]{'contents'}[1]{'contents'}[0]{'contents'}[1]{'extra'}{'node_content'}[0]
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[2]{'contents'}[1]{'contents'}[0]{'contents'}[1]{'contents'}[0];
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[2]{'contents'}[1]{'contents'}[1]{'contents'}[1]{'extra'}{'node_content'}[0]
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[2]{'contents'}[1]{'contents'}[1]{'contents'}[1]{'contents'}[0];
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[2]{'contents'}[3]{'contents'}[0]{'args'}[0]{'extra'}{'node_content'}[0]
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[2]{'contents'}[3]{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[2]{'contents'}[3]{'contents'}[2]{'args'}[0]{'extra'}{'node_content'}[0]
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[2]{'contents'}[3]{'contents'}[2]{'args'}[0]{'contents'}[0];
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'}{'contents'}[3]{'contents'}[0]{'args'}[0]{'extra'}{'node_content'}[0]
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'}{'contents'}[3]{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'}{'contents'}[3]{'contents'}[4]{'extra'}{'element_node'}
= $result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3];
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'}{'contents'}[5]{'contents'}[2]{'extra'}{'float'}
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'}{'contents'}[5];
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'}{'contents'}[5]{'extra'}{'caption'}
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'}{'contents'}[5]{'contents'}[2];
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'}{'contents'}[5]{'extra'}{'float_section'}{'contents'}[1]
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'};
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'}{'extra'}{'element_node'}
= $result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3];
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_long_description'}
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'};
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[4] =
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[3]{'extra'}{'node_description'}{'contents'}[5]{'extra'}{'float_section'};
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[6]{'contents'}[1]{'contents'}[0]{'args'}[0]{'extra'}{'node_content'}[0]
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[6]{'contents'}[1]{'contents'}[0]{'args'}[0]{'contents'}[0];
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[6]{'contents'}[1]{'contents'}[2]{'args'}[0]{'extra'}{'node_content'}[0]
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[6]{'contents'}[1]{'contents'}[2]{'args'}[0]{'contents'}[0];
+$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[6]{'contents'}[3]{'contents'}[0]{'contents'}[1]{'extra'}{'node_content'}[0]
=
$result_trees{'commands_in_nodedescriptionblock'}{'contents'}[6]{'contents'}[3]{'contents'}[0]{'contents'}[1]{'contents'}[0];
+
+$result_texis{'commands_in_nodedescriptionblock'} = '@node Top
+@top test commands in nodedescriptionblock
+
+@menu
+* node1::
+* node2::
+@end menu
+
+@ref{in nodescription}, @ref{f1}.
+
+@node node1
+@chapter chap1
+
+@nodedescriptionblock
+@anchor{in nodescription}
+
+@ref{node2}. Footnote@footnote{in footnote}.
+@cindex in nodedescriptionblock
+
+@float tfloat, f1
+@image{float_image}
+@caption{Cap1}
+@end float
+
+
+@end nodedescriptionblock
+
+@node node2
+@chapter chap2
+
+@ref{in nodescription}, @ref{f1}.
+
+@menu
+* node1::
+@end menu
+
+@printindex cp
+
+@listoffloats tfloat
+
+';
+
+
+$result_texts{'commands_in_nodedescriptionblock'} = 'test commands in
nodedescriptionblock
+*************************************
+
+* node1::
+* node2::
+
+in nodescription, f1.
+
+1 chap1
+*******
+
+
+2 chap2
+*******
+
+in nodescription, f1.
+
+* node1::
+
+
+
+';
+
+$result_sectioning{'commands_in_nodedescriptionblock'} = {
+ 'structure' => {
+ 'section_childs' => [
+ {
+ 'cmdname' => 'top',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ },
+ 'structure' => {}
+ }
+ },
+ 'structure' => {
+ 'section_childs' => [
+ {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'node1'
+ },
+ 'structure' => {}
+ }
+ },
+ 'structure' => {
+ 'section_level' => 1,
+ 'section_number' => 1,
+ 'section_up' => {},
+ 'toplevel_prev' => {},
+ 'toplevel_up' => {}
+ }
+ },
+ {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'isindex' => 1,
+ 'normalized' => 'node2'
+ },
+ 'structure' => {}
+ }
+ },
+ 'structure' => {
+ 'section_level' => 1,
+ 'section_number' => 2,
+ 'section_prev' => {},
+ 'section_up' => {},
+ 'toplevel_prev' => {},
+ 'toplevel_up' => {}
+ }
+ }
+ ],
+ 'section_level' => 0,
+ 'section_up' => {}
+ }
+ }
+ ],
+ 'section_level' => -1
+ }
+};
+$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
=
$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_prev'}
=
$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_up'}
=
$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[1]{'structure'}{'section_prev'}
=
$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0];
+$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[1]{'structure'}{'section_up'}
=
$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[1]{'structure'}{'toplevel_prev'}
=
$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0];
+$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[1]{'structure'}{'toplevel_up'}
=
$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'commands_in_nodedescriptionblock'}{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
= $result_sectioning{'commands_in_nodedescriptionblock'};
+
+$result_nodes{'commands_in_nodedescriptionblock'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'top',
+ 'extra' => {},
+ 'structure' => {}
+ },
+ 'menus' => [
+ {
+ 'cmdname' => 'menu'
+ }
+ ],
+ 'normalized' => 'Top'
+ },
+ 'structure' => {
+ 'menu_child' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'chapter',
+ 'extra' => {},
+ 'structure' => {
+ 'section_number' => 1
+ }
+ },
+ 'normalized' => 'node1'
+ },
+ 'structure' => {
+ 'node_next' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'chapter',
+ 'extra' => {},
+ 'structure' => {
+ 'section_number' => 2
+ }
+ },
+ 'isindex' => 1,
+ 'menus' => [
+ {
+ 'cmdname' => 'menu'
+ }
+ ],
+ 'normalized' => 'node2'
+ },
+ 'structure' => {
+ 'menu_child' => {},
+ 'node_prev' => {},
+ 'node_up' => {}
+ }
+ },
+ 'node_prev' => {},
+ 'node_up' => {}
+ }
+ },
+ 'node_next' => {}
+ }
+};
+$result_nodes{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'}{'structure'}{'node_next'}{'structure'}{'menu_child'}
= $result_nodes{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'};
+$result_nodes{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'}{'structure'}{'node_next'}{'structure'}{'node_prev'}
= $result_nodes{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'};
+$result_nodes{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'}{'structure'}{'node_next'}{'structure'}{'node_up'}
= $result_nodes{'commands_in_nodedescriptionblock'};
+$result_nodes{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'}{'structure'}{'node_prev'}
= $result_nodes{'commands_in_nodedescriptionblock'};
+$result_nodes{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'}{'structure'}{'node_up'}
= $result_nodes{'commands_in_nodedescriptionblock'};
+$result_nodes{'commands_in_nodedescriptionblock'}{'structure'}{'node_next'} =
$result_nodes{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'};
+
+$result_menus{'commands_in_nodedescriptionblock'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ },
+ 'structure' => {
+ 'menu_child' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'node1'
+ },
+ 'structure' => {
+ 'menu_next' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'isindex' => 1,
+ 'normalized' => 'node2'
+ },
+ 'structure' => {
+ 'menu_child' => {},
+ 'menu_prev' => {},
+ 'menu_up' => {},
+ 'menu_up_hash' => {
+ 'Top' => 1
+ }
+ }
+ },
+ 'menu_up' => {},
+ 'menu_up_hash' => {
+ 'Top' => 1,
+ 'node2' => 1
+ }
+ }
+ }
+ }
+};
+$result_menus{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'}{'structure'}{'menu_next'}{'structure'}{'menu_child'}
= $result_menus{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'};
+$result_menus{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'}{'structure'}{'menu_next'}{'structure'}{'menu_prev'}
= $result_menus{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'};
+$result_menus{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'}{'structure'}{'menu_next'}{'structure'}{'menu_up'}
= $result_menus{'commands_in_nodedescriptionblock'};
+$result_menus{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'}{'structure'}{'menu_up'}
=
$result_menus{'commands_in_nodedescriptionblock'}{'structure'}{'menu_child'}{'structure'}{'menu_next'};
+
+$result_errors{'commands_in_nodedescriptionblock'} = [];
+
+
+$result_floats{'commands_in_nodedescriptionblock'} = {
+ 'tfloat' => [
+ {
+ 'cmdname' => 'float',
+ 'extra' => {
+ 'caption' => {
+ 'cmdname' => 'caption',
+ 'extra' => {
+ 'float' => {}
+ }
+ },
+ 'float_section' => {
+ 'cmdname' => 'chapter',
+ 'extra' => {},
+ 'structure' => {
+ 'section_number' => 1
+ }
+ },
+ 'float_type' => 'tfloat',
+ 'normalized' => 'f1'
+ },
+ 'structure' => {
+ 'float_number' => '1.1'
+ }
+ }
+ ]
+};
+$result_floats{'commands_in_nodedescriptionblock'}{'tfloat'}[0]{'extra'}{'caption'}{'extra'}{'float'}
= $result_floats{'commands_in_nodedescriptionblock'}{'tfloat'}[0];
+
+
+$result_indices_sort_strings{'commands_in_nodedescriptionblock'} = {
+ 'cp' => [
+ 'in nodedescriptionblock'
+ ]
+};
+
+
+
+$result_converted{'plaintext'}->{'commands_in_nodedescriptionblock'} = 'test
commands in nodedescriptionblock
+*************************************
+
+* Menu:
+
+* node1::
+ *note node2::. Footnote(1).
+
+[float_image]
+
+ tfloat 1.1: Cap1
+
+
+* node2::
+
+*note in nodescription::, *note tfloat 1.1: f1.
+
+ ---------- Footnotes ----------
+
+ (1) in footnote
+
+1 chap1
+*******
+
+2 chap2
+*******
+
+*note in nodescription::, *note tfloat 1.1: f1.
+
+* Menu:
+
+* node1::
+ *note node2::. Footnote(1).
+
+[float_image]
+
+ tfloat 1.1: Cap1
+
+
+
+* Menu:
+
+* in nodedescriptionblock: node2. (line 32)
+
+* Menu:
+
+* tfloat 1.1: f1. Cap1
+
+ ---------- Footnotes ----------
+
+ (1) in footnote
+
+';
+
+$result_converted_errors{'plaintext'}->{'commands_in_nodedescriptionblock'} = [
+ {
+ 'error_line' => 'warning: could not find @image file `float_image.txt\'
nor alternate text
+',
+ 'file_name' => '',
+ 'line_nr' => 21,
+ 'macro' => '',
+ 'text' => 'could not find @image file `float_image.txt\' nor alternate
text',
+ 'type' => 'warning'
+ }
+];
+
+
+
+$result_converted{'html'}->{'commands_in_nodedescriptionblock'} = '<!DOCTYPE
html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>test commands in nodedescriptionblock</title>
+
+<meta name="description" content="test commands in nodedescriptionblock">
+<meta name="keywords" content="test commands in nodedescriptionblock">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="#Top" rel="start" title="Top">
+<link href="#node2" rel="index" title="node2">
+<style type="text/css">
+<!--
+a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
+a.summary-letter-printindex {text-decoration: none}
+span:hover a.copiable-link {visibility: visible}
+td.menu-entry-description {vertical-align: top}
+td.menu-entry-destination {vertical-align: top}
+td.printindex-index-entry {vertical-align: top}
+td.printindex-index-section {vertical-align: top; padding-left: 1em}
+th.entries-header-printindex {text-align:left}
+th.sections-header-printindex {text-align:left; padding-left: 1em}
+-->
+</style>
+
+
+</head>
+
+<body lang="en">
+<div class="top-level-extent" id="Top">
+<div class="nav-panel">
+<p>
+Next: <a href="#node1" accesskey="n" rel="next">chap1</a> [<a
href="#node2" title="Index" rel="index">Index</a>]</p>
+</div>
+<h1 class="top" id="test-commands-in-nodedescriptionblock"><span>test commands
in nodedescriptionblock<a class="copiable-link"
href="#test-commands-in-nodedescriptionblock"> ¶</a></span></h1>
+
+<table class="menu" border="0" cellspacing="0">
+<tr><td class="menu-entry-destination">• <a href="#node1"
accesskey="1">node1</a>:</td><td> </td><td
class="menu-entry-description"><a class="anchor" id="in-nodescription"></a>
+<a class="ref" href="#node2">chap2</a>. Footnote<a class="footnote" id="DOCF1"
href="#FOOT1"><sup>1</sup></a>.
+<a class="index-entry-id" id="index-in-nodedescriptionblock"></a>
+
+<div class="float" id="f1">
+<img class="image" src="float_image.jpg" alt="float_image">
+<div class="caption"><p><strong class="strong">tfloat 1.1:
</strong>Cap1</p></div></div>
+
+</td></tr>
+<tr><td class="menu-entry-destination">• <a href="#node2" rel="index"
accesskey="2">node2</a>:</td><td> </td><td
class="menu-entry-description">
+</td></tr>
+</table>
+
+<p><a class="ref" href="#in-nodescription">in nodescription</a>, <a
class="ref" href="#f1">tfloat 1.1</a>.
+</p>
+<hr>
+<div class="chapter-level-extent" id="node1">
+<div class="nav-panel">
+<p>
+Next: <a href="#node2" accesskey="n" rel="next">chap2</a>, Previous: <a
href="#Top" accesskey="p" rel="prev">test commands in nodedescriptionblock</a>,
Up: <a href="#Top" accesskey="u" rel="up">test commands in
nodedescriptionblock</a> [<a href="#node2" title="Index"
rel="index">Index</a>]</p>
+</div>
+<h2 class="chapter" id="chap1"><span>1 chap1<a class="copiable-link"
href="#chap1"> ¶</a></span></h2>
+
+
+<hr>
+</div>
+<div class="chapter-level-extent" id="node2">
+<div class="nav-panel">
+<p>
+Previous: <a href="#node1" accesskey="p" rel="prev">chap1</a>, Up: <a
href="#Top" accesskey="u" rel="up">test commands in nodedescriptionblock</a>
[<a href="#node2" title="Index" rel="index">Index</a>]</p>
+</div>
+<h2 class="chapter" id="chap2"><span>2 chap2<a class="copiable-link"
href="#chap2"> ¶</a></span></h2>
+
+<p><a class="ref" href="#in-nodescription">in nodescription</a>, <a
class="ref" href="#f1">tfloat 1.1</a>.
+</p>
+<table class="menu" border="0" cellspacing="0">
+<tr><td class="menu-entry-destination">• <a href="#node1"
accesskey="1">node1</a>:</td><td> </td><td
class="menu-entry-description">
+<a class="ref" href="#node2">chap2</a>. Footnote<a class="footnote"
id="t_fnode-description-2_DOCF1_2"
href="#t_fnode-description-2_FOOT1_2"><sup>2</sup></a>.
+
+<div class="float" id="f1">
+<img class="image" src="float_image.jpg" alt="float_image">
+<div class="caption"><p><strong class="strong">tfloat 1.1:
</strong>Cap1</p></div></div>
+
+</td></tr>
+</table>
+
+<div class="printindex cp-printindex">
+<table class="cp-entries-printindex" border="0">
+<tr><td></td><th class="entries-header-printindex">Index Entry</th><th
class="sections-header-printindex">Section</th></tr>
+<tr><td colspan="3"><hr></td></tr>
+<tr><th id="node2_cp_letter-I">I</th></tr>
+<tr><td></td><td class="printindex-index-entry"><a
href="#index-in-nodedescriptionblock">in nodedescriptionblock</a></td><td
class="printindex-index-section"><a href="#node1">node1</a></td></tr>
+<tr><td colspan="3"><hr></td></tr>
+</table>
+</div>
+
+<dl class="listoffloats">
+<dt><a href="#f1">tfloat 1.1</a></dt><dd
class="caption-in-listoffloats"><p>Cap1</p></dd>
+</dl>
+
+</div>
+</div>
+<div class="footnotes-segment">
+<hr>
+<h4 class="footnotes-heading">Footnotes</h4>
+
+<h5 class="footnote-body-heading"><a id="FOOT1" href="#DOCF1">(1)</a></h5>
+<p>in footnote</p>
+<h5 class="footnote-body-heading"><a id="t_fnode-description-2_FOOT1_2"
href="#t_fnode-description-2_DOCF1_2">(2)</a></h5>
+<p>in footnote</p>
+</div>
+
+
+
+</body>
+</html>
+';
+
+$result_converted_errors{'html'}->{'commands_in_nodedescriptionblock'} = [
+ {
+ 'error_line' => 'warning: @image file `float_image\' (for HTML) not found,
using `float_image.jpg\'
+',
+ 'file_name' => '',
+ 'line_nr' => 21,
+ 'macro' => '',
+ 'text' => '@image file `float_image\' (for HTML) not found, using
`float_image.jpg\'',
+ 'type' => 'warning'
+ }
+];
+
+
+
+$result_converted{'xml'}->{'commands_in_nodedescriptionblock'} = '<node
name="Top" spaces=" "><nodename>Top</nodename><nodenext
automatic="on">node1</nodenext></node>
+<top spaces=" "><sectiontitle>test commands in
nodedescriptionblock</sectiontitle>
+
+<menu endspaces=" ">
+<menuentry><menuleadingtext>*
</menuleadingtext><menunode>node1</menunode><menuseparator>::</menuseparator><menudescription><pre
xml:space="preserve">
+</pre></menudescription></menuentry><menuentry><menuleadingtext>*
</menuleadingtext><menunode>node2</menunode><menuseparator>::</menuseparator><menudescription><pre
xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+<para><ref label="in-nodescription"><xrefnodename>in
nodescription</xrefnodename></ref>, <ref
label="f1"><xrefnodename>f1</xrefnodename></ref>.
+</para>
+</top>
+<node name="node1" spaces=" "><nodename>node1</nodename><nodenext
automatic="on">node2</nodenext><nodeprev automatic="on">Top</nodeprev><nodeup
automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>chap1</sectiontitle>
+
+<nodedescriptionblock endspaces=" ">
+<anchor name="in-nodescription">in nodescription</anchor>
+
+<para><ref label="node2"><xrefnodename>node2</xrefnodename></ref>.
Footnote<footnote><para>in footnote</para></footnote>.
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">in
nodedescriptionblock</indexterm></cindex>
+</para>
+<float name="f1" type="tfloat" number="1.1" spaces=" " endspaces="
"><floattype>tfloat</floattype><floatname spaces=" ">f1</floatname>
+<image><imagefile>float_image</imagefile></image>
+<caption><para>Cap1</para></caption>
+</float>
+
+
+</nodedescriptionblock>
+
+</chapter>
+<node name="node2" spaces=" "><nodename>node2</nodename><nodeprev
automatic="on">node1</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>chap2</sectiontitle>
+
+<para><ref label="in-nodescription"><xrefnodename>in
nodescription</xrefnodename></ref>, <ref
label="f1"><xrefnodename>f1</xrefnodename></ref>.
+</para>
+<menu endspaces=" ">
+<menuentry><menuleadingtext>*
</menuleadingtext><menunode>node1</menunode><menuseparator>::</menuseparator><menudescription><pre
xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+
+<listoffloats type="tfloat" spaces=" ">tfloat</listoffloats>
+
+</chapter>
+';
+
+1;
diff --git a/tp/t/results/menu/nodedescriptionblock_descriptions.pl
b/tp/t/results/menu/nodedescriptionblock_descriptions.pl
index d3ea2bc2cf..79edb7aaa3 100644
--- a/tp/t/results/menu/nodedescriptionblock_descriptions.pl
+++ b/tp/t/results/menu/nodedescriptionblock_descriptions.pl
@@ -1909,11 +1909,15 @@
$result_converted{'plaintext'}->{'nodedescriptionblock_descriptions'} = 'test of
description_slightly long and vv somewhat
ånexpected
* titi:: desc of titi
-* name of other: other.
+* name of other: other. Long description of other
+
+ Para2
+
+ a quotation in description
* a somewhat long node without description nor following space:: not as
long as the node
-* node double nodedescriptionblock::
+* node double nodedescriptionblock:: block desc 1
1 Toto
******
@@ -1973,11 +1977,19 @@ Next: <a href="#toto" accesskey="n" rel="next">Toto</a>
</p>
<tr><td class="menu-entry-destination">• <a href="#toto"
accesskey="1">toto</a>:</td><td> </td><td
class="menu-entry-description">toto is there:: and the <em class="emph">is a
description</em>slightly long<!-- /@w --> and <code
class="verb">vv somewhat</code> ånexpected</td></tr>
<tr><td class="menu-entry-destination">• <a href="#titi"
accesskey="2">titi</a>:</td><td> </td><td
class="menu-entry-description">desc of titi
</td></tr>
-<tr><td class="menu-entry-destination">• <a href="#other"
accesskey="3">name of other</a>:</td><td> </td><td
class="menu-entry-description"></td></tr>
+<tr><td class="menu-entry-destination">• <a href="#other"
accesskey="3">name of other</a>:</td><td> </td><td
class="menu-entry-description">Long description of other
+
+<p>Para2
+</p>
+<blockquote class="quotation">
+<p>a quotation in description
+</p></blockquote>
+</td></tr>
<tr><th class="menu-comment" colspan="3"><pre
class="menu-comment-preformatted">
</pre></th></tr><tr><td class="menu-entry-destination">• <a
href="#a-somewhat-long-node-without-description-nor-following-space"
accesskey="4">a somewhat long node without description nor following
space</a>:</td><td> </td><td class="menu-entry-description">not as
long as the node</td></tr>
-<tr><td class="menu-entry-destination">• <a
href="#node-double-nodedescriptionblock" accesskey="5">node double
nodedescriptionblock</a>:</td><td> </td><td
class="menu-entry-description"></td></tr>
+<tr><td class="menu-entry-destination">• <a
href="#node-double-nodedescriptionblock" accesskey="5">node double
nodedescriptionblock</a>:</td><td> </td><td
class="menu-entry-description">block desc 1
+</td></tr>
</table>
<hr>
diff --git a/tp/t/results/misc_commands/nodedescription.pl
b/tp/t/results/misc_commands/nodedescription.pl
index cc4e2f9a0a..60c057787c 100644
--- a/tp/t/results/misc_commands/nodedescription.pl
+++ b/tp/t/results/misc_commands/nodedescription.pl
@@ -417,12 +417,12 @@ $result_errors{'nodedescription'} = [
'type' => 'warning'
},
{
- 'error_line' => 'warning: multiple node descriptions
+ 'error_line' => 'warning: multiple node @nodedescription
',
'file_name' => '',
'line_nr' => 11,
'macro' => '',
- 'text' => 'multiple node descriptions',
+ 'text' => 'multiple node @nodedescription',
'type' => 'warning'
}
];