texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/ParserNonXS.pm (_is_container_empty,


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/ParserNonXS.pm (_is_container_empty, _close_container) (_end_preformatted, _close_current), tp/Texinfo/XS/parsetexi/close.c (is_container_empty, close_container, close_current), tp/Texinfo/XS/parsetexi/parser.c (end_preformatted): pass the source marks of an element without any information except for source marks to the parent. Add is_container_empty that returns if a container contains information. Put closing empty type code in close_container and use it in end_preformatted too.
Date: Sat, 04 Feb 2023 09:47:03 -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 e3bb89e02b * tp/Texinfo/ParserNonXS.pm (_is_container_empty, 
_close_container) (_end_preformatted, _close_current), 
tp/Texinfo/XS/parsetexi/close.c (is_container_empty, close_container, 
close_current), tp/Texinfo/XS/parsetexi/parser.c (end_preformatted): pass the 
source marks of an element without any information except for source marks to 
the parent.  Add is_container_empty that returns if a container contains 
information.  Put closing empty type code in close_container and use  [...]
e3bb89e02b is described below

commit e3bb89e02b382574f6d70d62518c1a95b183e504
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Feb 4 15:46:25 2023 +0100

    * tp/Texinfo/ParserNonXS.pm (_is_container_empty, _close_container)
    (_end_preformatted, _close_current), tp/Texinfo/XS/parsetexi/close.c
    (is_container_empty, close_container, close_current),
    tp/Texinfo/XS/parsetexi/parser.c (end_preformatted): pass the source
    marks of an element without any information except for source marks to
    the parent.  Add is_container_empty that returns if a container
    contains information.  Put closing empty type code in close_container
    and use it in end_preformatted too.
    
    * tp/Texinfo/ParserNonXS.pm (_pop_element_from_contents),
    tp/Texinfo/XS/parsetexi/tree.c (pop_element_from_contents): replace
    reparented source marks from popped element to the preceding element
    by using place_source_mark on the parent instead of add_source_marks.
    Remove the popped element earlier, in XS parser such that the replaced
    source marks are placed on preceding elements.
    
    * tp/Texinfo/ParserNonXS.pm (_gather_def_item)
    (_close_command_cleanup, _end_line_misc_line)
    (_end_line_starting_block, _process_remaining_on_line): use
    _pop_element_from_contents.  Avoid empty contents.
---
 ChangeLog                                          |  23 +
 tp/TODO                                            |   2 +
 tp/Texinfo/ParserNonXS.pm                          | 206 +++---
 tp/Texinfo/XS/parsetexi/close.c                    |  91 ++-
 tp/Texinfo/XS/parsetexi/parser.c                   |   9 +-
 tp/Texinfo/XS/parsetexi/parser.h                   |   1 +
 tp/Texinfo/XS/parsetexi/source_marks.h             |   1 +
 tp/Texinfo/XS/parsetexi/tree.c                     |  21 +-
 tp/t/results/conditionals/macro_in_ifset.pl        |  37 +-
 tp/t/results/conditionals/macro_in_ifset_set.pl    |  37 +-
 tp/t/results/conditionals/nested_ifset_ifclear.pl  | 144 ++--
 .../conditionals/user_defined_txiinternalvalue.pl  |  27 +-
 .../coverage/delcomment_followed_by_cpp_line.pl    |  17 +-
 tp/t/results/coverage_braces/test_image.pl         | 242 +++---
 tp/t/results/include/cpp_lines.pl                  | 126 ++--
 .../include_with_setfilename_in_preformatted.pl    |  70 +-
 .../macro_and_commands_in_early_commands.pl        |  65 +-
 .../results/include/macro_definition_in_include.pl |  37 +-
 tp/t/results/include/macro_in_early_commands.pl    | 129 ++--
 tp/t/results/info_tests/def_in_copying.pl          |  74 +-
 tp/t/results/macro/arg_body_expansion_order.pl     |  73 +-
 tp/t/results/macro/backslash_in_arg.pl             | 237 ++----
 tp/t/results/macro/bib_example.pl                  | 192 ++---
 tp/t/results/macro/complete_macro_for_end.pl       |  41 +-
 tp/t/results/macro/complex_argument.pl             | 153 ++--
 tp/t/results/macro/cpp_directives_after_macros.pl  |  48 +-
 tp/t/results/macro/cpp_directives_in_macro.pl      |  43 +-
 tp/t/results/macro/empty_macro_argument.pl         |  72 +-
 tp/t/results/macro/expand_two_same.pl              |  78 +-
 tp/t/results/macro/expansion_order.pl              |  70 +-
 tp/t/results/macro/form_feeds.pl                   |  78 +-
 tp/t/results/macro/glossary.pl                     | 234 +++---
 tp/t/results/macro/ifclear_in_macro.pl             |  39 +-
 tp/t/results/macro/ifset_and_end_isef_in_macro.pl  |  27 +-
 tp/t/results/macro/ifset_in_macro.pl               |  39 +-
 tp/t/results/macro/ifset_in_macro_set.pl           |  39 +-
 tp/t/results/macro/ignored_macro_definition.pl     |  37 +-
 tp/t/results/macro/implicit_quoting_one_arg.pl     |  37 +-
 tp/t/results/macro/implicit_quoting_recursion.pl   | 238 +++---
 tp/t/results/macro/include_after_empty_line_arg.pl |  37 +-
 tp/t/results/macro/line_after_recursive_call.pl    |  28 +-
 tp/t/results/macro/macro_expands_to_empty.pl       |  35 +-
 tp/t/results/macro/macro_for_end.pl                |  41 +-
 .../macro/macro_for_ignored_line_command.pl        |  37 +-
 tp/t/results/macro/macro_in_brace_command.pl       |  39 +-
 tp/t/results/macro/macro_in_index_commands.pl      | 107 ++-
 tp/t/results/macro/macro_in_macro_arg.pl           |  70 +-
 tp/t/results/macro/macro_in_macro_arg_simpler.pl   |  70 +-
 tp/t/results/macro/macro_in_menu.pl                | 131 ++--
 tp/t/results/macro/macro_in_misc_commands.pl       | 810 ++++++++-------------
 tp/t/results/macro/macro_name_with_digit.pl        |  37 +-
 tp/t/results/macro/macro_name_with_hyphen.pl       |  43 +-
 tp/t/results/macro/macro_no_arg_bad_expansion.pl   |  27 +-
 tp/t/results/macro/macro_no_arg_expansion.pl       |  37 +-
 tp/t/results/macro/macro_one_arg_end_of_file.pl    |  37 +-
 .../macro_with_error_at_end_line_after_macro.pl    |  37 +-
 tp/t/results/macro/macro_zero.pl                   |  37 +-
 tp/t/results/macro/no_macrobody.pl                 |  48 +-
 tp/t/results/macro/protect_comma_macro_line.pl     |  37 +-
 tp/t/results/macro/protect_in_body_line_arg.pl     |  27 +-
 tp/t/results/macro/protect_in_body_one_arg.pl      |  37 +-
 tp/t/results/macro/recursive_call_in_argument.pl   |  37 +-
 tp/t/results/macro/redefine_texinfo_macro.pl       |  37 +-
 tp/t/results/macro/simple_imbricated_macro.pl      |  72 +-
 .../macro/simple_imbricated_macro_rmacro.pl        |  72 +-
 tp/t/results/macro/too_much_args.pl                |  43 +-
 tp/t/results/macro/two_macros_on_a_line.pl         | 144 ++--
 .../codequoteundirected_codequotebacktick.pl       | 525 ++++++-------
 tp/t/results/misc_commands/kbdinputstyle.pl        | 107 +--
 .../misc_commands/kbdinputstyle_in_table.pl        | 107 +--
 tp/t/results/misc_commands/test_allowcodebreaks.pl | 111 +--
 .../plaintext_tests/star_at_command_formatting.pl  | 111 +--
 .../value_and_macro/comma_value_in_macro_arg.pl    |  37 +-
 .../results/value_and_macro/value_in_macro_body.pl |  37 +-
 tp/t/results/xtable/table_nested.pl                | 206 +++---
 75 files changed, 3105 insertions(+), 3484 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7ccfd24468..a4c77927e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,29 @@
        * tp/t/README: advise to rebuild after git pull
        * tp/tests/README: update test results with "make -k check copy-tests".
 
+2023-02-04  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/ParserNonXS.pm (_is_container_empty, _close_container)
+       (_end_preformatted, _close_current), tp/Texinfo/XS/parsetexi/close.c
+       (is_container_empty, close_container, close_current),
+       tp/Texinfo/XS/parsetexi/parser.c (end_preformatted): pass the source
+       marks of an element without any information except for source marks to
+       the parent.  Add is_container_empty that returns if a container
+       contains information.  Put closing empty type code in close_container
+       and use it in end_preformatted too.
+
+       * tp/Texinfo/ParserNonXS.pm (_pop_element_from_contents),
+       tp/Texinfo/XS/parsetexi/tree.c (pop_element_from_contents): replace
+       reparented source marks from popped element to the preceding element
+       by using place_source_mark on the parent instead of add_source_marks.
+       Remove the popped element earlier, in XS parser such that the replaced
+       source marks are placed on preceding elements.
+
+       * tp/Texinfo/ParserNonXS.pm (_gather_def_item)
+       (_close_command_cleanup, _end_line_misc_line)
+       (_end_line_starting_block, _process_remaining_on_line): use
+       _pop_element_from_contents.  Avoid empty contents.
+
 2023-02-04  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (_close_current),
diff --git a/tp/TODO b/tp/TODO
index 20ccb326b4..1e24993eb7 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -20,6 +20,8 @@ protecting end of line in @def*, @setfilename in included 
files.
 Fix
 # FIXME this is wrong, the source mark ends up at a wrong location
 
+# FIXME need a test for a container other than preformatted
+
 check that there is a test of something like
 @macro cpfn
  cp fn
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index dd2bf9cb9d..799401b642 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -1631,6 +1631,69 @@ sub _end_paragraph($$$;$$)
   return $current;
 }
 
+sub _is_container_empty($)
+{
+  my $current = shift;
+  if (not $current->{'contents'}
+      and not $current->{'args'}
+      and (not defined($current->{'text'}) or $current->{'text'} eq '')
+      and not $current->{'info'}) {
+    return 1;
+  }
+  return 0;
+}
+
+sub _close_container($$)
+{
+  my $self = shift;
+  my $current = shift;
+
+  # remove an empty content that only holds source marks
+  if ($current->{'contents'} and scalar(@{$current->{'contents'}}) == 1) {
+    my $child_element = $current->{'contents'}->[0];
+    if (not defined($child_element->{'cmdname'})
+        and _is_container_empty($child_element)) {
+      if ($child_element->{'source_marks'}
+          and scalar(@{$child_element->{'source_marks'}})) {
+        _add_source_marks($child_element->{'source_marks'}, $current);
+      }
+      print STDERR "REMOVE empty child "
+         .Texinfo::Common::debug_print_element_short($child_element)
+          .' '.Texinfo::Common::debug_print_element_short($current)."\n"
+            if ($self->{'DEBUG'});
+      _pop_element_from_contents($self, $current);
+    }
+  }
+
+  # remove element without contents nor associated information
+  my $element_to_remove;
+  if (_is_container_empty($current)) {
+    if ($current->{'source_marks'}
+        and scalar(@{$current->{'source_marks'}})) {
+      # keep the element to keep the source mark, but remove the type.
+      # FIXME need a test for a container other than preformatted
+      delete $current->{'type'};
+    } else {
+      $element_to_remove = $current;
+    }
+  }
+  $current = $current->{'parent'};
+
+  if ($element_to_remove
+      # this is to avoid removing empty containers in args,
+      # happens with brace commands not closed at the end of
+      # a manual
+      and $current->{'contents'}
+      and scalar(@{$current->{'contents'}})
+      and $current->{'contents'}->[-1] eq $element_to_remove) {
+    print STDERR "REMOVE empty type "
+      .Texinfo::Common::debug_print_element_short($element_to_remove)."\n"
+        if ($self->{'DEBUG'});
+    _pop_element_from_contents($self, $current);
+  }
+  return $current;
+}
+
 # close brace commands except for @caption, @footnote then the preformatted
 sub _end_preformatted($$$;$$)
 {
@@ -1643,15 +1706,7 @@ sub _end_preformatted($$$;$$)
 
   if ($current->{'type'} and $current->{'type'} eq 'preformatted') {
     print STDERR "CLOSE PREFORMATTED\n" if ($self->{'DEBUG'});
-    # completly remove void preformatted contexts
-    if (!$current->{'contents'}) {
-      # FIXME check that there is a test case for this situation with
-      # a source mark
-      my $removed
-       = _pop_element_from_contents($self, $current->{'parent'}, 1);
-      print STDERR "popping $removed->{'type'}\n" if ($self->{'DEBUG'});
-    }
-    $current = $current->{'parent'};
+    $current = _close_container($self, $current);
   }
   return $current;
 }
@@ -1821,9 +1876,9 @@ sub _gather_previous_item($$;$$)
 
 # Starting from the end, gather everything util the def_line to put in
 # a def_item
-sub _gather_def_item($;$)
+sub _gather_def_item($$;$)
 {
-  my ($current, $next_command) = @_;
+  my ($self, $current, $next_command) = @_;
 
   my $type;
   # means that we are between a @def*x and a @def
@@ -1848,7 +1903,7 @@ sub _gather_def_item($;$)
         and $current->{'contents'}->[-1]->{'type'} eq 'def_line') {
       last;
     } else {
-      my $item_content = pop @{$current->{'contents'}};
+      my $item_content = _pop_element_from_contents($self, $current);
       $item_content->{'parent'} = $def_item;
       unshift @{$def_item->{'contents'}}, $item_content;
     }
@@ -1904,7 +1959,7 @@ sub _close_command_cleanup($$) {
   if ($def_commands{$current->{'cmdname'}}) {
     # At this point the end command hasn't been added to the command contents.
     # so checks cannot be done at this point.
-    _gather_def_item($current);
+    _gather_def_item($self, $current);
   }
 
   if ($block_commands{$current->{'cmdname'}}
@@ -1942,7 +1997,7 @@ sub _close_command_cleanup($$) {
             and @{$before_item->{'contents'}}
             and $before_item->{'contents'}->[-1]->{'cmdname'}
             and $before_item->{'contents'}->[-1]->{'cmdname'} eq 'end') {
-          my $end = pop @{$before_item->{'contents'}};
+          my $end = _pop_element_from_contents($self, $before_item);
           $end->{'parent'} = $current;
           push @{$current->{'contents'}}, $end;
         }
@@ -2084,56 +2139,7 @@ sub _close_current($$$;$$)
     } elsif ($current->{'type'} eq 'block_line_arg') {
       _end_line_starting_block($self, $current, $source_info);
     }
-    # FIXME this does not work as intended for menu entries because they
-    # are in args
-    ## remove empty child that only holds a source mark, reparenting the
-    ## source park to the current element
-    #if ($current->{'contents'} and scalar(@{$current->{'contents'}}) == 1) {
-    #  my $child_element = $current->{'contents'}->[0];
-    #  if (not defined($child_element->{'cmdname'})
-    #      and not $child_element->{'contents'}
-    #      and not $child_element->{'args'}
-    #      and (not defined($child_element->{'text'})
-    #           or $child_element->{'text'} eq '')
-    #      and not $child_element->{'info'}) {
-    #    if ($child_element->{'source_marks'}
-    #        and scalar(@{$child_element->{'source_marks'}})) {
-    #      _add_source_marks($child_element->{'source_marks'}, $current);
-    #    }
-    #    print STDERR "REMOVE empty child "
-    #      .Texinfo::Common::debug_print_element_short($child_element)
-    #      .' '.Texinfo::Common::debug_print_element_short($current)."\n"
-    #        if ($self->{'DEBUG'});
-    #    _pop_element_from_contents($self, $current);
-    #  }
-    #}
-    # empty types, not closed or associated to a command that is not closed
-    delete $current->{'contents'}
-      if ($current->{'contents'} and !@{$current->{'contents'}});
-    # remove element without contents nor associated information
-    my $element_to_remove;
-    if (not $current->{'contents'}
-        and not $current->{'args'}
-        and (not defined($current->{'text'}) or $current->{'text'} eq '')
-        and not $current->{'info'}
-        and (not $current->{'source_marks'}
-             or not scalar(@{$current->{'source_marks'}}))) {
-      $element_to_remove = $current;
-    }
-    $current = $current->{'parent'};
-
-    if ($element_to_remove
-        # this is to avoid removing empty containers in args,
-        # happens with brace commands not closed at the end of
-        # a manual
-        and $current->{'contents'}
-        and scalar(@{$current->{'contents'}})
-        and $current->{'contents'}->[-1] eq $element_to_remove) {
-      print STDERR "REMOVE empty type "
-        .Texinfo::Common::debug_print_element_short($element_to_remove)."\n"
-          if ($self->{'DEBUG'});
-      _pop_element_from_contents($self, $current);
-    }
+    $current = _close_container($self, $current);
   } else { # Should never go here.
     $current = $current->{'parent'} if ($current->{'parent'});
     $self->_bug_message("No type nor cmdname when closing",
@@ -2629,12 +2635,12 @@ sub _pop_element_from_contents($$;$)
   my $popped_element = pop @{$parent_element->{'contents'}};
   if ($reparent_source_marks and $popped_element->{'source_marks'}) {
     # FIXME this is wrong, the source mark ends up at a wrong location
-    _add_source_marks($popped_element->{'source_marks'},
-                      $parent_element);
+    #_add_source_marks($popped_element->{'source_marks'},
+    #                  $parent_element);
     # This would be better, but leads to empty elements being kept.
-    #foreach my $source_mark (@{$popped_element->{'source_marks'}}) {
-    #  _place_source_mark($self, $parent_element, $source_mark);
-    #}
+    foreach my $source_mark (@{$popped_element->{'source_marks'}}) {
+      _place_source_mark($self, $parent_element, $source_mark);
+    }
   }
   delete $parent_element->{'contents'}
     if (scalar(@{$parent_element->{'contents'}}) == 0);
@@ -3502,7 +3508,7 @@ sub _end_line_misc_line($$$)
         $current->{'extra'}->{'columnfractions'} = $misc_cmd;
       }
       push @{$current->{'contents'}}, { 'type' => 'before_item',
-                                      'contents' => [], 'parent', $current };
+                                        'parent', $current };
       $current = $current->{'contents'}->[-1];
     }
   } elsif ($root_commands{$command}) {
@@ -3645,34 +3651,37 @@ sub _end_line_starting_block($$$)
              and $current->{'parent'}->{'cmdname'} eq 'multitable') {
     # parse the prototypes and put them in a special arg
     my @prototype_row;
-    foreach my $content (@{$current->{'contents'}}) {
-      if ($content->{'type'} and $content->{'type'} eq 'bracketed') {
-        # TODO the 'extra' information in $content is not copied over,
-        # at least leading/trailing spaces (something else?).
-        my $bracketed_prototype
-          = { 'type' => 'bracketed_multitable_prototype' };
-        $bracketed_prototype->{'contents'} = $content->{'contents'}
-          if ($content->{'contents'});
-        push @prototype_row, $bracketed_prototype;
-      } elsif ($content->{'text'}) {
-        # TODO: this should be a warning or an error - all prototypes
-        # on a @multitable line should be in braces, as documented in the
-        # Texinfo manual.
-        if ($content->{'text'} =~ /\S/) {
-          foreach my $prototype (split /\s+/, $content->{'text'}) {
-            push @prototype_row, { 'text' => $prototype,
-                                   'type' => 'row_prototype' }
-              unless ($prototype eq '');
+    if ($current->{'contents'})
+    {
+      foreach my $content (@{$current->{'contents'}}) {
+        if ($content->{'type'} and $content->{'type'} eq 'bracketed') {
+          # TODO the 'extra' information in $content is not copied over,
+          # at least leading/trailing spaces (something else?).
+          my $bracketed_prototype
+            = { 'type' => 'bracketed_multitable_prototype' };
+          $bracketed_prototype->{'contents'} = $content->{'contents'}
+            if ($content->{'contents'});
+          push @prototype_row, $bracketed_prototype;
+        } elsif ($content->{'text'}) {
+          # TODO: this should be a warning or an error - all prototypes
+          # on a @multitable line should be in braces, as documented in the
+          # Texinfo manual.
+          if ($content->{'text'} =~ /\S/) {
+            foreach my $prototype (split /\s+/, $content->{'text'}) {
+              push @prototype_row, { 'text' => $prototype,
+                                     'type' => 'row_prototype' }
+                unless ($prototype eq '');
+            }
+          }
+        } else {
+          if (!$content->{'cmdname'}
+                or ($content->{'cmdname'} ne 'c'
+                    and $content->{'cmdname'} ne 'comment')) {
+            $self->_command_warn($current, $source_info,
+                __("unexpected argument on \@%s line: %s"),
+                     $current->{'parent'}->{'cmdname'},
+                     Texinfo::Convert::Texinfo::convert_to_texinfo($content));
           }
-        }
-      } else {
-        if (!$content->{'cmdname'}
-              or ($content->{'cmdname'} ne 'c'
-                  and $content->{'cmdname'} ne 'comment')) {
-          $self->_command_warn($current, $source_info,
-              __("unexpected argument on \@%s line: %s"),
-                   $current->{'parent'}->{'cmdname'},
-                   Texinfo::Convert::Texinfo::convert_to_texinfo($content));
         }
       }
     }
@@ -5476,7 +5485,7 @@ sub _process_remaining_on_line($$$$)
                 and $current->{'cmdname'} eq $base_command) {
               # popped element should be the same as $misc
               _pop_element_from_contents($self, $current);
-              _gather_def_item($current, $command);
+              _gather_def_item($self, $current, $command);
               push @{$current->{'contents'}}, $misc;
             }
             if (!$current->{'cmdname'}
@@ -5731,7 +5740,6 @@ sub _process_remaining_on_line($$$$)
 
         $current->{'args'} = [ {
            'type' => 'block_line_arg',
-           'contents' => [],
            'parent' => $current } ];
 
         if ($commands_args_number{$command}) {
diff --git a/tp/Texinfo/XS/parsetexi/close.c b/tp/Texinfo/XS/parsetexi/close.c
index ef30aede3f..94116b91c2 100644
--- a/tp/Texinfo/XS/parsetexi/close.c
+++ b/tp/Texinfo/XS/parsetexi/close.c
@@ -19,6 +19,7 @@
 #include <string.h>
 
 #include "parser.h"
+#include "source_marks.h"
 
 /* Return CURRENT->parent.  The other arguments are used if an error message
    should be printed. */
@@ -99,6 +100,69 @@ close_all_style_commands (ELEMENT *current,
   return current;
 }
 
+int
+is_container_empty (ELEMENT *current)
+{
+  if (current->contents.number == 0
+      && current->args.number == 0
+      && current->text.end == 0
+      && current->info_info->info_number == 0)
+    return 1;
+  return 0;
+}
+
+/* this should only be called for non @-command elements otherwise
+   empty command elements will be removed */
+ELEMENT *
+close_container (ELEMENT *current)
+{
+  ELEMENT *element_to_remove = 0;
+
+  /* remove an empty content that only holds source marks */
+  if (current->contents.number == 1)
+    {
+      ELEMENT *child_element = last_contents_child (current);
+      if ((!child_element->cmd) && is_container_empty (child_element))
+        {
+          add_source_marks (&child_element->source_mark_list, current);
+          child_element->source_mark_list.number = 0;
+
+          debug_nonl ("REMOVE empty child ");
+          debug_print_element_short (child_element, 1); debug("");
+          destroy_element (pop_element_from_contents (current, 0));
+        }
+    }
+  /* remove element without contents nor associated information */
+  if (is_container_empty (current))
+    {
+      if (current->source_mark_list.number > 0)
+       /* keep the element to keep the source mark, but remove the type. */
+        current->type = ET_NONE;
+      else
+        {
+          element_to_remove = current;
+          debug_nonl ("CONTAINER EMPTY ");
+          debug_print_element_short (current, 1); debug("");
+        }
+    }
+
+  current = current->parent;
+  if (element_to_remove)
+    {
+      ELEMENT *last_child = last_contents_child (current);
+      /* this is to avoid removing empty containers in args,
+         happens with brace commands not closed at the end of
+         a manual */
+      if (last_child == element_to_remove)
+        {
+          debug_nonl ("REMOVE empty type ");
+          debug_print_element_short (last_child, 1); debug("");
+          destroy_element (pop_element_from_contents (current, 0));
+        }
+    }
+  return current;
+}
+
 void
 close_command_cleanup (ELEMENT *current)
 {
@@ -338,8 +402,6 @@ close_current (ELEMENT *current,
   else if (current->type != ET_NONE)
     {
       enum context c;
-      ELEMENT *element_to_remove = 0;
-      debug ("CLOSING type %s", element_type_names[current->type]);
       switch (current->type)
         {
         case ET_bracketed:
@@ -350,7 +412,7 @@ close_current (ELEMENT *current,
             {
               /* remove spaces element from tree and update extra values */
               abort_empty_line (&current, 0);
-           }
+            }
 
           break;
         case ET_line_arg:
@@ -383,28 +445,7 @@ close_current (ELEMENT *current,
 
           break;
         }
-      /* remove element without contents nor associated information */
-      if (current->contents.number == 0
-          && current->args.number == 0
-          && current->text.end == 0
-          && current->info_info->info_number == 0
-          && current->source_mark_list.number == 0)
-        element_to_remove = current;
-
-      current = current->parent;
-      if (element_to_remove)
-        {
-          ELEMENT *last_child = last_contents_child (current);
-          /* this is to avoid removing empty containers in args,
-             happens with brace commands not closed at the end of
-             a manual */
-          if (last_child == element_to_remove)
-            {
-              debug_nonl ("REMOVE empty type ");
-              debug_print_element_short (last_child, 1); debug("");
-              destroy_element (pop_element_from_contents (current, 0));
-            }
-        }
+      current = close_container(current);
     }
   else
     {
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index 3e86bbef6b..9630061777 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -604,14 +604,7 @@ end_preformatted (ELEMENT *current,
   if (current->type == ET_preformatted)
     {
       debug ("CLOSE PREFORMATTED");
-      if (current->contents.number == 0)
-        {
-          current = current->parent;
-          destroy_element (pop_element_from_contents (current, 1));
-          debug ("popping");
-        }
-      else
-        current = current->parent;
+      current = close_container(current);
     }
   return current;
 }
diff --git a/tp/Texinfo/XS/parsetexi/parser.h b/tp/Texinfo/XS/parsetexi/parser.h
index 4bf185908d..3e35f297bd 100644
--- a/tp/Texinfo/XS/parsetexi/parser.h
+++ b/tp/Texinfo/XS/parsetexi/parser.h
@@ -107,6 +107,7 @@ typedef struct GLOBAL_INFO {
 
 
 /* In close.c */
+ELEMENT *close_container (ELEMENT *current);
 void close_command_cleanup (ELEMENT *current);
 ELEMENT *close_commands (ELEMENT *current, enum command_id 
closed_block_command,
                          ELEMENT **closed_element, enum command_id);
diff --git a/tp/Texinfo/XS/parsetexi/source_marks.h 
b/tp/Texinfo/XS/parsetexi/source_marks.h
index f2f0b0db85..f68f65b2c8 100644
--- a/tp/Texinfo/XS/parsetexi/source_marks.h
+++ b/tp/Texinfo/XS/parsetexi/source_marks.h
@@ -23,6 +23,7 @@ void register_source_mark (ELEMENT *e, SOURCE_MARK 
*source_mark);
 void source_marks_reset_counters (void);
 void add_source_marks (SOURCE_MARK_LIST *source_mark_list, ELEMENT *e);
 void add_source_mark (SOURCE_MARK *source_mark, ELEMENT *e);
+void place_source_mark (ELEMENT *e, SOURCE_MARK *source_mark);
 
 
 #endif
diff --git a/tp/Texinfo/XS/parsetexi/tree.c b/tp/Texinfo/XS/parsetexi/tree.c
index 4542e3e6b9..00ff4c303f 100644
--- a/tp/Texinfo/XS/parsetexi/tree.c
+++ b/tp/Texinfo/XS/parsetexi/tree.c
@@ -380,14 +380,27 @@ ELEMENT *
 pop_element_from_contents (ELEMENT *parent, int reparent_source_marks)
 {
   ELEMENT_LIST *list = &parent->contents;
+  ELEMENT *popped_element = list->list[list->number -1];
+
+  /* remove the popped element now, such that replaced source marks are placed
+     on the preceding element */
+  list->number--;
 
   if (reparent_source_marks)
     {
-      add_source_marks (&(list->list[list->number -1]->source_mark_list),
-                        parent);
-      list->list[list->number -1]->source_mark_list.number = 0;
+      if (popped_element->source_mark_list.number)
+        {
+          SOURCE_MARK_LIST *source_mark_list = 
&popped_element->source_mark_list;
+
+          int i;
+          for (i = 0; i < source_mark_list->number; i++)
+            {
+              place_source_mark (parent, source_mark_list->list[i]);
+            }
+          source_mark_list->number = 0;
+        }
     }
-  return list->list[--list->number];
+  return popped_element;
 }
 
 ELEMENT *
diff --git a/tp/t/results/conditionals/macro_in_ifset.pl 
b/tp/t/results/conditionals/macro_in_ifset.pl
index b24a5c1a39..35068f4938 100644
--- a/tp/t/results/conditionals/macro_in_ifset.pl
+++ b/tp/t/results/conditionals/macro_in_ifset.pl
@@ -77,6 +77,25 @@ $result_trees{'macro_in_ifset'} = {
           'type' => 'empty_line'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'truc'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -99,24 +118,6 @@ $result_trees{'macro_in_ifset'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'truc'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/conditionals/macro_in_ifset_set.pl 
b/tp/t/results/conditionals/macro_in_ifset_set.pl
index 52ff13e8fb..67d6da9a0a 100644
--- a/tp/t/results/conditionals/macro_in_ifset_set.pl
+++ b/tp/t/results/conditionals/macro_in_ifset_set.pl
@@ -180,6 +180,25 @@ $result_trees{'macro_in_ifset_set'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'truc'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -202,24 +221,6 @@ $result_trees{'macro_in_ifset_set'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'truc'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/conditionals/nested_ifset_ifclear.pl 
b/tp/t/results/conditionals/nested_ifset_ifclear.pl
index 361aabd3cd..45fa684b27 100644
--- a/tp/t/results/conditionals/nested_ifset_ifclear.pl
+++ b/tp/t/results/conditionals/nested_ifset_ifclear.pl
@@ -155,7 +155,25 @@ $result_trees{'nested_ifset_ifclear'} = {
           'info' => {
             'arg_line' => ' anothervar
 '
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'conditionals'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'contents' => [
@@ -210,7 +228,25 @@ $result_trees{'nested_ifset_ifclear'} = {
           'info' => {
             'arg_line' => ' anothervar
 '
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'conditionals'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'contents' => [
@@ -265,7 +301,25 @@ $result_trees{'nested_ifset_ifclear'} = {
           'info' => {
             'arg_line' => ' anothervar
 '
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 3,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'conditionals'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'text' => '
@@ -306,73 +360,25 @@ $result_trees{'nested_ifset_ifclear'} = {
           'info' => {
             'arg_line' => ' anothervar
 '
-          }
-        }
-      ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'conditionals'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'conditionals'
-            },
-            'type' => 'macro_call'
           },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 3,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'conditionals'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 4,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'conditionals'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
+          'source_marks' => [
+            {
+              'counter' => 4,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'conditionals'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         }
       ],
       'type' => 'before_node_section'
diff --git a/tp/t/results/conditionals/user_defined_txiinternalvalue.pl 
b/tp/t/results/conditionals/user_defined_txiinternalvalue.pl
index 6a02bf31ff..0740ee04d6 100644
--- a/tp/t/results/conditionals/user_defined_txiinternalvalue.pl
+++ b/tp/t/results/conditionals/user_defined_txiinternalvalue.pl
@@ -67,6 +67,20 @@ $result_trees{'user_defined_txiinternalvalue'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'extra' => {
+                  'name' => 'txiinternalvalue'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -89,19 +103,6 @@ $result_trees{'user_defined_txiinternalvalue'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'extra' => {
-              'name' => 'txiinternalvalue'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/coverage/delcomment_followed_by_cpp_line.pl 
b/tp/t/results/coverage/delcomment_followed_by_cpp_line.pl
index f86f85aa52..36a2d9bdc5 100644
--- a/tp/t/results/coverage/delcomment_followed_by_cpp_line.pl
+++ b/tp/t/results/coverage/delcomment_followed_by_cpp_line.pl
@@ -96,6 +96,15 @@ $result_trees{'delcomment_followed_by_cpp_line'} = {
               }
             },
             {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'line' => ' this is a comment.
+',
+                  'position' => 1,
+                  'sourcemark_type' => 'delcomment'
+                }
+              ],
               'text' => '
 ',
               'type' => 'empty_line'
@@ -214,14 +223,6 @@ $result_trees{'delcomment_followed_by_cpp_line'} = {
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'line' => ' this is a comment.
-',
-          'sourcemark_type' => 'delcomment'
-        }
-      ],
       'type' => 'before_node_section'
     },
     {
diff --git a/tp/t/results/coverage_braces/test_image.pl 
b/tp/t/results/coverage_braces/test_image.pl
index 6bde2ae515..4721434c07 100644
--- a/tp/t/results/coverage_braces/test_image.pl
+++ b/tp/t/results/coverage_braces/test_image.pl
@@ -98,6 +98,25 @@ $result_trees{'test_image'} = {
             {
               'contents' => [
                 {
+                  'source_marks' => [
+                    {
+                      'counter' => 1,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'files-char'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'position' => 17,
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ],
                   'text' => 'Text in copying.
 '
                 },
@@ -247,24 +266,6 @@ $result_trees{'test_image'} = {
 '
                 }
               ],
-              'source_marks' => [
-                {
-                  'counter' => 1,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'files-char'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'type' => 'paragraph'
             },
             {
@@ -622,6 +623,25 @@ $result_trees{'test_image'} = {
       'cmdname' => 'node',
       'contents' => [
         {
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'files-char'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -1109,6 +1129,27 @@ $result_trees{'test_image'} = {
           'contents' => [
             {
               'contents' => [
+                {
+                  'source_marks' => [
+                    {
+                      'counter' => 3,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'files-char'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ],
+                  'text' => ''
+                },
                 {
                   'args' => [
                     {
@@ -1538,24 +1579,6 @@ $result_trees{'test_image'} = {
 '
                 }
               ],
-              'source_marks' => [
-                {
-                  'counter' => 3,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'files-char'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'type' => 'preformatted'
             },
             {
@@ -1632,6 +1655,27 @@ $result_trees{'test_image'} = {
           ],
           'cmdname' => 'float',
           'contents' => [
+            {
+              'source_marks' => [
+                {
+                  'counter' => 4,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'files-char'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
+              'text' => ''
+            },
             {
               'args' => [
                 {
@@ -2074,6 +2118,27 @@ $result_trees{'test_image'} = {
               'args' => [
                 {
                   'contents' => [
+                    {
+                      'source_marks' => [
+                        {
+                          'counter' => 5,
+                          'element' => {
+                            'args' => [
+                              {
+                                'text' => ''
+                              }
+                            ],
+                            'extra' => {
+                              'name' => 'files-char'
+                            },
+                            'type' => 'macro_call'
+                          },
+                          'sourcemark_type' => 'macro_expansion',
+                          'status' => 'start'
+                        }
+                      ],
+                      'text' => ''
+                    },
                     {
                       'args' => [
                         {
@@ -2507,24 +2572,6 @@ $result_trees{'test_image'} = {
                       'type' => 'paragraph'
                     }
                   ],
-                  'source_marks' => [
-                    {
-                      'counter' => 5,
-                      'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
-                        'extra' => {
-                          'name' => 'files-char'
-                        },
-                        'type' => 'macro_call'
-                      },
-                      'sourcemark_type' => 'macro_expansion',
-                      'status' => 'start'
-                    }
-                  ],
                   'type' => 'brace_command_context'
                 }
               ],
@@ -2598,25 +2645,7 @@ $result_trees{'test_image'} = {
             'file_name' => '',
             'line_nr' => 23,
             'macro' => ''
-          },
-          'source_marks' => [
-            {
-              'counter' => 4,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'files-char'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ]
+          }
         },
         {
           'text' => '
@@ -2689,31 +2718,13 @@ $result_trees{'test_image'} = {
         'file_name' => '',
         'line_nr' => 12,
         'macro' => ''
-      },
-      'source_marks' => [
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'files-char'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ]
+      }
     }
   ],
   'type' => 'document_root'
 };
-$result_trees{'test_image'}{'contents'}[1]{'contents'}[11]{'contents'}[5]{'extra'}{'float'}
 = $result_trees{'test_image'}{'contents'}[1]{'contents'}[11];
-$result_trees{'test_image'}{'contents'}[1]{'contents'}[11]{'extra'}{'caption'} 
= $result_trees{'test_image'}{'contents'}[1]{'contents'}[11]{'contents'}[5];
+$result_trees{'test_image'}{'contents'}[1]{'contents'}[11]{'contents'}[6]{'extra'}{'float'}
 = $result_trees{'test_image'}{'contents'}[1]{'contents'}[11];
+$result_trees{'test_image'}{'contents'}[1]{'contents'}[11]{'extra'}{'caption'} 
= $result_trees{'test_image'}{'contents'}[1]{'contents'}[11]{'contents'}[6];
 
$result_trees{'test_image'}{'contents'}[1]{'contents'}[11]{'extra'}{'node_content'}[0]
 = 
$result_trees{'test_image'}{'contents'}[1]{'contents'}[11]{'args'}[1]{'contents'}[0];
 
$result_trees{'test_image'}{'contents'}[1]{'contents'}[11]{'extra'}{'type'}{'content'}[0]
 = 
$result_trees{'test_image'}{'contents'}[1]{'contents'}[11]{'args'}[0]{'contents'}[0];
 
$result_trees{'test_image'}{'contents'}[1]{'contents'}[13]{'extra'}{'type'}{'content'}[0]
 = 
$result_trees{'test_image'}{'contents'}[1]{'contents'}[13]{'args'}[0]{'contents'}[0];
@@ -2790,20 +2801,7 @@ $result_nodes{'test_image'} = {
   'extra' => {
     'normalized' => 'Top'
   },
-  'info' => {},
-  'source_marks' => [
-    {
-      'counter' => 2,
-      'element' => {
-        'extra' => {
-          'name' => 'files-char'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    }
-  ]
+  'info' => {}
 };
 
 $result_menus{'test_image'} = {
@@ -2811,20 +2809,7 @@ $result_menus{'test_image'} = {
   'extra' => {
     'normalized' => 'Top'
   },
-  'info' => {},
-  'source_marks' => [
-    {
-      'counter' => 2,
-      'element' => {
-        'extra' => {
-          'name' => 'files-char'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    }
-  ]
+  'info' => {}
 };
 
 $result_errors{'test_image'} = [
@@ -3078,19 +3063,6 @@ $result_floats{'test_image'} = {
         }
       },
       'info' => {},
-      'source_marks' => [
-        {
-          'counter' => 4,
-          'element' => {
-            'extra' => {
-              'name' => 'files-char'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'structure' => {
         'float_number' => 1
       }
diff --git a/tp/t/results/include/cpp_lines.pl 
b/tp/t/results/include/cpp_lines.pl
index 7720e2d201..0458bad335 100644
--- a/tp/t/results/include/cpp_lines.pl
+++ b/tp/t/results/include/cpp_lines.pl
@@ -306,6 +306,25 @@ $result_trees{'cpp_lines'} = {
           'type' => 'paragraph'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macr'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -459,6 +478,25 @@ $result_trees{'cpp_lines'} = {
           'type' => 'paragraph'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macrtwo'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -1131,41 +1169,7 @@ $result_trees{'cpp_lines'} = {
         'file_name' => 'g_f',
         'line_nr' => 70,
         'macro' => ''
-      },
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'macr'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'macrtwo'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ]
+      }
     },
     {
       'args' => [
@@ -1340,31 +1344,7 @@ $result_nodes{'cpp_lines'} = {
   'extra' => {
     'normalized' => 'Top'
   },
-  'info' => {},
-  'source_marks' => [
-    {
-      'counter' => 1,
-      'element' => {
-        'extra' => {
-          'name' => 'macr'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    },
-    {
-      'counter' => 2,
-      'element' => {
-        'extra' => {
-          'name' => 'macrtwo'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    }
-  ]
+  'info' => {}
 };
 
 $result_menus{'cpp_lines'} = {
@@ -1372,31 +1352,7 @@ $result_menus{'cpp_lines'} = {
   'extra' => {
     'normalized' => 'Top'
   },
-  'info' => {},
-  'source_marks' => [
-    {
-      'counter' => 1,
-      'element' => {
-        'extra' => {
-          'name' => 'macr'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    },
-    {
-      'counter' => 2,
-      'element' => {
-        'extra' => {
-          'name' => 'macrtwo'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    }
-  ]
+  'info' => {}
 };
 
 $result_errors{'cpp_lines'} = [
diff --git a/tp/t/results/include/include_with_setfilename_in_preformatted.pl 
b/tp/t/results/include/include_with_setfilename_in_preformatted.pl
index 729d80a51f..bca506ceb9 100644
--- a/tp/t/results/include/include_with_setfilename_in_preformatted.pl
+++ b/tp/t/results/include/include_with_setfilename_in_preformatted.pl
@@ -24,51 +24,44 @@ $result_trees{'include_with_setfilename_in_preformatted'} = 
{
           'cmdname' => 'example',
           'contents' => [
             {
-              'contents' => [
+              'source_marks' => [
                 {
-                  'source_marks' => [
-                    {
-                      'counter' => 1,
-                      'element' => {
-                        'args' => [
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'contents' => [
                           {
-                            'contents' => [
-                              {
-                                'text' => 'included_file_with_setfilename.texi'
-                              }
-                            ],
-                            'info' => {
-                              'spaces_after_argument' => {
-                                'text' => '
-'
-                              }
-                            },
-                            'type' => 'line_arg'
+                            'text' => 'included_file_with_setfilename.texi'
                           }
                         ],
-                        'cmdname' => 'include',
-                        'extra' => {
-                          'text_arg' => 'included_file_with_setfilename.texi'
-                        },
                         'info' => {
-                          'spaces_before_argument' => {
-                            'text' => ' '
+                          'spaces_after_argument' => {
+                            'text' => '
+'
                           }
                         },
-                        'source_info' => {
-                          'file_name' => '',
-                          'line_nr' => 2,
-                          'macro' => ''
-                        }
-                      },
-                      'sourcemark_type' => 'include',
-                      'status' => 'start'
+                        'type' => 'line_arg'
+                      }
+                    ],
+                    'cmdname' => 'include',
+                    'extra' => {
+                      'text_arg' => 'included_file_with_setfilename.texi'
+                    },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'source_info' => {
+                      'file_name' => '',
+                      'line_nr' => 2,
+                      'macro' => ''
                     }
-                  ],
-                  'text' => ''
-                }
-              ],
-              'source_marks' => [
+                  },
+                  'sourcemark_type' => 'include',
+                  'status' => 'start'
+                },
                 {
                   'counter' => 1,
                   'element' => {
@@ -105,8 +98,7 @@ $result_trees{'include_with_setfilename_in_preformatted'} = {
                   },
                   'sourcemark_type' => 'setfilename'
                 }
-              ],
-              'type' => 'preformatted'
+              ]
             },
             {
               'contents' => [
diff --git a/tp/t/results/include/macro_and_commands_in_early_commands.pl 
b/tp/t/results/include/macro_and_commands_in_early_commands.pl
index 9d9a428791..e75118dedb 100644
--- a/tp/t/results/include/macro_and_commands_in_early_commands.pl
+++ b/tp/t/results/include/macro_and_commands_in_early_commands.pl
@@ -592,6 +592,25 @@ $result_trees{'macro_and_commands_in_early_commands'} = {
           'type' => 'paragraph'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 4,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'themacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -668,25 +687,7 @@ $result_trees{'macro_and_commands_in_early_commands'} = {
         'file_name' => '',
         'line_nr' => 19,
         'macro' => ''
-      },
-      'source_marks' => [
-        {
-          'counter' => 4,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'themacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ]
+      }
     }
   ],
   'type' => 'document_root'
@@ -754,19 +755,6 @@ $result_sectioning{'macro_and_commands_in_early_commands'} 
= {
           }
         },
         'info' => {},
-        'source_marks' => [
-          {
-            'counter' => 4,
-            'element' => {
-              'extra' => {
-                'name' => 'themacro'
-              },
-              'type' => 'macro_call'
-            },
-            'sourcemark_type' => 'macro_expansion',
-            'status' => 'start'
-          }
-        ],
         'structure' => {
           'section_level' => 0,
           'section_up' => {}
@@ -785,19 +773,6 @@ $result_nodes{'macro_and_commands_in_early_commands'} = {
       'cmdname' => 'top',
       'extra' => {},
       'info' => {},
-      'source_marks' => [
-        {
-          'counter' => 4,
-          'element' => {
-            'extra' => {
-              'name' => 'themacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'structure' => {}
     },
     'normalized' => 'Top'
diff --git a/tp/t/results/include/macro_definition_in_include.pl 
b/tp/t/results/include/macro_definition_in_include.pl
index 3afa4ca7aa..28b3d686f9 100644
--- a/tp/t/results/include/macro_definition_in_include.pl
+++ b/tp/t/results/include/macro_definition_in_include.pl
@@ -123,6 +123,25 @@ $result_trees{'macro_definition_in_include'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'themacro'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 11,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'Call macro
 '
             },
@@ -139,24 +158,6 @@ $result_trees{'macro_definition_in_include'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 1,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'themacro'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         }
       ],
diff --git a/tp/t/results/include/macro_in_early_commands.pl 
b/tp/t/results/include/macro_in_early_commands.pl
index 1562c1f376..8ffdcffd55 100644
--- a/tp/t/results/include/macro_in_early_commands.pl
+++ b/tp/t/results/include/macro_in_early_commands.pl
@@ -339,6 +339,20 @@ $result_trees{'macro_in_early_commands'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 3,
+              'element' => {
+                'extra' => {
+                  'name' => 'documentencoding-command'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -482,19 +496,6 @@ $result_trees{'macro_in_early_commands'} = {
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 3,
-          'element' => {
-            'extra' => {
-              'name' => 'documentencoding-command'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     },
     {
@@ -745,6 +746,25 @@ $result_trees{'macro_in_early_commands'} = {
           'type' => 'paragraph'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 6,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'themacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -786,6 +806,25 @@ $result_trees{'macro_in_early_commands'} = {
               'cmdname' => '}'
             },
             {
+              'source_marks' => [
+                {
+                  'counter' => 7,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => 'info'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'end-file-name'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 1,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => '
 '
             },
@@ -802,24 +841,6 @@ $result_trees{'macro_in_early_commands'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 7,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => 'info'
-                  }
-                ],
-                'extra' => {
-                  'name' => 'end-file-name'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         }
       ],
@@ -833,25 +854,7 @@ $result_trees{'macro_in_early_commands'} = {
         'file_name' => '',
         'line_nr' => 26,
         'macro' => ''
-      },
-      'source_marks' => [
-        {
-          'counter' => 6,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'themacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ]
+      }
     }
   ],
   'type' => 'document_root'
@@ -930,19 +933,6 @@ $result_sectioning{'macro_in_early_commands'} = {
           }
         },
         'info' => {},
-        'source_marks' => [
-          {
-            'counter' => 6,
-            'element' => {
-              'extra' => {
-                'name' => 'themacro'
-              },
-              'type' => 'macro_call'
-            },
-            'sourcemark_type' => 'macro_expansion',
-            'status' => 'start'
-          }
-        ],
         'structure' => {
           'section_level' => 0,
           'section_up' => {}
@@ -961,19 +951,6 @@ $result_nodes{'macro_in_early_commands'} = {
       'cmdname' => 'top',
       'extra' => {},
       'info' => {},
-      'source_marks' => [
-        {
-          'counter' => 6,
-          'element' => {
-            'extra' => {
-              'name' => 'themacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'structure' => {}
     },
     'normalized' => 'Top'
diff --git a/tp/t/results/info_tests/def_in_copying.pl 
b/tp/t/results/info_tests/def_in_copying.pl
index 3d9e62641e..8562c9cc68 100644
--- a/tp/t/results/info_tests/def_in_copying.pl
+++ b/tp/t/results/info_tests/def_in_copying.pl
@@ -174,28 +174,29 @@ $result_trees{'def_in_copying'} = {
             {
               'contents' => [
                 {
+                  'source_marks' => [
+                    {
+                      'counter' => 1,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'mymacro'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'position' => 11,
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ],
                   'text' => 'In copying
 '
                 }
               ],
-              'source_marks' => [
-                {
-                  'counter' => 1,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'mymacro'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'type' => 'paragraph'
             },
             {
@@ -474,28 +475,29 @@ $result_trees{'def_in_copying'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 2,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'mymacro'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 8,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'In text
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 2,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'mymacro'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
diff --git a/tp/t/results/macro/arg_body_expansion_order.pl 
b/tp/t/results/macro/arg_body_expansion_order.pl
index 928404e3de..70a1870cb2 100644
--- a/tp/t/results/macro/arg_body_expansion_order.pl
+++ b/tp/t/results/macro/arg_body_expansion_order.pl
@@ -158,6 +158,25 @@ $result_trees{'arg_body_expansion_order'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '@othermacro{}'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'redefineothermacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -235,7 +254,25 @@ $result_trees{'arg_body_expansion_order'} = {
             'file_name' => '',
             'line_nr' => 14,
             'macro' => 'redefineothermacro'
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'othermacro'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'contents' => [
@@ -261,40 +298,6 @@ $result_trees{'arg_body_expansion_order'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => '@othermacro{}'
-              }
-            ],
-            'extra' => {
-              'name' => 'redefineothermacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'othermacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/backslash_in_arg.pl 
b/tp/t/results/macro/backslash_in_arg.pl
index 52b741ddbe..e6acd9e26d 100644
--- a/tp/t/results/macro/backslash_in_arg.pl
+++ b/tp/t/results/macro/backslash_in_arg.pl
@@ -96,6 +96,25 @@ $result_trees{'backslash_in_arg'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '\\\\q'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'funindex'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -150,6 +169,24 @@ $result_trees{'backslash_in_arg'} = {
             'line_nr' => 7,
             'macro' => 'funindex'
           },
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '\\r'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'funindex'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'type' => 'index_entry_command'
         },
         {
@@ -202,6 +239,24 @@ $result_trees{'backslash_in_arg'} = {
             'line_nr' => 8,
             'macro' => 'funindex'
           },
+          'source_marks' => [
+            {
+              'counter' => 3,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '\\q'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'funindex'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'type' => 'index_entry_command'
         },
         {
@@ -254,6 +309,24 @@ $result_trees{'backslash_in_arg'} = {
             'line_nr' => 9,
             'macro' => 'funindex'
           },
+          'source_marks' => [
+            {
+              'counter' => 4,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '\\r'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'funindex'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'type' => 'index_entry_command'
         },
         {
@@ -367,73 +440,7 @@ $result_trees{'backslash_in_arg'} = {
         'file_name' => '',
         'line_nr' => 1,
         'macro' => ''
-      },
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => '\\\\q'
-              }
-            ],
-            'extra' => {
-              'name' => 'funindex'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => '\\r'
-              }
-            ],
-            'extra' => {
-              'name' => 'funindex'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 3,
-          'element' => {
-            'args' => [
-              {
-                'text' => '\\q'
-              }
-            ],
-            'extra' => {
-              'name' => 'funindex'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 4,
-          'element' => {
-            'args' => [
-              {
-                'text' => '\\r'
-              }
-            ],
-            'extra' => {
-              'name' => 'funindex'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ]
+      }
     }
   ],
   'type' => 'document_root'
@@ -481,53 +488,7 @@ $result_nodes{'backslash_in_arg'} = {
     'isindex' => 1,
     'normalized' => 'Top'
   },
-  'info' => {},
-  'source_marks' => [
-    {
-      'counter' => 1,
-      'element' => {
-        'extra' => {
-          'name' => 'funindex'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    },
-    {
-      'counter' => 2,
-      'element' => {
-        'extra' => {
-          'name' => 'funindex'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    },
-    {
-      'counter' => 3,
-      'element' => {
-        'extra' => {
-          'name' => 'funindex'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    },
-    {
-      'counter' => 4,
-      'element' => {
-        'extra' => {
-          'name' => 'funindex'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    }
-  ]
+  'info' => {}
 };
 
 $result_menus{'backslash_in_arg'} = {
@@ -536,53 +497,7 @@ $result_menus{'backslash_in_arg'} = {
     'isindex' => 1,
     'normalized' => 'Top'
   },
-  'info' => {},
-  'source_marks' => [
-    {
-      'counter' => 1,
-      'element' => {
-        'extra' => {
-          'name' => 'funindex'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    },
-    {
-      'counter' => 2,
-      'element' => {
-        'extra' => {
-          'name' => 'funindex'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    },
-    {
-      'counter' => 3,
-      'element' => {
-        'extra' => {
-          'name' => 'funindex'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    },
-    {
-      'counter' => 4,
-      'element' => {
-        'extra' => {
-          'name' => 'funindex'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    }
-  ]
+  'info' => {}
 };
 
 $result_errors{'backslash_in_arg'} = [];
diff --git a/tp/t/results/macro/bib_example.pl 
b/tp/t/results/macro/bib_example.pl
index 37f2ba9c83..519ad63354 100644
--- a/tp/t/results/macro/bib_example.pl
+++ b/tp/t/results/macro/bib_example.pl
@@ -3402,6 +3402,22 @@ $result_trees{'bib_example'} = {
                   'counter' => 1,
                   'sourcemark_type' => 'include',
                   'status' => 'end'
+                },
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => 'References'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'mybibuselist'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
                 }
               ]
             },
@@ -3426,7 +3442,25 @@ $result_trees{'bib_example'} = {
               'info' => {
                 'arg_line' => ' mybiblist true
 '
-              }
+              },
+              'source_marks' => [
+                {
+                  'counter' => 2,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => 'References'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'mybibsetrefnode'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ]
             },
             {
               'args' => [
@@ -3481,40 +3515,6 @@ $result_trees{'bib_example'} = {
           'type' => 'preamble_before_content'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'References'
-              }
-            ],
-            'extra' => {
-              'name' => 'mybibuselist'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'References'
-              }
-            ],
-            'extra' => {
-              'name' => 'mybibsetrefnode'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     },
     {
@@ -3899,7 +3899,28 @@ $result_trees{'bib_example'} = {
                   ' %**else if
 '
                 ]
-              }
+              },
+              'source_marks' => [
+                {
+                  'counter' => 5,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => '@mybibnode{}'
+                      },
+                      {
+                        'text' => 'LaTeX2e'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'mybibmakeref'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ]
             },
             {
               'text' => '(See item [LaTeX2e] in '
@@ -3908,6 +3929,27 @@ $result_trees{'bib_example'} = {
               'args' => [
                 {
                   'contents' => [
+                    {
+                      'source_marks' => [
+                        {
+                          'counter' => 6,
+                          'element' => {
+                            'args' => [
+                              {
+                                'text' => ''
+                              }
+                            ],
+                            'extra' => {
+                              'name' => 'mybibnode'
+                            },
+                            'type' => 'macro_call'
+                          },
+                          'sourcemark_type' => 'macro_expansion',
+                          'status' => 'start'
+                        }
+                      ],
+                      'text' => ''
+                    },
                     {
                       'source_marks' => [
                         {
@@ -3920,24 +3962,6 @@ $result_trees{'bib_example'} = {
                       'text' => 'References'
                     }
                   ],
-                  'source_marks' => [
-                    {
-                      'counter' => 6,
-                      'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
-                        'extra' => {
-                          'name' => 'mybibnode'
-                        },
-                        'type' => 'macro_call'
-                      },
-                      'sourcemark_type' => 'macro_expansion',
-                      'status' => 'start'
-                    }
-                  ],
                   'type' => 'brace_command_arg'
                 },
                 {
@@ -4028,6 +4052,7 @@ $result_trees{'bib_example'} = {
                 },
                 'node_argument' => {
                   'node_content' => [
+                    {},
                     {}
                   ],
                   'normalized' => 'References'
@@ -4066,27 +4091,6 @@ $result_trees{'bib_example'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 5,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => '@mybibnode{}'
-                  },
-                  {
-                    'text' => 'LaTeX2e'
-                  }
-                ],
-                'extra' => {
-                  'name' => 'mybibmakeref'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
@@ -4165,29 +4169,30 @@ $result_trees{'bib_example'} = {
             {
               'contents' => [
                 {
+                  'source_marks' => [
+                    {
+                      'counter' => 8,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => 'LaTeX2e'
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'mybibitem'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'position' => 1,
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ],
                   'text' => '
 ',
                   'type' => 'empty_line'
                 }
               ],
-              'source_marks' => [
-                {
-                  'counter' => 8,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => 'LaTeX2e'
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'mybibitem'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'type' => 'before_item'
             },
             {
@@ -4378,6 +4383,7 @@ 
$result_trees{'bib_example'}{'contents'}[3]{'extra'}{'nodes_manuals'}[0]{'node_c
 
$result_trees{'bib_example'}{'contents'}[4]{'contents'}[1]{'contents'}[4]{'extra'}{'label'}{'extra'}{'node_content'}[0]
 = 
$result_trees{'bib_example'}{'contents'}[4]{'contents'}[1]{'contents'}[4]{'extra'}{'label'}{'args'}[0]{'contents'}[0];
 
$result_trees{'bib_example'}{'contents'}[4]{'contents'}[1]{'contents'}[4]{'extra'}{'label'}{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
 = 
$result_trees{'bib_example'}{'contents'}[4]{'contents'}[1]{'contents'}[4]{'extra'}{'label'}{'args'}[0]{'contents'}[0];
 
$result_trees{'bib_example'}{'contents'}[4]{'contents'}[1]{'contents'}[4]{'extra'}{'node_argument'}{'node_content'}[0]
 = 
$result_trees{'bib_example'}{'contents'}[4]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[0];
+$result_trees{'bib_example'}{'contents'}[4]{'contents'}[1]{'contents'}[4]{'extra'}{'node_argument'}{'node_content'}[1]
 = 
$result_trees{'bib_example'}{'contents'}[4]{'contents'}[1]{'contents'}[4]{'args'}[0]{'contents'}[1];
 $result_trees{'bib_example'}{'contents'}[5] = 
$result_trees{'bib_example'}{'contents'}[4]{'contents'}[1]{'contents'}[4]{'extra'}{'label'};
 
$result_trees{'bib_example'}{'contents'}[6]{'contents'}[1]{'contents'}[1]{'contents'}[1]{'extra'}{'node_content'}[0]
 = 
$result_trees{'bib_example'}{'contents'}[6]{'contents'}[1]{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[0];
 
$result_trees{'bib_example'}{'contents'}[6]{'contents'}[1]{'extra'}{'command_as_argument'}
 = 
$result_trees{'bib_example'}{'contents'}[6]{'contents'}[1]{'args'}[0]{'contents'}[0];
diff --git a/tp/t/results/macro/complete_macro_for_end.pl 
b/tp/t/results/macro/complete_macro_for_end.pl
index e99292b7ab..41e66d9dd4 100644
--- a/tp/t/results/macro/complete_macro_for_end.pl
+++ b/tp/t/results/macro/complete_macro_for_end.pl
@@ -85,6 +85,27 @@ $result_trees{'complete_macro_for_end'} = {
           ],
           'cmdname' => 'cartouche',
           'contents' => [
+            {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'theend'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
+              'text' => ''
+            },
             {
               'args' => [
                 {
@@ -124,25 +145,7 @@ $result_trees{'complete_macro_for_end'} = {
             'file_name' => '',
             'line_nr' => 5,
             'macro' => ''
-          },
-          'source_marks' => [
-            {
-              'counter' => 1,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'theend'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ]
+          }
         }
       ],
       'type' => 'before_node_section'
diff --git a/tp/t/results/macro/complex_argument.pl 
b/tp/t/results/macro/complex_argument.pl
index f1790929c0..14e0fc38a1 100644
--- a/tp/t/results/macro/complex_argument.pl
+++ b/tp/t/results/macro/complex_argument.pl
@@ -223,6 +223,46 @@ $result_trees{'complex_argument'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '@verb{% @macrotwo %}
+@c @macrofour
+@pagesizes 4 @macrofour{}
+@headings doubleafter @macrofour{}
+@verbatim
+@macrotwo
+@end verbatim
+@ignore
+@macrofour
+@end ignore
+@macro macroseven {truc}
+@emph{\\truc\\}
+@end macro
+macroseven defined
+@ifinfo
+@macrofour
+@end ifinfo
+@iftex
+@macrotwo{aa,bb}
+@end iftex
+@macrofour{}
+'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macrothree'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -590,6 +630,25 @@ $result_trees{'complex_argument'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 4,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'macrofour'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 19,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'macroseven defined
 '
             },
@@ -618,24 +677,6 @@ $result_trees{'complex_argument'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 4,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'macrofour'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
@@ -668,6 +709,25 @@ $result_trees{'complex_argument'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 5,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => 'aaa'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'macroseven'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 16,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'Call macroseven
 '
             },
@@ -701,24 +761,6 @@ $result_trees{'complex_argument'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 5,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => 'aaa'
-                  }
-                ],
-                'extra' => {
-                  'name' => 'macroseven'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
@@ -727,45 +769,6 @@ $result_trees{'complex_argument'} = {
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => '@verb{% @macrotwo %}
-@c @macrofour
-@pagesizes 4 @macrofour{}
-@headings doubleafter @macrofour{}
-@verbatim
-@macrotwo
-@end verbatim
-@ignore
-@macrofour
-@end ignore
-@macro macroseven {truc}
-@emph{\\truc\\}
-@end macro
-macroseven defined
-@ifinfo
-@macrofour
-@end ifinfo
-@iftex
-@macrotwo{aa,bb}
-@end iftex
-@macrofour{}
-'
-              }
-            ],
-            'extra' => {
-              'name' => 'macrothree'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/cpp_directives_after_macros.pl 
b/tp/t/results/macro/cpp_directives_after_macros.pl
index ebe3df53fb..03e860872b 100644
--- a/tp/t/results/macro/cpp_directives_after_macros.pl
+++ b/tp/t/results/macro/cpp_directives_after_macros.pl
@@ -205,6 +205,31 @@ $result_trees{'cpp_directives_after_macros'} = {
           'type' => 'paragraph'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'emptyexpansion'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 2,
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'end'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -233,29 +258,6 @@ $result_trees{'cpp_directives_after_macros'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'emptyexpansion'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'end'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/cpp_directives_in_macro.pl 
b/tp/t/results/macro/cpp_directives_in_macro.pl
index 3acc4de017..2253cf5a2b 100644
--- a/tp/t/results/macro/cpp_directives_in_macro.pl
+++ b/tp/t/results/macro/cpp_directives_in_macro.pl
@@ -83,6 +83,28 @@ $result_trees{'cpp_directives_in_macro'} = {
               }
             },
             {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => '#line 100 "in_arg_file"
+
+@unknownin
+'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'simplemacro'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 1,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => '
 ',
               'type' => 'empty_line'
@@ -146,27 +168,6 @@ $result_trees{'cpp_directives_in_macro'} = {
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => '#line 100 "in_arg_file"
-
-@unknownin
-'
-              }
-            ],
-            'extra' => {
-              'name' => 'simplemacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/empty_macro_argument.pl 
b/tp/t/results/macro/empty_macro_argument.pl
index dc45a4b3e1..7b0c468a93 100644
--- a/tp/t/results/macro/empty_macro_argument.pl
+++ b/tp/t/results/macro/empty_macro_argument.pl
@@ -67,6 +67,25 @@ $result_trees{'empty_macro_argument'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'mymacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -224,6 +243,25 @@ $result_trees{'empty_macro_argument'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 5,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'mytwo'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -314,40 +352,6 @@ $result_trees{'empty_macro_argument'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'mymacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 5,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'mytwo'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/expand_two_same.pl 
b/tp/t/results/macro/expand_two_same.pl
index 99829ace25..55f3809370 100644
--- a/tp/t/results/macro/expand_two_same.pl
+++ b/tp/t/results/macro/expand_two_same.pl
@@ -78,6 +78,27 @@ $result_trees{'expand_two_same'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => 'a simple @code{
+arg}
+'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'macrotwo'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 12,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'Call macro2
 '
             },
@@ -140,26 +161,6 @@ $result_trees{'expand_two_same'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 1,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => 'a simple @code{
-arg}
-'
-                  }
-                ],
-                'extra' => {
-                  'name' => 'macrotwo'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
@@ -183,6 +184,25 @@ arg}
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 2,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => 'arg with comma , here '
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'macrotwo'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 24,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'Call macro2 with 2 args
 '
             },
@@ -199,24 +219,6 @@ arg}
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 2,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => 'arg with comma , here '
-                  }
-                ],
-                'extra' => {
-                  'name' => 'macrotwo'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
diff --git a/tp/t/results/macro/expansion_order.pl 
b/tp/t/results/macro/expansion_order.pl
index 6856e7132a..95b71f948e 100644
--- a/tp/t/results/macro/expansion_order.pl
+++ b/tp/t/results/macro/expansion_order.pl
@@ -138,6 +138,42 @@ $result_trees{'expansion_order'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'ab'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'bidule'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'machin'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -171,40 +207,6 @@ $result_trees{'expansion_order'} = {
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'ab'
-              }
-            ],
-            'extra' => {
-              'name' => 'bidule'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'machin'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/form_feeds.pl b/tp/t/results/macro/form_feeds.pl
index 181d456d46..19ca89e363 100644
--- a/tp/t/results/macro/form_feeds.pl
+++ b/tp/t/results/macro/form_feeds.pl
@@ -141,6 +141,28 @@ $result_trees{'form_feeds'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'arg1'
+                  },
+                  {
+                    'text' => 'arg2'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'mymacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -179,6 +201,25 @@ $result_trees{'form_feeds'} = {
           'type' => 'paragraph'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'a@{rgline'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'oneargmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -212,43 +253,6 @@ $result_trees{'form_feeds'} = {
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'arg1'
-              },
-              {
-                'text' => 'arg2'
-              }
-            ],
-            'extra' => {
-              'name' => 'mymacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'a@{rgline'
-              }
-            ],
-            'extra' => {
-              'name' => 'oneargmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/glossary.pl b/tp/t/results/macro/glossary.pl
index f3b232d3cc..8973214e55 100644
--- a/tp/t/results/macro/glossary.pl
+++ b/tp/t/results/macro/glossary.pl
@@ -705,7 +705,25 @@ $result_trees{'glossary'} = {
                 'file_name' => 'glossary.texi',
                 'line_nr' => 42,
                 'macro' => 'gentry'
-              }
+              },
+              'source_marks' => [
+                {
+                  'counter' => 2,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => '@glossarytext{}'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'expandglossary'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ]
             },
             {
               'args' => [
@@ -808,6 +826,31 @@ $result_trees{'glossary'} = {
               ]
             },
             {
+              'source_marks' => [
+                {
+                  'counter' => 3,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => 'id2'
+                      },
+                      {
+                        'text' => 'name2'
+                      },
+                      {
+                        'text' => 'text2'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'gentry'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 29,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => ' is used in many cases while
 '
             },
@@ -975,7 +1018,25 @@ $result_trees{'glossary'} = {
                 'file_name' => 'glossary.texi',
                 'line_nr' => 43,
                 'macro' => 'gentry'
-              }
+              },
+              'source_marks' => [
+                {
+                  'counter' => 4,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => '@glossarytext{}'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'expandglossary'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ]
             },
             {
               'args' => [
@@ -1082,62 +1143,6 @@ $result_trees{'glossary'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 2,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => '@glossarytext{}'
-                  }
-                ],
-                'extra' => {
-                  'name' => 'expandglossary'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            },
-            {
-              'counter' => 3,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => 'id2'
-                  },
-                  {
-                    'text' => 'name2'
-                  },
-                  {
-                    'text' => 'text2'
-                  }
-                ],
-                'extra' => {
-                  'name' => 'gentry'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            },
-            {
-              'counter' => 4,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => '@glossarytext{}'
-                  }
-                ],
-                'extra' => {
-                  'name' => 'expandglossary'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
@@ -1220,6 +1225,38 @@ $result_trees{'glossary'} = {
       ],
       'cmdname' => 'chapter',
       'contents' => [
+        {
+          'source_marks' => [
+            {
+              'counter' => 5,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'glossary'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 6,
+              'element' => {
+                'extra' => {
+                  'name' => 'glossarytext'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
+          'text' => ''
+        },
         {
           'text' => ' ',
           'type' => 'ignorable_spaces_after_command'
@@ -1278,36 +1315,7 @@ $result_trees{'glossary'} = {
         'file_name' => 'glossary.texi',
         'line_nr' => 46,
         'macro' => ''
-      },
-      'source_marks' => [
-        {
-          'counter' => 5,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'glossary'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 6,
-          'element' => {
-            'extra' => {
-              'name' => 'glossarytext'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ]
+      }
     }
   ],
   'type' => 'document_root'
@@ -1320,7 +1328,7 @@ 
$result_trees{'glossary'}{'contents'}[2]{'contents'}[3]{'contents'}[8]{'extra'}{
 
$result_trees{'glossary'}{'contents'}[2]{'contents'}[3]{'contents'}[8]{'extra'}{'node_argument'}{'node_content'}[0]
 = 
$result_trees{'glossary'}{'contents'}[2]{'contents'}[3]{'contents'}[8]{'args'}[0]{'contents'}[0];
 $result_trees{'glossary'}{'contents'}[3]{'extra'}{'node_content'}[0] = 
$result_trees{'glossary'}{'contents'}[3]{'args'}[0]{'contents'}[0];
 
$result_trees{'glossary'}{'contents'}[3]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
 = $result_trees{'glossary'}{'contents'}[3]{'args'}[0]{'contents'}[0];
-$result_trees{'glossary'}{'contents'}[4]{'contents'}[1]{'contents'}[1] = 
$result_trees{'glossary'}{'contents'}[2]{'contents'}[3]{'contents'}[8]{'extra'}{'label'};
+$result_trees{'glossary'}{'contents'}[4]{'contents'}[2]{'contents'}[1] = 
$result_trees{'glossary'}{'contents'}[2]{'contents'}[3]{'contents'}[8]{'extra'}{'label'};
 
 $result_texis{'glossary'} = '\\input texinfo.tex
 
@@ -1459,30 +1467,6 @@ $result_sectioning{'glossary'} = {
                 }
               },
               'info' => {},
-              'source_marks' => [
-                {
-                  'counter' => 5,
-                  'element' => {
-                    'extra' => {
-                      'name' => 'glossary'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                },
-                {
-                  'counter' => 6,
-                  'element' => {
-                    'extra' => {
-                      'name' => 'glossarytext'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'structure' => {
                 'section_level' => 1,
                 'section_number' => 1,
@@ -1530,30 +1514,6 @@ $result_nodes{'glossary'} = {
           'cmdname' => 'chapter',
           'extra' => {},
           'info' => {},
-          'source_marks' => [
-            {
-              'counter' => 5,
-              'element' => {
-                'extra' => {
-                  'name' => 'glossary'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            },
-            {
-              'counter' => 6,
-              'element' => {
-                'extra' => {
-                  'name' => 'glossarytext'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'structure' => {
             'section_number' => 1
           }
diff --git a/tp/t/results/macro/ifclear_in_macro.pl 
b/tp/t/results/macro/ifclear_in_macro.pl
index 02c6c7f8b3..c80c7a7168 100644
--- a/tp/t/results/macro/ifclear_in_macro.pl
+++ b/tp/t/results/macro/ifclear_in_macro.pl
@@ -81,6 +81,26 @@ $result_trees{'ifclear_in_macro'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'arg
+'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'note'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -100,25 +120,6 @@ $result_trees{'ifclear_in_macro'} = {
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'arg
-'
-              }
-            ],
-            'extra' => {
-              'name' => 'note'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/ifset_and_end_isef_in_macro.pl 
b/tp/t/results/macro/ifset_and_end_isef_in_macro.pl
index 46750cd78e..27e363e04d 100644
--- a/tp/t/results/macro/ifset_and_end_isef_in_macro.pl
+++ b/tp/t/results/macro/ifset_and_end_isef_in_macro.pl
@@ -129,24 +129,25 @@ $result_trees{'ifset_and_end_isef_in_macro'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'extra' => {
+                  'name' => 'beginifset'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'extra' => {
-              'name' => 'beginifset'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/ifset_in_macro.pl 
b/tp/t/results/macro/ifset_in_macro.pl
index d1c069e84f..5f431b7ff2 100644
--- a/tp/t/results/macro/ifset_in_macro.pl
+++ b/tp/t/results/macro/ifset_in_macro.pl
@@ -81,30 +81,31 @@ $result_trees{'ifset_in_macro'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'arg
+'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'note'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'arg
-'
-              }
-            ],
-            'extra' => {
-              'name' => 'note'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/ifset_in_macro_set.pl 
b/tp/t/results/macro/ifset_in_macro_set.pl
index a6c075542e..26ae7b4df0 100644
--- a/tp/t/results/macro/ifset_in_macro_set.pl
+++ b/tp/t/results/macro/ifset_in_macro_set.pl
@@ -81,6 +81,26 @@ $result_trees{'ifset_in_macro_set'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'arg
+'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'note'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -100,25 +120,6 @@ $result_trees{'ifset_in_macro_set'} = {
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'arg
-'
-              }
-            ],
-            'extra' => {
-              'name' => 'note'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/ignored_macro_definition.pl 
b/tp/t/results/macro/ignored_macro_definition.pl
index 3c9cca09e8..f0f24e5e30 100644
--- a/tp/t/results/macro/ignored_macro_definition.pl
+++ b/tp/t/results/macro/ignored_macro_definition.pl
@@ -110,6 +110,25 @@ $result_trees{'ignored_macro_definition'} = {
           'type' => 'paragraph'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'mymacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -132,24 +151,6 @@ $result_trees{'ignored_macro_definition'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'mymacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/implicit_quoting_one_arg.pl 
b/tp/t/results/macro/implicit_quoting_one_arg.pl
index a183893b30..6ce3f1f704 100644
--- a/tp/t/results/macro/implicit_quoting_one_arg.pl
+++ b/tp/t/results/macro/implicit_quoting_one_arg.pl
@@ -76,6 +76,25 @@ $result_trees{'implicit_quoting_one_arg'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'Many arguments, separated by commas, are 
processed here'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'FIXAME'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -115,24 +134,6 @@ $result_trees{'implicit_quoting_one_arg'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'Many arguments, separated by commas, are processed 
here'
-              }
-            ],
-            'extra' => {
-              'name' => 'FIXAME'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/implicit_quoting_recursion.pl 
b/tp/t/results/macro/implicit_quoting_recursion.pl
index 7101e82469..19bf959079 100644
--- a/tp/t/results/macro/implicit_quoting_recursion.pl
+++ b/tp/t/results/macro/implicit_quoting_recursion.pl
@@ -75,6 +75,128 @@ $result_trees{'implicit_quoting_recursion'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '@cat{@cat{@cat{@cat{@cat{na, to}, po}, co}, 
tu}, oto}'
+                  },
+                  {
+                    'text' => 'tam'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'cat'
+                },
+                'type' => 'rmacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '@cat{@cat{@cat{@cat{na, to}, po}, co}, tu}'
+                  },
+                  {
+                    'text' => 'oto'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'cat'
+                },
+                'type' => 'rmacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 3,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '@cat{@cat{@cat{na, to}, po}, co}'
+                  },
+                  {
+                    'text' => 'tu'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'cat'
+                },
+                'type' => 'rmacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 4,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '@cat{@cat{na, to}, po}'
+                  },
+                  {
+                    'text' => 'co'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'cat'
+                },
+                'type' => 'rmacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 5,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '@cat{na, to}'
+                  },
+                  {
+                    'text' => 'po'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'cat'
+                },
+                'type' => 'rmacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 6,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'na'
+                  },
+                  {
+                    'text' => 'to'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'cat'
+                },
+                'type' => 'rmacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -127,122 +249,6 @@ $result_trees{'implicit_quoting_recursion'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => '@cat{@cat{@cat{@cat{@cat{na, to}, po}, co}, tu}, 
oto}'
-              },
-              {
-                'text' => 'tam'
-              }
-            ],
-            'extra' => {
-              'name' => 'cat'
-            },
-            'type' => 'rmacro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => '@cat{@cat{@cat{@cat{na, to}, po}, co}, tu}'
-              },
-              {
-                'text' => 'oto'
-              }
-            ],
-            'extra' => {
-              'name' => 'cat'
-            },
-            'type' => 'rmacro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 3,
-          'element' => {
-            'args' => [
-              {
-                'text' => '@cat{@cat{@cat{na, to}, po}, co}'
-              },
-              {
-                'text' => 'tu'
-              }
-            ],
-            'extra' => {
-              'name' => 'cat'
-            },
-            'type' => 'rmacro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 4,
-          'element' => {
-            'args' => [
-              {
-                'text' => '@cat{@cat{na, to}, po}'
-              },
-              {
-                'text' => 'co'
-              }
-            ],
-            'extra' => {
-              'name' => 'cat'
-            },
-            'type' => 'rmacro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 5,
-          'element' => {
-            'args' => [
-              {
-                'text' => '@cat{na, to}'
-              },
-              {
-                'text' => 'po'
-              }
-            ],
-            'extra' => {
-              'name' => 'cat'
-            },
-            'type' => 'rmacro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 6,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'na'
-              },
-              {
-                'text' => 'to'
-              }
-            ],
-            'extra' => {
-              'name' => 'cat'
-            },
-            'type' => 'rmacro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/include_after_empty_line_arg.pl 
b/tp/t/results/macro/include_after_empty_line_arg.pl
index f13f52005d..4c201488e5 100644
--- a/tp/t/results/macro/include_after_empty_line_arg.pl
+++ b/tp/t/results/macro/include_after_empty_line_arg.pl
@@ -71,6 +71,25 @@ $result_trees{'include_after_empty_line_arg'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'mymacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -157,24 +176,6 @@ $result_trees{'include_after_empty_line_arg'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'mymacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/line_after_recursive_call.pl 
b/tp/t/results/macro/line_after_recursive_call.pl
index e57fdd7dcc..6d3f36309a 100644
--- a/tp/t/results/macro/line_after_recursive_call.pl
+++ b/tp/t/results/macro/line_after_recursive_call.pl
@@ -74,7 +74,20 @@ $result_trees{'line_after_recursive_call'} = {
             'file_name' => '',
             'line_nr' => 1,
             'macro' => ''
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'extra' => {
+                  'name' => 'mac'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'contents' => [
@@ -97,19 +110,6 @@ $result_trees{'line_after_recursive_call'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'extra' => {
-              'name' => 'mac'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/macro_expands_to_empty.pl 
b/tp/t/results/macro/macro_expands_to_empty.pl
index dc5c175259..03a41ed43e 100644
--- a/tp/t/results/macro/macro_expands_to_empty.pl
+++ b/tp/t/results/macro/macro_expands_to_empty.pl
@@ -97,6 +97,23 @@ $result_trees{'macro_expands_to_empty'} = {
               'counter' => 1,
               'sourcemark_type' => 'macro_expansion',
               'status' => 'end'
+            },
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'aa'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'foo'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
             }
           ],
           'text' => '
@@ -121,24 +138,6 @@ $result_trees{'macro_expands_to_empty'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'aa'
-              }
-            ],
-            'extra' => {
-              'name' => 'foo'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/macro_for_end.pl 
b/tp/t/results/macro/macro_for_end.pl
index 400a60a785..0cdb2372a8 100644
--- a/tp/t/results/macro/macro_for_end.pl
+++ b/tp/t/results/macro/macro_for_end.pl
@@ -85,6 +85,27 @@ $result_trees{'macro_for_end'} = {
           ],
           'cmdname' => 'cartouche',
           'contents' => [
+            {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'myend'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
+              'text' => ''
+            },
             {
               'args' => [
                 {
@@ -129,25 +150,7 @@ $result_trees{'macro_for_end'} = {
             'file_name' => '',
             'line_nr' => 5,
             'macro' => ''
-          },
-          'source_marks' => [
-            {
-              'counter' => 1,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'myend'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ]
+          }
         }
       ],
       'type' => 'before_node_section'
diff --git a/tp/t/results/macro/macro_for_ignored_line_command.pl 
b/tp/t/results/macro/macro_for_ignored_line_command.pl
index d605e4bce7..f3bb9ef485 100644
--- a/tp/t/results/macro/macro_for_ignored_line_command.pl
+++ b/tp/t/results/macro/macro_for_ignored_line_command.pl
@@ -67,6 +67,25 @@ $result_trees{'macro_for_ignored_line_command'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'pagemacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -82,24 +101,6 @@ $result_trees{'macro_for_ignored_line_command'} = {
           'cmdname' => 'page'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'pagemacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/macro_in_brace_command.pl 
b/tp/t/results/macro/macro_in_brace_command.pl
index 481ee90551..a4f7437786 100644
--- a/tp/t/results/macro/macro_in_brace_command.pl
+++ b/tp/t/results/macro/macro_in_brace_command.pl
@@ -171,6 +171,27 @@ $result_trees{'macro_in_brace_command'} = {
                       'args' => [
                         {
                           'contents' => [
+                            {
+                              'source_marks' => [
+                                {
+                                  'counter' => 1,
+                                  'element' => {
+                                    'args' => [
+                                      {
+                                        'text' => ''
+                                      }
+                                    ],
+                                    'extra' => {
+                                      'name' => 'foo'
+                                    },
+                                    'type' => 'macro_call'
+                                  },
+                                  'sourcemark_type' => 'macro_expansion',
+                                  'status' => 'start'
+                                }
+                              ],
+                              'text' => ''
+                            },
                             {
                               'source_marks' => [
                                 {
@@ -215,24 +236,6 @@ $result_trees{'macro_in_brace_command'} = {
                               'text' => 'bar-expansion'
                             }
                           ],
-                          'source_marks' => [
-                            {
-                              'counter' => 1,
-                              'element' => {
-                                'args' => [
-                                  {
-                                    'text' => ''
-                                  }
-                                ],
-                                'extra' => {
-                                  'name' => 'foo'
-                                },
-                                'type' => 'macro_call'
-                              },
-                              'sourcemark_type' => 'macro_expansion',
-                              'status' => 'start'
-                            }
-                          ],
                           'type' => 'brace_command_arg'
                         }
                       ],
diff --git a/tp/t/results/macro/macro_in_index_commands.pl 
b/tp/t/results/macro/macro_in_index_commands.pl
index 89fc36d661..14c26402e0 100644
--- a/tp/t/results/macro/macro_in_index_commands.pl
+++ b/tp/t/results/macro/macro_in_index_commands.pl
@@ -268,7 +268,25 @@ $result_trees{'macro_in_index_commands'} = {
             'file_name' => '',
             'line_nr' => 11,
             'macro' => ''
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 3,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'syncodeindexcommand'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'args' => [
@@ -711,24 +729,6 @@ $result_trees{'macro_in_index_commands'} = {
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 3,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'syncodeindexcommand'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     },
     {
@@ -751,6 +751,25 @@ $result_trees{'macro_in_index_commands'} = {
       'cmdname' => 'node',
       'contents' => [
         {
+          'source_marks' => [
+            {
+              'counter' => 6,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'trucindexcommand'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -1281,25 +1300,7 @@ $result_trees{'macro_in_index_commands'} = {
         'file_name' => '',
         'line_nr' => 36,
         'macro' => ''
-      },
-      'source_marks' => [
-        {
-          'counter' => 6,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'trucindexcommand'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ]
+      }
     }
   ],
   'type' => 'document_root'
@@ -1402,20 +1403,7 @@ $result_nodes{'macro_in_index_commands'} = {
     'isindex' => 1,
     'normalized' => 'Top'
   },
-  'info' => {},
-  'source_marks' => [
-    {
-      'counter' => 6,
-      'element' => {
-        'extra' => {
-          'name' => 'trucindexcommand'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    }
-  ]
+  'info' => {}
 };
 
 $result_menus{'macro_in_index_commands'} = {
@@ -1424,20 +1412,7 @@ $result_menus{'macro_in_index_commands'} = {
     'isindex' => 1,
     'normalized' => 'Top'
   },
-  'info' => {},
-  'source_marks' => [
-    {
-      'counter' => 6,
-      'element' => {
-        'extra' => {
-          'name' => 'trucindexcommand'
-        },
-        'type' => 'macro_call'
-      },
-      'sourcemark_type' => 'macro_expansion',
-      'status' => 'start'
-    }
-  ]
+  'info' => {}
 };
 
 $result_errors{'macro_in_index_commands'} = [
diff --git a/tp/t/results/macro/macro_in_macro_arg.pl 
b/tp/t/results/macro/macro_in_macro_arg.pl
index a6d05c7211..f2258dd35e 100644
--- a/tp/t/results/macro/macro_in_macro_arg.pl
+++ b/tp/t/results/macro/macro_in_macro_arg.pl
@@ -213,6 +213,42 @@ $result_trees{'macro_in_macro_arg'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '@macroone{}text for macro2'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macrothree'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macroone'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -264,40 +300,6 @@ $result_trees{'macro_in_macro_arg'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => '@macroone{}text for macro2'
-              }
-            ],
-            'extra' => {
-              'name' => 'macrothree'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'macroone'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/macro_in_macro_arg_simpler.pl 
b/tp/t/results/macro/macro_in_macro_arg_simpler.pl
index eb509d9641..c1b0b39c75 100644
--- a/tp/t/results/macro/macro_in_macro_arg_simpler.pl
+++ b/tp/t/results/macro/macro_in_macro_arg_simpler.pl
@@ -142,6 +142,42 @@ $result_trees{'macro_in_macro_arg_simpler'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '@macrooneone{}text for macro2'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macrothree'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macrooneone'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -176,40 +212,6 @@ $result_trees{'macro_in_macro_arg_simpler'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => '@macrooneone{}text for macro2'
-              }
-            ],
-            'extra' => {
-              'name' => 'macrothree'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'macrooneone'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/macro_in_menu.pl 
b/tp/t/results/macro/macro_in_menu.pl
index f7b9cc57a6..13f90e6894 100644
--- a/tp/t/results/macro/macro_in_menu.pl
+++ b/tp/t/results/macro/macro_in_menu.pl
@@ -400,6 +400,37 @@ $result_trees{'macro_in_menu'} = {
           ],
           'cmdname' => 'menu',
           'contents' => [
+            {
+              'contents' => [
+                {
+                  'contents' => [
+                    {
+                      'source_marks' => [
+                        {
+                          'counter' => 1,
+                          'element' => {
+                            'args' => [
+                              {
+                                'text' => ''
+                              }
+                            ],
+                            'extra' => {
+                              'name' => 'starspaces'
+                            },
+                            'type' => 'macro_call'
+                          },
+                          'sourcemark_type' => 'macro_expansion',
+                          'status' => 'start'
+                        }
+                      ],
+                      'text' => ''
+                    }
+                  ],
+                  'type' => 'preformatted'
+                }
+              ],
+              'type' => 'menu_comment'
+            },
             {
               'contents' => [
                 {
@@ -490,28 +521,29 @@ $result_trees{'macro_in_menu'} = {
                       'type' => 'after_menu_description_line'
                     },
                     {
+                      'source_marks' => [
+                        {
+                          'counter' => 4,
+                          'element' => {
+                            'args' => [
+                              {
+                                'text' => ''
+                              }
+                            ],
+                            'extra' => {
+                              'name' => 'astar'
+                            },
+                            'type' => 'macro_call'
+                          },
+                          'position' => 13,
+                          'sourcemark_type' => 'macro_expansion',
+                          'status' => 'start'
+                        }
+                      ],
                       'text' => 'menu comment
 '
                     }
                   ],
-                  'source_marks' => [
-                    {
-                      'counter' => 4,
-                      'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
-                        'extra' => {
-                          'name' => 'astar'
-                        },
-                        'type' => 'macro_call'
-                      },
-                      'sourcemark_type' => 'macro_expansion',
-                      'status' => 'start'
-                    }
-                  ],
                   'type' => 'preformatted'
                 }
               ],
@@ -548,28 +580,29 @@ $result_trees{'macro_in_menu'} = {
                     {
                       'contents' => [
                         {
+                          'source_marks' => [
+                            {
+                              'counter' => 5,
+                              'element' => {
+                                'args' => [
+                                  {
+                                    'text' => ''
+                                  }
+                                ],
+                                'extra' => {
+                                  'name' => 'astar'
+                                },
+                                'type' => 'macro_call'
+                              },
+                              'position' => 1,
+                              'sourcemark_type' => 'macro_expansion',
+                              'status' => 'start'
+                            }
+                          ],
                           'text' => '
 '
                         }
                       ],
-                      'source_marks' => [
-                        {
-                          'counter' => 5,
-                          'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
-                            'extra' => {
-                              'name' => 'astar'
-                            },
-                            'type' => 'macro_call'
-                          },
-                          'sourcemark_type' => 'macro_expansion',
-                          'status' => 'start'
-                        }
-                      ],
                       'type' => 'preformatted'
                     }
                   ],
@@ -914,25 +947,7 @@ $result_trees{'macro_in_menu'} = {
             'file_name' => '',
             'line_nr' => 26,
             'macro' => ''
-          },
-          'source_marks' => [
-            {
-              'counter' => 1,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'starspaces'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ]
+          }
         }
       ],
       'type' => 'before_node_section'
@@ -940,11 +955,11 @@ $result_trees{'macro_in_menu'} = {
   ],
   'type' => 'document_root'
 };
-$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[0]{'extra'}{'menu_entry_node_label'}{'node_content'}[0]
 = 
$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[0]{'contents'}[1]{'contents'}[0];
-$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[2]{'extra'}{'menu_entry_node_label'}{'node_content'}[0]
 = 
$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[2]{'contents'}[1]{'contents'}[0];
+$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[1]{'extra'}{'menu_entry_node_label'}{'node_content'}[0]
 = 
$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[1]{'contents'}[1]{'contents'}[0];
 
$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[3]{'extra'}{'menu_entry_node_label'}{'node_content'}[0]
 = 
$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[3]{'contents'}[1]{'contents'}[0];
 
$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[4]{'extra'}{'menu_entry_node_label'}{'node_content'}[0]
 = 
$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[4]{'contents'}[1]{'contents'}[0];
-$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[5]{'extra'}{'menu_entry_node_label'}{'node_content'}[0]
 = 
$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[5]{'contents'}[3]{'contents'}[0];
+$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[5]{'extra'}{'menu_entry_node_label'}{'node_content'}[0]
 = 
$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[5]{'contents'}[1]{'contents'}[0];
+$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[6]{'extra'}{'menu_entry_node_label'}{'node_content'}[0]
 = 
$result_trees{'macro_in_menu'}{'contents'}[0]{'contents'}[13]{'contents'}[6]{'contents'}[3]{'contents'}[0];
 
 $result_texis{'macro_in_menu'} = '
 @macro astar
diff --git a/tp/t/results/macro/macro_in_misc_commands.pl 
b/tp/t/results/macro/macro_in_misc_commands.pl
index 154033c322..5e2b7a59ba 100644
--- a/tp/t/results/macro/macro_in_misc_commands.pl
+++ b/tp/t/results/macro/macro_in_misc_commands.pl
@@ -548,6 +548,25 @@ $result_trees{'macro_in_misc_commands'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 5,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'documentlanguagecommand'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 29,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'documentlanguage on its line
 '
             },
@@ -595,24 +614,6 @@ $result_trees{'macro_in_misc_commands'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 5,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'documentlanguagecommand'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
@@ -798,7 +799,25 @@ $result_trees{'macro_in_misc_commands'} = {
             'file_name' => '',
             'line_nr' => 37,
             'macro' => ''
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 7,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'afourpapermacro'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'args' => [
@@ -1165,7 +1184,25 @@ $result_trees{'macro_in_misc_commands'} = {
             'file_name' => '',
             'line_nr' => 49,
             'macro' => ''
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 12,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'raisesectionsmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'args' => [
@@ -1232,7 +1269,25 @@ $result_trees{'macro_in_misc_commands'} = {
             'file_name' => '',
             'line_nr' => 53,
             'macro' => ''
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 13,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'lowersectionsmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'args' => [
@@ -1615,6 +1670,25 @@ $result_trees{'macro_in_misc_commands'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 15,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'strongmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -1750,6 +1824,25 @@ $result_trees{'macro_in_misc_commands'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 18,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'strongmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -3925,6 +4018,25 @@ $result_trees{'macro_in_misc_commands'} = {
           'type' => 'paragraph'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 36,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'noindentmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -3951,6 +4063,25 @@ $result_trees{'macro_in_misc_commands'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 37,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'noindentmacro'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 30,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'noindent at beginning of line
 '
             },
@@ -4020,6 +4151,25 @@ $result_trees{'macro_in_misc_commands'} = {
               'type' => 'ignorable_spaces_after_command'
             },
             {
+              'source_marks' => [
+                {
+                  'counter' => 39,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'pagemacro'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 42,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'noindent after space at beginning of line
 '
             }
@@ -4027,25 +4177,20 @@ $result_trees{'macro_in_misc_commands'} = {
           'extra' => {
             'noindent' => 1
           },
-          'source_marks' => [
+          'type' => 'paragraph'
+        },
+        {
+          'args' => [
             {
-              'counter' => 37,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'noindentmacro'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            },
+              'text' => '         page at beginning of line
+',
+              'type' => 'misc_arg'
+            }
+          ],
+          'cmdname' => 'page',
+          'source_marks' => [
             {
-              'counter' => 39,
+              'counter' => 40,
               'element' => {
                 'args' => [
                   {
@@ -4060,18 +4205,7 @@ $result_trees{'macro_in_misc_commands'} = {
               'sourcemark_type' => 'macro_expansion',
               'status' => 'start'
             }
-          ],
-          'type' => 'paragraph'
-        },
-        {
-          'args' => [
-            {
-              'text' => '         page at beginning of line
-',
-              'type' => 'misc_arg'
-            }
-          ],
-          'cmdname' => 'page'
+          ]
         },
         {
           'args' => [
@@ -4288,7 +4422,25 @@ $result_trees{'macro_in_misc_commands'} = {
             'file_name' => '',
             'line_nr' => 176,
             'macro' => ''
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 44,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'contentsmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'args' => [
@@ -4386,7 +4538,25 @@ $result_trees{'macro_in_misc_commands'} = {
             'file_name' => '',
             'line_nr' => 183,
             'macro' => ''
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 45,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'exdentmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'args' => [
@@ -4784,156 +4954,10 @@ $result_trees{'macro_in_misc_commands'} = {
         'file_name' => '',
         'line_nr' => 10,
         'macro' => ''
-      },
-      'source_marks' => [
-        {
-          'counter' => 7,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'afourpapermacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 12,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'raisesectionsmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 13,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'lowersectionsmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 15,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'strongmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 18,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'strongmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 36,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'noindentmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 40,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'pagemacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 44,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'contentsmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 45,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'exdentmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ]
-    },
-    {
-      'args' => [
+      }
+    },
+    {
+      'args' => [
         {
           'contents' => [
             {
@@ -5020,6 +5044,25 @@ $result_trees{'macro_in_misc_commands'} = {
       'cmdname' => 'chapter',
       'contents' => [
         {
+          'source_marks' => [
+            {
+              'counter' => 49,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'contentsmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -5099,7 +5142,25 @@ $result_trees{'macro_in_misc_commands'} = {
             'file_name' => '',
             'line_nr' => 208,
             'macro' => ''
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 50,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'shortcontentsmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'args' => [
@@ -5179,6 +5240,25 @@ $result_trees{'macro_in_misc_commands'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 51,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'byemacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -5194,57 +5274,7 @@ $result_trees{'macro_in_misc_commands'} = {
         'file_name' => '',
         'line_nr' => 204,
         'macro' => ''
-      },
-      'source_marks' => [
-        {
-          'counter' => 49,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'contentsmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 50,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'shortcontentsmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 51,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'byemacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ]
+      }
     },
     {
       'args' => [
@@ -5578,107 +5608,6 @@ $result_sectioning{'macro_in_misc_commands'} = {
           }
         },
         'info' => {},
-        'source_marks' => [
-          {
-            'counter' => 7,
-            'element' => {
-              'extra' => {
-                'name' => 'afourpapermacro'
-              },
-              'type' => 'macro_call'
-            },
-            'sourcemark_type' => 'macro_expansion',
-            'status' => 'start'
-          },
-          {
-            'counter' => 12,
-            'element' => {
-              'extra' => {
-                'name' => 'raisesectionsmacro'
-              },
-              'type' => 'macro_call'
-            },
-            'sourcemark_type' => 'macro_expansion',
-            'status' => 'start'
-          },
-          {
-            'counter' => 13,
-            'element' => {
-              'extra' => {
-                'name' => 'lowersectionsmacro'
-              },
-              'type' => 'macro_call'
-            },
-            'sourcemark_type' => 'macro_expansion',
-            'status' => 'start'
-          },
-          {
-            'counter' => 15,
-            'element' => {
-              'extra' => {
-                'name' => 'strongmacro'
-              },
-              'type' => 'macro_call'
-            },
-            'sourcemark_type' => 'macro_expansion',
-            'status' => 'start'
-          },
-          {
-            'counter' => 18,
-            'element' => {
-              'extra' => {
-                'name' => 'strongmacro'
-              },
-              'type' => 'macro_call'
-            },
-            'sourcemark_type' => 'macro_expansion',
-            'status' => 'start'
-          },
-          {
-            'counter' => 36,
-            'element' => {
-              'extra' => {
-                'name' => 'noindentmacro'
-              },
-              'type' => 'macro_call'
-            },
-            'sourcemark_type' => 'macro_expansion',
-            'status' => 'start'
-          },
-          {
-            'counter' => 40,
-            'element' => {
-              'extra' => {
-                'name' => 'pagemacro'
-              },
-              'type' => 'macro_call'
-            },
-            'sourcemark_type' => 'macro_expansion',
-            'status' => 'start'
-          },
-          {
-            'counter' => 44,
-            'element' => {
-              'extra' => {
-                'name' => 'contentsmacro'
-              },
-              'type' => 'macro_call'
-            },
-            'sourcemark_type' => 'macro_expansion',
-            'status' => 'start'
-          },
-          {
-            'counter' => 45,
-            'element' => {
-              'extra' => {
-                'name' => 'exdentmacro'
-              },
-              'type' => 'macro_call'
-            },
-            'sourcemark_type' => 'macro_expansion',
-            'status' => 'start'
-          }
-        ],
         'structure' => {
           'section_childs' => [
             {
@@ -5694,41 +5623,6 @@ $result_sectioning{'macro_in_misc_commands'} = {
                 }
               },
               'info' => {},
-              'source_marks' => [
-                {
-                  'counter' => 49,
-                  'element' => {
-                    'extra' => {
-                      'name' => 'contentsmacro'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                },
-                {
-                  'counter' => 50,
-                  'element' => {
-                    'extra' => {
-                      'name' => 'shortcontentsmacro'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                },
-                {
-                  'counter' => 51,
-                  'element' => {
-                    'extra' => {
-                      'name' => 'byemacro'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'structure' => {
                 'section_level' => 1,
                 'section_number' => 1,
@@ -5758,107 +5652,6 @@ $result_nodes{'macro_in_misc_commands'} = {
       'cmdname' => 'top',
       'extra' => {},
       'info' => {},
-      'source_marks' => [
-        {
-          'counter' => 7,
-          'element' => {
-            'extra' => {
-              'name' => 'afourpapermacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 12,
-          'element' => {
-            'extra' => {
-              'name' => 'raisesectionsmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 13,
-          'element' => {
-            'extra' => {
-              'name' => 'lowersectionsmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 15,
-          'element' => {
-            'extra' => {
-              'name' => 'strongmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 18,
-          'element' => {
-            'extra' => {
-              'name' => 'strongmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 36,
-          'element' => {
-            'extra' => {
-              'name' => 'noindentmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 40,
-          'element' => {
-            'extra' => {
-              'name' => 'pagemacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 44,
-          'element' => {
-            'extra' => {
-              'name' => 'contentsmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 45,
-          'element' => {
-            'extra' => {
-              'name' => 'exdentmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'structure' => {}
     },
     'menus' => [
@@ -5877,41 +5670,6 @@ $result_nodes{'macro_in_misc_commands'} = {
           'cmdname' => 'chapter',
           'extra' => {},
           'info' => {},
-          'source_marks' => [
-            {
-              'counter' => 49,
-              'element' => {
-                'extra' => {
-                  'name' => 'contentsmacro'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            },
-            {
-              'counter' => 50,
-              'element' => {
-                'extra' => {
-                  'name' => 'shortcontentsmacro'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            },
-            {
-              'counter' => 51,
-              'element' => {
-                'extra' => {
-                  'name' => 'byemacro'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'structure' => {
             'section_number' => 1
           }
diff --git a/tp/t/results/macro/macro_name_with_digit.pl 
b/tp/t/results/macro/macro_name_with_digit.pl
index 0303e7142a..ceff6b0b28 100644
--- a/tp/t/results/macro/macro_name_with_digit.pl
+++ b/tp/t/results/macro/macro_name_with_digit.pl
@@ -133,6 +133,25 @@ $result_trees{'macro_name_with_digit'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'some thing @macro1{}'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macro11'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -178,24 +197,6 @@ $result_trees{'macro_name_with_digit'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'some thing @macro1{}'
-              }
-            ],
-            'extra' => {
-              'name' => 'macro11'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/macro_name_with_hyphen.pl 
b/tp/t/results/macro/macro_name_with_hyphen.pl
index fc807ebc92..f1a40f6b9a 100644
--- a/tp/t/results/macro/macro_name_with_hyphen.pl
+++ b/tp/t/results/macro/macro_name_with_hyphen.pl
@@ -75,6 +75,28 @@ $result_trees{'macro_name_with_hyphen'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'blah'
+                  },
+                  {
+                    'text' => '@code{bli-bli}'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macro-one'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -118,27 +140,6 @@ $result_trees{'macro_name_with_hyphen'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'blah'
-              },
-              {
-                'text' => '@code{bli-bli}'
-              }
-            ],
-            'extra' => {
-              'name' => 'macro-one'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/macro_no_arg_bad_expansion.pl 
b/tp/t/results/macro/macro_no_arg_bad_expansion.pl
index 2cd9bf578d..1d5a255d18 100644
--- a/tp/t/results/macro/macro_no_arg_bad_expansion.pl
+++ b/tp/t/results/macro/macro_no_arg_bad_expansion.pl
@@ -67,6 +67,20 @@ $result_trees{'macro_no_arg_bad_expansion'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'extra' => {
+                  'name' => 'testone'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -89,19 +103,6 @@ $result_trees{'macro_no_arg_bad_expansion'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'extra' => {
-              'name' => 'testone'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/macro_no_arg_expansion.pl 
b/tp/t/results/macro/macro_no_arg_expansion.pl
index 9a3c7f9272..1721c4cb9d 100644
--- a/tp/t/results/macro/macro_no_arg_expansion.pl
+++ b/tp/t/results/macro/macro_no_arg_expansion.pl
@@ -67,6 +67,25 @@ $result_trees{'macro_no_arg_expansion'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'testone'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -89,24 +108,6 @@ $result_trees{'macro_no_arg_expansion'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'testone'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/macro_one_arg_end_of_file.pl 
b/tp/t/results/macro/macro_one_arg_end_of_file.pl
index b9f44e12e1..18c9c58b37 100644
--- a/tp/t/results/macro/macro_one_arg_end_of_file.pl
+++ b/tp/t/results/macro/macro_one_arg_end_of_file.pl
@@ -71,6 +71,25 @@ $result_trees{'macro_one_arg_end_of_file'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'onearg'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -92,24 +111,6 @@ $result_trees{'macro_one_arg_end_of_file'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'onearg'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/macro_with_error_at_end_line_after_macro.pl 
b/tp/t/results/macro/macro_with_error_at_end_line_after_macro.pl
index fea5c14bc5..e5d2b67330 100644
--- a/tp/t/results/macro/macro_with_error_at_end_line_after_macro.pl
+++ b/tp/t/results/macro/macro_with_error_at_end_line_after_macro.pl
@@ -71,6 +71,25 @@ $result_trees{'macro_with_error_at_end_line_after_macro'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'aaa'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'witherror'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -105,24 +124,6 @@ $result_trees{'macro_with_error_at_end_line_after_macro'} 
= {
           }
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'aaa'
-              }
-            ],
-            'extra' => {
-              'name' => 'witherror'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/macro_zero.pl b/tp/t/results/macro/macro_zero.pl
index eadc1909b9..09c0574ac9 100644
--- a/tp/t/results/macro/macro_zero.pl
+++ b/tp/t/results/macro/macro_zero.pl
@@ -74,6 +74,25 @@ $result_trees{'macro_zero'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'zero'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 6,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'Macro
 '
             },
@@ -90,24 +109,6 @@ $result_trees{'macro_zero'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 1,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'zero'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         }
       ],
diff --git a/tp/t/results/macro/no_macrobody.pl 
b/tp/t/results/macro/no_macrobody.pl
index 5fa23dd9f7..1c9e46a6c8 100644
--- a/tp/t/results/macro/no_macrobody.pl
+++ b/tp/t/results/macro/no_macrobody.pl
@@ -99,6 +99,31 @@ $result_trees{'no_macrobody'} = {
           'type' => 'empty_line'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'arg brace'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'nomacrobody'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 2,
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'end'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -113,29 +138,6 @@ $result_trees{'no_macrobody'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'arg brace'
-              }
-            ],
-            'extra' => {
-              'name' => 'nomacrobody'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'end'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/protect_comma_macro_line.pl 
b/tp/t/results/macro/protect_comma_macro_line.pl
index 6906854deb..fad359fd69 100644
--- a/tp/t/results/macro/protect_comma_macro_line.pl
+++ b/tp/t/results/macro/protect_comma_macro_line.pl
@@ -86,6 +86,25 @@ $result_trees{'protect_comma_macro_line'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'arg,  comma \\,'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macrotwo'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -126,24 +145,6 @@ $result_trees{'protect_comma_macro_line'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'arg,  comma \\,'
-              }
-            ],
-            'extra' => {
-              'name' => 'macrotwo'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/protect_in_body_line_arg.pl 
b/tp/t/results/macro/protect_in_body_line_arg.pl
index 7627e49b29..fefec356ae 100644
--- a/tp/t/results/macro/protect_in_body_line_arg.pl
+++ b/tp/t/results/macro/protect_in_body_line_arg.pl
@@ -75,6 +75,20 @@ $result_trees{'protect_in_body_line_arg'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'extra' => {
+                  'name' => 'macroone'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -149,19 +163,6 @@ $result_trees{'protect_in_body_line_arg'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'extra' => {
-              'name' => 'macroone'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/protect_in_body_one_arg.pl 
b/tp/t/results/macro/protect_in_body_one_arg.pl
index b4c15176b9..6d5305b23e 100644
--- a/tp/t/results/macro/protect_in_body_one_arg.pl
+++ b/tp/t/results/macro/protect_in_body_one_arg.pl
@@ -75,6 +75,25 @@ $result_trees{'protect_in_body_one_arg'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '@samp{f\\irst arg}'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macroone'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -148,24 +167,6 @@ $result_trees{'protect_in_body_one_arg'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => '@samp{f\\irst arg}'
-              }
-            ],
-            'extra' => {
-              'name' => 'macroone'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/recursive_call_in_argument.pl 
b/tp/t/results/macro/recursive_call_in_argument.pl
index 2d1de6fb97..8bbb88ee69 100644
--- a/tp/t/results/macro/recursive_call_in_argument.pl
+++ b/tp/t/results/macro/recursive_call_in_argument.pl
@@ -71,6 +71,25 @@ $result_trees{'recursive_call_in_argument'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => '@anorecurse{}'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'anorecurse'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -93,24 +112,6 @@ $result_trees{'recursive_call_in_argument'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => '@anorecurse{}'
-              }
-            ],
-            'extra' => {
-              'name' => 'anorecurse'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/redefine_texinfo_macro.pl 
b/tp/t/results/macro/redefine_texinfo_macro.pl
index 25eb2ec87b..6fb0527e26 100644
--- a/tp/t/results/macro/redefine_texinfo_macro.pl
+++ b/tp/t/results/macro/redefine_texinfo_macro.pl
@@ -71,6 +71,25 @@ $result_trees{'redefine_texinfo_macro'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'code'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'code'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -110,24 +129,6 @@ $result_trees{'redefine_texinfo_macro'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'code'
-              }
-            ],
-            'extra' => {
-              'name' => 'code'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/simple_imbricated_macro.pl 
b/tp/t/results/macro/simple_imbricated_macro.pl
index 5ecdea47e4..ad4ede510f 100644
--- a/tp/t/results/macro/simple_imbricated_macro.pl
+++ b/tp/t/results/macro/simple_imbricated_macro.pl
@@ -82,6 +82,25 @@ $result_trees{'simple_imbricated_macro'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'truc'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -161,6 +180,25 @@ $result_trees{'simple_imbricated_macro'} = {
           'type' => 'paragraph'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'bidule'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -183,40 +221,6 @@ $result_trees{'simple_imbricated_macro'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'truc'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'bidule'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/simple_imbricated_macro_rmacro.pl 
b/tp/t/results/macro/simple_imbricated_macro_rmacro.pl
index 2f5b6b2f13..63c685ebea 100644
--- a/tp/t/results/macro/simple_imbricated_macro_rmacro.pl
+++ b/tp/t/results/macro/simple_imbricated_macro_rmacro.pl
@@ -82,6 +82,25 @@ $result_trees{'simple_imbricated_macro_rmacro'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'truc'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -161,6 +180,25 @@ $result_trees{'simple_imbricated_macro_rmacro'} = {
           'type' => 'paragraph'
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'bidule'
+                },
+                'type' => 'rmacro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -183,40 +221,6 @@ $result_trees{'simple_imbricated_macro_rmacro'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'truc'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'bidule'
-            },
-            'type' => 'rmacro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/too_much_args.pl 
b/tp/t/results/macro/too_much_args.pl
index 543cc85578..add563ce33 100644
--- a/tp/t/results/macro/too_much_args.pl
+++ b/tp/t/results/macro/too_much_args.pl
@@ -80,6 +80,28 @@ $result_trees{'too_much_args'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'one'
+                  },
+                  {
+                    'text' => 'two, three'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'twoargs'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -106,27 +128,6 @@ $result_trees{'too_much_args'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'one'
-              },
-              {
-                'text' => 'two, three'
-              }
-            ],
-            'extra' => {
-              'name' => 'twoargs'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/macro/two_macros_on_a_line.pl 
b/tp/t/results/macro/two_macros_on_a_line.pl
index e383a03e4e..8eecfb0021 100644
--- a/tp/t/results/macro/two_macros_on_a_line.pl
+++ b/tp/t/results/macro/two_macros_on_a_line.pl
@@ -182,6 +182,25 @@ $result_trees{'two_macros_on_a_line'} = {
               'cmdname' => '}'
             },
             {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'mymacro'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 1,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => '
 '
             },
@@ -221,24 +240,6 @@ $result_trees{'two_macros_on_a_line'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 1,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'mymacro'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
@@ -267,6 +268,20 @@ $result_trees{'two_macros_on_a_line'} = {
               'cmdname' => '}'
             },
             {
+              'source_marks' => [
+                {
+                  'counter' => 3,
+                  'element' => {
+                    'extra' => {
+                      'name' => 'mymacro'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 1,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => '
 '
             },
@@ -306,19 +321,6 @@ $result_trees{'two_macros_on_a_line'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 3,
-              'element' => {
-                'extra' => {
-                  'name' => 'mymacro'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
@@ -347,6 +349,25 @@ $result_trees{'two_macros_on_a_line'} = {
               'cmdname' => '@'
             },
             {
+              'source_marks' => [
+                {
+                  'counter' => 5,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'mymacro'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 8,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'mymacro
 '
             },
@@ -381,24 +402,6 @@ $result_trees{'two_macros_on_a_line'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 5,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'mymacro'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
@@ -409,6 +412,28 @@ $result_trees{'two_macros_on_a_line'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 7,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => 'an
+arg
+
+in macro'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'mymacrowithargs'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 10,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'with args
 '
             },
@@ -425,27 +450,6 @@ $result_trees{'two_macros_on_a_line'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 7,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => 'an
-arg
-
-in macro'
-                  }
-                ],
-                'extra' => {
-                  'name' => 'mymacrowithargs'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
diff --git 
a/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl 
b/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl
index 0935547130..ce40f2b6e1 100644
--- a/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl
+++ b/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl
@@ -254,6 +254,43 @@ $result_trees{'codequoteundirected_codequotebacktick'} = {
               ],
               'cmdname' => 'copying',
               'contents' => [
+                {
+                  'source_marks' => [
+                    {
+                      'counter' => 1,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'allquotes'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    },
+                    {
+                      'counter' => 2,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'quotes'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ],
+                  'text' => ''
+                },
                 {
                   'contents' => [
                     {
@@ -631,7 +668,25 @@ $result_trees{'codequoteundirected_codequotebacktick'} = {
                     'file_name' => '',
                     'line_nr' => 31,
                     'macro' => 'allquotes'
-                  }
+                  },
+                  'source_marks' => [
+                    {
+                      'counter' => 3,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'quotes'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ]
                 },
                 {
                   'contents' => [
@@ -1034,7 +1089,25 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
                     'file_name' => '',
                     'line_nr' => 31,
                     'macro' => 'allquotes'
-                  }
+                  },
+                  'source_marks' => [
+                    {
+                      'counter' => 4,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'quotes'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ]
                 },
                 {
                   'contents' => [
@@ -1336,73 +1409,7 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
                 'file_name' => '',
                 'line_nr' => 30,
                 'macro' => ''
-              },
-              'source_marks' => [
-                {
-                  'counter' => 1,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'allquotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                },
-                {
-                  'counter' => 2,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'quotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                },
-                {
-                  'counter' => 3,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'quotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                },
-                {
-                  'counter' => 4,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'quotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ]
+              }
             },
             {
               'args' => [
@@ -1640,6 +1647,42 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
       'cmdname' => 'chapter',
       'contents' => [
         {
+          'source_marks' => [
+            {
+              'counter' => 5,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'allquotes'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            },
+            {
+              'counter' => 6,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'quotes'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -2021,7 +2064,25 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
             'file_name' => '',
             'line_nr' => 45,
             'macro' => 'allquotes'
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 7,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'quotes'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'contents' => [
@@ -2424,7 +2485,25 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
             'file_name' => '',
             'line_nr' => 45,
             'macro' => 'allquotes'
-          }
+          },
+          'source_marks' => [
+            {
+              'counter' => 8,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'quotes'
+                },
+                'type' => 'macro_call'
+              },
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ]
         },
         {
           'contents' => [
@@ -2711,6 +2790,40 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
             {
               'contents' => [
                 {
+                  'source_marks' => [
+                    {
+                      'counter' => 9,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'allquotes'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    },
+                    {
+                      'counter' => 10,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'quotes'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ],
                   'text' => '``simple-double--three---four----\'\' `simple\' 
quotedblleft: '
                 },
                 {
@@ -2969,40 +3082,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
                   'type' => 'empty_line'
                 }
               ],
-              'source_marks' => [
-                {
-                  'counter' => 9,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'allquotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                },
-                {
-                  'counter' => 10,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'quotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'type' => 'preformatted'
             },
             {
@@ -3121,7 +3200,25 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
                     'file_name' => '',
                     'line_nr' => 48,
                     'macro' => 'allquotes'
-                  }
+                  },
+                  'source_marks' => [
+                    {
+                      'counter' => 11,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'quotes'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ]
                 },
                 {
                   'text' => '``simple-double--three---four----\'\' `simple\' 
quotedblleft: '
@@ -3382,24 +3479,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
                   'type' => 'empty_line'
                 }
               ],
-              'source_marks' => [
-                {
-                  'counter' => 11,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'quotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'type' => 'preformatted'
             },
             {
@@ -3542,7 +3621,25 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
                     'file_name' => '',
                     'line_nr' => 48,
                     'macro' => 'allquotes'
-                  }
+                  },
+                  'source_marks' => [
+                    {
+                      'counter' => 12,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'quotes'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ]
                 },
                 {
                   'text' => '``simple-double--three---four----\'\' `simple\' 
quotedblleft: '
@@ -3803,24 +3900,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
 '
                 }
               ],
-              'source_marks' => [
-                {
-                  'counter' => 12,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'quotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'type' => 'preformatted'
             },
             {
@@ -3878,73 +3957,7 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
         'file_name' => '',
         'line_nr' => 43,
         'macro' => ''
-      },
-      'source_marks' => [
-        {
-          'counter' => 5,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'allquotes'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 6,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'quotes'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 7,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'quotes'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 8,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'quotes'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ]
+      }
     }
   ],
   'type' => 'document_root'
@@ -4229,52 +4242,6 @@ 
$result_sectioning{'codequoteundirected_codequotebacktick'} = {
                 }
               },
               'info' => {},
-              'source_marks' => [
-                {
-                  'counter' => 5,
-                  'element' => {
-                    'extra' => {
-                      'name' => 'allquotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                },
-                {
-                  'counter' => 6,
-                  'element' => {
-                    'extra' => {
-                      'name' => 'quotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                },
-                {
-                  'counter' => 7,
-                  'element' => {
-                    'extra' => {
-                      'name' => 'quotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                },
-                {
-                  'counter' => 8,
-                  'element' => {
-                    'extra' => {
-                      'name' => 'quotes'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'structure' => {
                 'section_level' => 1,
                 'section_number' => 1,
@@ -4317,52 +4284,6 @@ $result_nodes{'codequoteundirected_codequotebacktick'} = 
{
           'cmdname' => 'chapter',
           'extra' => {},
           'info' => {},
-          'source_marks' => [
-            {
-              'counter' => 5,
-              'element' => {
-                'extra' => {
-                  'name' => 'allquotes'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            },
-            {
-              'counter' => 6,
-              'element' => {
-                'extra' => {
-                  'name' => 'quotes'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            },
-            {
-              'counter' => 7,
-              'element' => {
-                'extra' => {
-                  'name' => 'quotes'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            },
-            {
-              'counter' => 8,
-              'element' => {
-                'extra' => {
-                  'name' => 'quotes'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'structure' => {
             'section_number' => 1
           }
diff --git a/tp/t/results/misc_commands/kbdinputstyle.pl 
b/tp/t/results/misc_commands/kbdinputstyle.pl
index 2c8f635caa..69235a906f 100644
--- a/tp/t/results/misc_commands/kbdinputstyle.pl
+++ b/tp/t/results/misc_commands/kbdinputstyle.pl
@@ -178,6 +178,25 @@ $result_trees{'kbdinputstyle'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'codekbdmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -665,6 +684,25 @@ $result_trees{'kbdinputstyle'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'codekbdmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -1143,6 +1181,25 @@ $result_trees{'kbdinputstyle'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 3,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'codekbdmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -1556,56 +1613,6 @@ $result_trees{'kbdinputstyle'} = {
           }
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'codekbdmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'codekbdmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 3,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'codekbdmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/misc_commands/kbdinputstyle_in_table.pl 
b/tp/t/results/misc_commands/kbdinputstyle_in_table.pl
index c920b9a592..be90e399df 100644
--- a/tp/t/results/misc_commands/kbdinputstyle_in_table.pl
+++ b/tp/t/results/misc_commands/kbdinputstyle_in_table.pl
@@ -203,6 +203,25 @@ $result_trees{'kbdinputstyle_in_table'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'codekbdmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -814,6 +833,25 @@ $result_trees{'kbdinputstyle_in_table'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 2,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'codekbdmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -1417,6 +1455,25 @@ $result_trees{'kbdinputstyle_in_table'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 3,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'codekbdmacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -1956,56 +2013,6 @@ $result_trees{'kbdinputstyle_in_table'} = {
           }
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'codekbdmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 2,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'codekbdmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        },
-        {
-          'counter' => 3,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'codekbdmacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/misc_commands/test_allowcodebreaks.pl 
b/tp/t/results/misc_commands/test_allowcodebreaks.pl
index 152ed45138..7ea9e9b1ff 100644
--- a/tp/t/results/misc_commands/test_allowcodebreaks.pl
+++ b/tp/t/results/misc_commands/test_allowcodebreaks.pl
@@ -211,6 +211,25 @@ $result_trees{'test_allowcodebreaks'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => '0'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'testallowcodebreakspara'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 29,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'Before first allowcodebreaks
 '
             },
@@ -526,24 +545,6 @@ $result_trees{'test_allowcodebreaks'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 1,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => '0'
-                  }
-                ],
-                'extra' => {
-                  'name' => 'testallowcodebreakspara'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
@@ -699,6 +700,25 @@ $result_trees{'test_allowcodebreaks'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 3,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => '1'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'testallowcodebreakspara'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 12,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'After false
 '
             },
@@ -1014,24 +1034,6 @@ $result_trees{'test_allowcodebreaks'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 3,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => '1'
-                  }
-                ],
-                'extra' => {
-                  'name' => 'testallowcodebreakspara'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
@@ -1649,6 +1651,25 @@ $result_trees{'test_allowcodebreaks'} = {
         {
           'contents' => [
             {
+              'source_marks' => [
+                {
+                  'counter' => 6,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => '2'
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'testallowcodebreakspara'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'position' => 11,
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
               'text' => 'After true
 '
             },
@@ -1964,24 +1985,6 @@ $result_trees{'test_allowcodebreaks'} = {
 '
             }
           ],
-          'source_marks' => [
-            {
-              'counter' => 6,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => '2'
-                  }
-                ],
-                'extra' => {
-                  'name' => 'testallowcodebreakspara'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ],
           'type' => 'paragraph'
         },
         {
diff --git a/tp/t/results/plaintext_tests/star_at_command_formatting.pl 
b/tp/t/results/plaintext_tests/star_at_command_formatting.pl
index ef9663a832..93ebf309bb 100644
--- a/tp/t/results/plaintext_tests/star_at_command_formatting.pl
+++ b/tp/t/results/plaintext_tests/star_at_command_formatting.pl
@@ -122,6 +122,25 @@ $result_trees{'star_at_command_formatting'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => ''
+                  }
+                ],
+                'extra' => {
+                  'name' => 'mymacro'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -376,6 +395,25 @@ $result_trees{'star_at_command_formatting'} = {
             {
               'contents' => [
                 {
+                  'source_marks' => [
+                    {
+                      'counter' => 2,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'mymacro'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'position' => 8,
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ],
                   'text' => 'Example
 '
                 },
@@ -598,24 +636,6 @@ $result_trees{'star_at_command_formatting'} = {
 '
                 }
               ],
-              'source_marks' => [
-                {
-                  'counter' => 2,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'mymacro'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'type' => 'preformatted'
             },
             {
@@ -679,6 +699,25 @@ $result_trees{'star_at_command_formatting'} = {
             {
               'contents' => [
                 {
+                  'source_marks' => [
+                    {
+                      'counter' => 3,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'mymacro'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'position' => 10,
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ],
                   'text' => 'Quotation
 '
                 },
@@ -710,24 +749,6 @@ $result_trees{'star_at_command_formatting'} = {
 '
                 }
               ],
-              'source_marks' => [
-                {
-                  'counter' => 3,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'mymacro'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ],
               'type' => 'paragraph'
             },
             {
@@ -971,24 +992,6 @@ $result_trees{'star_at_command_formatting'} = {
           'type' => 'empty_line'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => ''
-              }
-            ],
-            'extra' => {
-              'name' => 'mymacro'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/value_and_macro/comma_value_in_macro_arg.pl 
b/tp/t/results/value_and_macro/comma_value_in_macro_arg.pl
index f6b6e8228a..444c82d2d4 100644
--- a/tp/t/results/value_and_macro/comma_value_in_macro_arg.pl
+++ b/tp/t/results/value_and_macro/comma_value_in_macro_arg.pl
@@ -103,6 +103,25 @@ $result_trees{'comma_value_in_macro_arg'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'arg1 @value{comma} arg2 '
+                  }
+                ],
+                'extra' => {
+                  'name' => 'macro1'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -161,24 +180,6 @@ $result_trees{'comma_value_in_macro_arg'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'arg1 @value{comma} arg2 '
-              }
-            ],
-            'extra' => {
-              'name' => 'macro1'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/value_and_macro/value_in_macro_body.pl 
b/tp/t/results/value_and_macro/value_in_macro_body.pl
index 8ae775cfba..03bdfaddad 100644
--- a/tp/t/results/value_and_macro/value_in_macro_body.pl
+++ b/tp/t/results/value_and_macro/value_in_macro_body.pl
@@ -99,6 +99,25 @@ $result_trees{'value_in_macro_body'} = {
           }
         },
         {
+          'source_marks' => [
+            {
+              'counter' => 1,
+              'element' => {
+                'args' => [
+                  {
+                    'text' => 'macro_arg1'
+                  }
+                ],
+                'extra' => {
+                  'name' => 'testvaluebody'
+                },
+                'type' => 'macro_call'
+              },
+              'position' => 1,
+              'sourcemark_type' => 'macro_expansion',
+              'status' => 'start'
+            }
+          ],
           'text' => '
 ',
           'type' => 'empty_line'
@@ -141,24 +160,6 @@ $result_trees{'value_in_macro_body'} = {
           'type' => 'paragraph'
         }
       ],
-      'source_marks' => [
-        {
-          'counter' => 1,
-          'element' => {
-            'args' => [
-              {
-                'text' => 'macro_arg1'
-              }
-            ],
-            'extra' => {
-              'name' => 'testvaluebody'
-            },
-            'type' => 'macro_call'
-          },
-          'sourcemark_type' => 'macro_expansion',
-          'status' => 'start'
-        }
-      ],
       'type' => 'before_node_section'
     }
   ],
diff --git a/tp/t/results/xtable/table_nested.pl 
b/tp/t/results/xtable/table_nested.pl
index a155a49a79..8e62e2caf0 100644
--- a/tp/t/results/xtable/table_nested.pl
+++ b/tp/t/results/xtable/table_nested.pl
@@ -194,6 +194,27 @@ $result_trees{'table_nested'} = {
           ],
           'cmdname' => 'quotation',
           'contents' => [
+            {
+              'source_marks' => [
+                {
+                  'counter' => 1,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'myvtable'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ],
+              'text' => ''
+            },
             {
               'args' => [
                 {
@@ -758,25 +779,7 @@ $result_trees{'table_nested'} = {
             'file_name' => '',
             'line_nr' => 26,
             'macro' => ''
-          },
-          'source_marks' => [
-            {
-              'counter' => 1,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'myvtable'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ]
+          }
         },
         {
           'text' => '
@@ -806,6 +809,26 @@ $result_trees{'table_nested'} = {
           ],
           'cmdname' => 'example',
           'contents' => [
+            {
+              'source_marks' => [
+                {
+                  'counter' => 2,
+                  'element' => {
+                    'args' => [
+                      {
+                        'text' => ''
+                      }
+                    ],
+                    'extra' => {
+                      'name' => 'myvtable'
+                    },
+                    'type' => 'macro_call'
+                  },
+                  'sourcemark_type' => 'macro_expansion',
+                  'status' => 'start'
+                }
+              ]
+            },
             {
               'args' => [
                 {
@@ -1370,25 +1393,7 @@ $result_trees{'table_nested'} = {
             'file_name' => '',
             'line_nr' => 31,
             'macro' => ''
-          },
-          'source_marks' => [
-            {
-              'counter' => 2,
-              'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
-                'extra' => {
-                  'name' => 'myvtable'
-                },
-                'type' => 'macro_call'
-              },
-              'sourcemark_type' => 'macro_expansion',
-              'status' => 'start'
-            }
-          ]
+          }
         },
         {
           'text' => '
@@ -1432,6 +1437,27 @@ $result_trees{'table_nested'} = {
               ],
               'cmdname' => 'quotation',
               'contents' => [
+                {
+                  'source_marks' => [
+                    {
+                      'counter' => 3,
+                      'element' => {
+                        'args' => [
+                          {
+                            'text' => ''
+                          }
+                        ],
+                        'extra' => {
+                          'name' => 'myvtable'
+                        },
+                        'type' => 'macro_call'
+                      },
+                      'sourcemark_type' => 'macro_expansion',
+                      'status' => 'start'
+                    }
+                  ],
+                  'text' => ''
+                },
                 {
                   'args' => [
                     {
@@ -1996,25 +2022,7 @@ $result_trees{'table_nested'} = {
                 'file_name' => '',
                 'line_nr' => 37,
                 'macro' => ''
-              },
-              'source_marks' => [
-                {
-                  'counter' => 3,
-                  'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
-                    'extra' => {
-                      'name' => 'myvtable'
-                    },
-                    'type' => 'macro_call'
-                  },
-                  'sourcemark_type' => 'macro_expansion',
-                  'status' => 'start'
-                }
-              ]
+              }
             },
             {
               'args' => [
@@ -2061,48 +2069,48 @@ $result_trees{'table_nested'} = {
   ],
   'type' => 'document_root'
 };
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[0]{'args'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[3]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[3]{'args'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[0]{'args'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[2]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[2]{'args'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'contents'}[1];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'contents'}[2]{'contents'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0];
-$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[3]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[4]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[3]{'contents'}[4]{'args'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[3]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[6]{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'contents'}[1];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[1]{'contents'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'args'}[0]{'contents'};
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0]{'extra'}{'index_entry'}{'entry_element'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'contents'}[2]{'contents'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[4]{'extra'}{'command_as_argument'}
 = 
$result_trees{'table_nested'}{'contents'}[0]{'contents'}[9]{'contents'}[0]{'contents'}[4]{'args'}[0]{'contents'}[0];
 
 $result_texis{'table_nested'} = '@macro myvtable
 @vtable @asis



reply via email to

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