texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Sat, 4 May 2024 04:08:41 -0400 (EDT)

branch: master
commit 78efc8439cb00c457e5d0a5d9956e1e898410f7c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat May 4 10:08:31 2024 +0200

    * tp/Makefile.tres, tp/t/19def.t (comment_index_before_defline)
    (text_block_before_defline): add test with content in @defblock before
    @defline.
---
 ChangeLog                                        |   6 +
 tp/Makefile.tres                                 |   2 +
 tp/t/19def.t                                     |  30 +
 tp/t/results/def/comment_index_before_defline.pl | 382 ++++++++++
 tp/t/results/def/text_block_before_defline.pl    | 855 +++++++++++++++++++++++
 5 files changed, 1275 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index e3cc66b23c..c250cef0d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-04  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Makefile.tres, tp/t/19def.t (comment_index_before_defline)
+       (text_block_before_defline): add test with content in @defblock before
+       @defline.
+
 2024-05-04  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (_convert_def_command),
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index 1a4f5b88fc..2c3941ed34 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -444,6 +444,7 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/def/ampchar.pl \
   t/results/def/bracketed_arg_no_space.pl \
   t/results/def/code_in_def.pl \
+  t/results/def/comment_index_before_defline.pl \
   t/results/def/def_defx_mismatch.pl \
   t/results/def/def_groupings_args.pl \
   t/results/def/defblock_no_defline.pl \
@@ -478,6 +479,7 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/def/protected_brace.pl \
   t/results/def/ref_in_def.pl \
   t/results/def/space_in_def_for_index.pl \
+  t/results/def/text_block_before_defline.pl \
   t/results/def/wrong_braces_simple.pl \
   t/results/def/wrong_braces_with_end_of_lines.pl \
   t/results/docbook_tests/between_node_and_section.pl \
diff --git a/tp/t/19def.t b/tp/t/19def.t
index 96b3d492d1..6ae1b30eda 100644
--- a/tp/t/19def.t
+++ b/tp/t/19def.t
@@ -469,6 +469,36 @@ misc text inside
 @dots{}
 @end defblock
 '],
+['comment_index_before_defline',
+'@defblock
+@c a comment
+@cindex entry
+@comment another
+
+@defline a b c d
+@end defblock
+'],
+['text_block_before_defline',
+'@node Top
+@top top
+
+@node chapt
+@chapter Chap
+
+@defblock
+Some text@footnote{In footnote}.
+
+@example
+an example
+@end example
+
+@menu
+* (other_manual)::
+@end menu
+
+@defline a b c d
+@end defblock
+', {'FORMAT_MENU' => 'menu'}, {'FORMAT_MENU' => 'menu'}],
 );
 
 foreach my $test (@test_defblock) {
diff --git a/tp/t/results/def/comment_index_before_defline.pl 
b/tp/t/results/def/comment_index_before_defline.pl
new file mode 100644
index 0000000000..a02cd02f17
--- /dev/null
+++ b/tp/t/results/def/comment_index_before_defline.pl
@@ -0,0 +1,382 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
+   %result_indices %result_sectioning %result_nodes %result_menus
+   %result_floats %result_converted %result_converted_errors 
+   %result_elements %result_directions_text %result_indices_sort_strings);
+
+use utf8;
+
+$result_trees{'comment_index_before_defline'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'args' => [
+            {
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'defblock',
+          'contents' => [
+            {
+              'contents' => [
+                {
+                  'args' => [
+                    {
+                      'text' => ' a comment
+',
+                      'type' => 'rawline_arg'
+                    }
+                  ],
+                  'cmdname' => 'c'
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'entry'
+                        }
+                      ],
+                      'info' => {
+                        'spaces_after_argument' => {
+                          'text' => '
+'
+                        }
+                      },
+                      'type' => 'line_arg'
+                    }
+                  ],
+                  'cmdname' => 'cindex',
+                  'extra' => {
+                    'index_entry' => [
+                      'cp',
+                      1
+                    ]
+                  },
+                  'info' => {
+                    'command_name' => 'cindex',
+                    'spaces_before_argument' => {
+                      'text' => ' '
+                    }
+                  },
+                  'source_info' => {
+                    'line_nr' => 3
+                  },
+                  'type' => 'index_entry_command'
+                },
+                {
+                  'args' => [
+                    {
+                      'text' => ' another
+',
+                      'type' => 'rawline_arg'
+                    }
+                  ],
+                  'cmdname' => 'comment'
+                },
+                {
+                  'text' => '
+',
+                  'type' => 'empty_line'
+                }
+              ],
+              'type' => 'def_item'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'extra' => {
+                        'def_role' => 'category'
+                      },
+                      'text' => 'a'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'spaces'
+                      },
+                      'text' => ' ',
+                      'type' => 'spaces'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'name'
+                      },
+                      'text' => 'b'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'spaces'
+                      },
+                      'text' => ' ',
+                      'type' => 'spaces'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'arg'
+                      },
+                      'text' => 'c'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'spaces'
+                      },
+                      'text' => ' ',
+                      'type' => 'spaces'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'arg'
+                      },
+                      'text' => 'd'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'defline',
+              'extra' => {
+                'def_command' => 'defline',
+                'def_index_element' => {},
+                'original_def_cmdname' => 'defline'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'line_nr' => 6
+              },
+              'type' => 'def_line'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'defblock'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'defblock'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'line_nr' => 7
+              }
+            }
+          ],
+          'source_info' => {
+            'line_nr' => 1
+          }
+        }
+      ],
+      'type' => 'before_node_section'
+    }
+  ],
+  'type' => 'document_root'
+};
+$result_trees{'comment_index_before_defline'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'extra'}{'def_index_element'}
 = 
$result_trees{'comment_index_before_defline'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[2];
+
+$result_texis{'comment_index_before_defline'} = '@defblock
+@c a comment
+@cindex entry
+@comment another
+
+@defline a b c d
+@end defblock
+';
+
+
+$result_texts{'comment_index_before_defline'} = '
+a: b c d
+';
+
+$result_errors{'comment_index_before_defline'} = [
+  {
+    'error_line' => 'warning: entry for index `cp\' outside of any node
+',
+    'line_nr' => 3,
+    'text' => 'entry for index `cp\' outside of any node',
+    'type' => 'warning'
+  }
+];
+
+
+$result_floats{'comment_index_before_defline'} = {};
+
+
+$result_indices_sort_strings{'comment_index_before_defline'} = {
+  'cp' => [
+    'entry'
+  ]
+};
+
+
+
+$result_converted{'plaintext'}->{'comment_index_before_defline'} = ' -- a: b c 
d
+';
+
+
+$result_converted{'html'}->{'comment_index_before_defline'} = '<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Untitled Document</title>
+
+<meta name="description" content="Untitled Document">
+<meta name="keywords" content="Untitled Document">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<style type="text/css">
+<!--
+strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
+-->
+</style>
+
+
+</head>
+
+<body lang="en">
+<dl class="defblock">
+<dd><a class="index-entry-id" id="index-entry"></a>
+
+</dd><dt class="defline"><span class="category-def">a: </span><strong 
class="def-name">b</strong> <var class="def-var-arguments">c d</var></dt>
+</dl>
+
+
+
+</body>
+</html>
+';
+
+$result_converted_errors{'html'}->{'comment_index_before_defline'} = [
+  {
+    'error_line' => 'warning: must specify a title with a title command or @top
+',
+    'text' => 'must specify a title with a title command or @top',
+    'type' => 'warning'
+  }
+];
+
+
+
+$result_converted{'latex'}->{'comment_index_before_defline'} = 
'\\documentclass{book}
+\\usepackage{amsfonts}
+\\usepackage{amsmath}
+\\usepackage[gen]{eurosym}
+\\usepackage{textcomp}
+\\usepackage{graphicx}
+\\usepackage{etoolbox}
+\\usepackage{titleps}
+\\usepackage[utf8]{inputenc}
+\\usepackage[T1]{fontenc}
+\\usepackage{imakeidx}
+\\usepackage{embrac}
+\\usepackage{expl3}
+\\usepackage{tabularx}
+\\usepackage{float}
+% use hidelinks to remove boxes around links to be similar to Texinfo TeX
+\\usepackage[hidelinks]{hyperref}
+
+\\makeatletter
+\\newcommand{\\Texinfosettitle}{No Title}%
+
+% no index headers
+\\indexsetup{level=\\relax,toclevel=section}%
+\\makeindex[name=cp,title=]%
+
+% redefine the \\mainmatter command such that it does not clear page
+% as if in double page
+\\renewcommand\\mainmatter{\\clearpage\\@mainmattertrue\\pagenumbering{arabic}}
+\\newenvironment{Texinfopreformatted}{%
+  
\\par\\GNUTobeylines\\obeyspaces\\frenchspacing\\parskip=\\z@\\parindent=\\z@}{}
+{\\catcode`\\^^M=13 \\gdef\\GNUTobeylines{\\catcode`\\^^M=13 
\\def^^M{\\null\\par}}}
+\\newenvironment{Texinfoindented}{\\begin{list}{}{}\\item\\relax}{\\end{list}}
+
+% used for substitutions in commands
+\\newcommand{\\Texinfoplaceholder}[1]{}
+
+\\newpagestyle{single}{\\sethead[\\chaptername{} \\thechapter{} 
\\chaptertitle{}][][\\thepage]
+                              {\\chaptername{} \\thechapter{} 
\\chaptertitle{}}{}{\\thepage}}
+
+% braces are upright in italic and slanted only in @def*
+% so it is turned off here, and turned on @def* lines
+\\EmbracOff{}%
+
+% allow line breaking at underscore
+\\let\\Texinfounderscore\\_
+\\renewcommand{\\_}{\\Texinfounderscore\\discretionary{}{}{}}
+\\renewcommand{\\includegraphics}[1]{\\fbox{FIG \\detokenize{#1}}}
+
+\\makeatother
+% set default for @setchapternewpage
+\\makeatletter
+\\patchcmd{\\chapter}{\\if@openright\\cleardoublepage\\else\\clearpage\\fi}{\\Texinfoplaceholder{setchapternewpage
 placeholder}\\clearpage}{}{}
+\\makeatother
+\\pagestyle{single}%
+
+\\begin{quote}
+\\unskip{\\parskip=0pt\\noindent}%
+\\index[cp]{entry@entry}%
+
+\\end{quote}
+
+\\noindent\\begin{tabularx}{\\linewidth}{@{}Xr}
+\\rightskip=5em plus 1 fill \\hangindent=2em \\hyphenpenalty=10000
+\\texttt{b \\EmbracOn{}\\textnormal{\\textsl{c d}}\\EmbracOff{}}& [a]
+\\end{tabularx}
+
+\\end{document}
+';
+
+
+$result_converted{'docbook'}->{'comment_index_before_defline'} = 
'<blockquote><!-- a comment -->
+<indexterm role="cp"><primary>entry</primary></indexterm>
+<!-- another -->
+
+</blockquote><synopsis><phrase role="category"><emphasis 
role="bold">a</emphasis>:</phrase> <varname>b</varname> <emphasis 
role="arg">c</emphasis> <emphasis role="arg">d</emphasis></synopsis>
+';
+
+
+$result_converted{'xml'}->{'comment_index_before_defline'} = '<defblock 
endspaces=" ">
+<definitionitem><!-- c a comment -->
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="1">entry</indexterm></cindex>
+<!-- comment another -->
+
+</definitionitem><defline spaces=" 
"><definitionterm><defcategory>a</defcategory> <defsymbol>b</defsymbol> 
<defparam>c</defparam> <defparam>d</defparam></definitionterm></defline>
+</defblock>
+';
+
+1;
diff --git a/tp/t/results/def/text_block_before_defline.pl 
b/tp/t/results/def/text_block_before_defline.pl
new file mode 100644
index 0000000000..43302098af
--- /dev/null
+++ b/tp/t/results/def/text_block_before_defline.pl
@@ -0,0 +1,855 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
+   %result_indices %result_sectioning %result_nodes %result_menus
+   %result_floats %result_converted %result_converted_errors 
+   %result_elements %result_directions_text %result_indices_sort_strings);
+
+use utf8;
+
+$result_trees{'text_block_before_defline'} = {
+  'contents' => [
+    {
+      'type' => 'before_node_section'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'Top'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'is_target' => 1,
+        'normalized' => 'Top'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'line_nr' => 1
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'top'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'top',
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'extra' => {},
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'line_nr' => 2
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'chapt'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'is_target' => 1,
+        'normalized' => 'chapt'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'line_nr' => 4
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'text' => 'Chap'
+            }
+          ],
+          'info' => {
+            'spaces_after_argument' => {
+              'text' => '
+'
+            }
+          },
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'chapter',
+      'contents' => [
+        {
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'info' => {
+                'spaces_after_argument' => {
+                  'text' => '
+'
+                }
+              },
+              'type' => 'block_line_arg'
+            }
+          ],
+          'cmdname' => 'defblock',
+          'contents' => [
+            {
+              'contents' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'Some text'
+                    },
+                    {
+                      'args' => [
+                        {
+                          'contents' => [
+                            {
+                              'contents' => [
+                                {
+                                  'text' => 'In footnote'
+                                }
+                              ],
+                              'type' => 'paragraph'
+                            }
+                          ],
+                          'type' => 'brace_command_context'
+                        }
+                      ],
+                      'cmdname' => 'footnote',
+                      'extra' => {},
+                      'source_info' => {
+                        'line_nr' => 8
+                      }
+                    },
+                    {
+                      'text' => '.
+'
+                    }
+                  ],
+                  'type' => 'paragraph'
+                },
+                {
+                  'text' => '
+',
+                  'type' => 'empty_line'
+                },
+                {
+                  'args' => [
+                    {
+                      'info' => {
+                        'spaces_after_argument' => {
+                          'text' => '
+'
+                        }
+                      },
+                      'type' => 'block_line_arg'
+                    }
+                  ],
+                  'cmdname' => 'example',
+                  'contents' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => 'an example
+'
+                        }
+                      ],
+                      'type' => 'preformatted'
+                    },
+                    {
+                      'args' => [
+                        {
+                          'contents' => [
+                            {
+                              'text' => 'example'
+                            }
+                          ],
+                          'info' => {
+                            'spaces_after_argument' => {
+                              'text' => '
+'
+                            }
+                          },
+                          'type' => 'line_arg'
+                        }
+                      ],
+                      'cmdname' => 'end',
+                      'extra' => {
+                        'text_arg' => 'example'
+                      },
+                      'info' => {
+                        'spaces_before_argument' => {
+                          'text' => ' '
+                        }
+                      },
+                      'source_info' => {
+                        'line_nr' => 12
+                      }
+                    }
+                  ],
+                  'source_info' => {
+                    'line_nr' => 10
+                  }
+                },
+                {
+                  'text' => '
+',
+                  'type' => 'empty_line'
+                },
+                {
+                  'args' => [
+                    {
+                      'info' => {
+                        'spaces_after_argument' => {
+                          'text' => '
+'
+                        }
+                      },
+                      'type' => 'block_line_arg'
+                    }
+                  ],
+                  'cmdname' => 'menu',
+                  'contents' => [
+                    {
+                      'contents' => [
+                        {
+                          'text' => '* ',
+                          'type' => 'menu_entry_leading_text'
+                        },
+                        {
+                          'contents' => [
+                            {
+                              'text' => '('
+                            },
+                            {
+                              'text' => 'other_manual'
+                            },
+                            {
+                              'text' => ')'
+                            }
+                          ],
+                          'extra' => {
+                            'manual_content' => {
+                              'contents' => [
+                                {}
+                              ]
+                            }
+                          },
+                          'type' => 'menu_entry_node'
+                        },
+                        {
+                          'text' => '::',
+                          'type' => 'menu_entry_separator'
+                        },
+                        {
+                          'contents' => [
+                            {
+                              'contents' => [
+                                {
+                                  'text' => '
+'
+                                }
+                              ],
+                              'type' => 'preformatted'
+                            }
+                          ],
+                          'type' => 'menu_entry_description'
+                        }
+                      ],
+                      'source_info' => {
+                        'line_nr' => 15
+                      },
+                      'type' => 'menu_entry'
+                    },
+                    {
+                      'args' => [
+                        {
+                          'contents' => [
+                            {
+                              'text' => 'menu'
+                            }
+                          ],
+                          'info' => {
+                            'spaces_after_argument' => {
+                              'text' => '
+'
+                            }
+                          },
+                          'type' => 'line_arg'
+                        }
+                      ],
+                      'cmdname' => 'end',
+                      'extra' => {
+                        'text_arg' => 'menu'
+                      },
+                      'info' => {
+                        'spaces_before_argument' => {
+                          'text' => ' '
+                        }
+                      },
+                      'source_info' => {
+                        'line_nr' => 16
+                      }
+                    }
+                  ],
+                  'source_info' => {
+                    'line_nr' => 14
+                  }
+                },
+                {
+                  'text' => '
+',
+                  'type' => 'empty_line'
+                }
+              ],
+              'type' => 'def_item'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'extra' => {
+                        'def_role' => 'category'
+                      },
+                      'text' => 'a'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'spaces'
+                      },
+                      'text' => ' ',
+                      'type' => 'spaces'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'name'
+                      },
+                      'text' => 'b'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'spaces'
+                      },
+                      'text' => ' ',
+                      'type' => 'spaces'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'arg'
+                      },
+                      'text' => 'c'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'spaces'
+                      },
+                      'text' => ' ',
+                      'type' => 'spaces'
+                    },
+                    {
+                      'extra' => {
+                        'def_role' => 'arg'
+                      },
+                      'text' => 'd'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'defline',
+              'extra' => {
+                'def_command' => 'defline',
+                'def_index_element' => {},
+                'original_def_cmdname' => 'defline'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'line_nr' => 18
+              },
+              'type' => 'def_line'
+            },
+            {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'text' => 'defblock'
+                    }
+                  ],
+                  'info' => {
+                    'spaces_after_argument' => {
+                      'text' => '
+'
+                    }
+                  },
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'end',
+              'extra' => {
+                'text_arg' => 'defblock'
+              },
+              'info' => {
+                'spaces_before_argument' => {
+                  'text' => ' '
+                }
+              },
+              'source_info' => {
+                'line_nr' => 19
+              }
+            }
+          ],
+          'source_info' => {
+            'line_nr' => 7
+          }
+        }
+      ],
+      'extra' => {
+        'section_number' => '1'
+      },
+      'info' => {
+        'spaces_before_argument' => {
+          'text' => ' '
+        }
+      },
+      'source_info' => {
+        'line_nr' => 5
+      }
+    }
+  ],
+  'type' => 'document_root'
+};
+$result_trees{'text_block_before_defline'}{'contents'}[4]{'contents'}[1]{'contents'}[0]{'contents'}[4]{'contents'}[0]{'contents'}[1]{'extra'}{'manual_content'}{'contents'}[0]
 = 
$result_trees{'text_block_before_defline'}{'contents'}[4]{'contents'}[1]{'contents'}[0]{'contents'}[4]{'contents'}[0]{'contents'}[1]{'contents'}[1];
+$result_trees{'text_block_before_defline'}{'contents'}[4]{'contents'}[1]{'contents'}[1]{'extra'}{'def_index_element'}
 = 
$result_trees{'text_block_before_defline'}{'contents'}[4]{'contents'}[1]{'contents'}[1]{'args'}[0]{'contents'}[2];
+
+$result_texis{'text_block_before_defline'} = '@node Top
+@top top
+
+@node chapt
+@chapter Chap
+
+@defblock
+Some text@footnote{In footnote}.
+
+@example
+an example
+@end example
+
+@menu
+* (other_manual)::
+@end menu
+
+@defline a b c d
+@end defblock
+';
+
+
+$result_texts{'text_block_before_defline'} = 'top
+***
+
+1 Chap
+******
+
+Some text.
+
+an example
+
+* (other_manual)::
+
+a: b c d
+';
+
+$result_sectioning{'text_block_before_defline'} = {
+  'extra' => {
+    'section_childs' => [
+      {
+        'cmdname' => 'top',
+        'extra' => {
+          'associated_node' => {
+            'cmdname' => 'node',
+            'extra' => {
+              'normalized' => 'Top'
+            }
+          },
+          'section_childs' => [
+            {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'associated_node' => {
+                  'cmdname' => 'node',
+                  'extra' => {
+                    'normalized' => 'chapt'
+                  }
+                },
+                'section_directions' => {
+                  'up' => {}
+                },
+                'section_level' => 1,
+                'section_number' => '1',
+                'toplevel_directions' => {
+                  'prev' => {},
+                  'up' => {}
+                }
+              }
+            }
+          ],
+          'section_level' => 0,
+          'sectioning_root' => {},
+          'toplevel_directions' => {}
+        }
+      }
+    ],
+    'section_level' => -1
+  }
+};
+$result_sectioning{'text_block_before_defline'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_directions'}{'up'}
 = 
$result_sectioning{'text_block_before_defline'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'text_block_before_defline'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'prev'}
 = 
$result_sectioning{'text_block_before_defline'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'text_block_before_defline'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'up'}
 = 
$result_sectioning{'text_block_before_defline'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'text_block_before_defline'}{'extra'}{'section_childs'}[0]{'extra'}{'sectioning_root'}
 = $result_sectioning{'text_block_before_defline'};
+
+$result_nodes{'text_block_before_defline'} = [
+  {
+    'cmdname' => 'node',
+    'extra' => {
+      'associated_section' => {
+        'cmdname' => 'top',
+        'extra' => {}
+      },
+      'node_directions' => {
+        'next' => {
+          'cmdname' => 'node',
+          'extra' => {
+            'associated_section' => {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'section_number' => '1'
+              }
+            },
+            'node_directions' => {
+              'prev' => {},
+              'up' => {}
+            },
+            'normalized' => 'chapt'
+          }
+        }
+      },
+      'normalized' => 'Top'
+    }
+  },
+  {}
+];
+$result_nodes{'text_block_before_defline'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'prev'}
 = $result_nodes{'text_block_before_defline'}[0];
+$result_nodes{'text_block_before_defline'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'up'}
 = $result_nodes{'text_block_before_defline'}[0];
+$result_nodes{'text_block_before_defline'}[1] = 
$result_nodes{'text_block_before_defline'}[0]{'extra'}{'node_directions'}{'next'};
+
+$result_menus{'text_block_before_defline'} = [
+  {
+    'extra' => {
+      'normalized' => 'Top'
+    }
+  },
+  {
+    'extra' => {
+      'normalized' => 'chapt'
+    }
+  }
+];
+
+$result_errors{'text_block_before_defline'} = [
+  {
+    'error_line' => 'warning: @menu in invalid context
+',
+    'line_nr' => 14,
+    'text' => '@menu in invalid context',
+    'type' => 'warning'
+  }
+];
+
+
+$result_floats{'text_block_before_defline'} = {};
+
+
+
+$result_converted{'plaintext'}->{'text_block_before_defline'} = 'top
+***
+
+* Menu:
+
+* chapt::
+1 Chap
+******
+
+     Some text(1).
+
+          an example
+
+* Menu:
+
+     * (other_manual)::
+
+ -- a: b c d
+
+   ---------- Footnotes ----------
+
+   (1) In footnote
+
+';
+
+
+$result_converted{'html'}->{'text_block_before_defline'} = '<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>top</title>
+
+<meta name="description" content="top">
+<meta name="keywords" content="top">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="#Top" rel="start" title="Top">
+<style type="text/css">
+<!--
+a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
+div.example {margin-left: 3.2em}
+span:hover a.copiable-link {visibility: visible}
+strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
+td.menu-entry-description {vertical-align: top}
+td.menu-entry-destination {vertical-align: top}
+-->
+</style>
+
+
+</head>
+
+<body lang="en">
+<div class="top-level-extent" id="Top">
+<div class="nav-panel">
+<p>
+Next: <a href="#chapt" accesskey="n" rel="next">Chap</a> &nbsp; </p>
+</div>
+<h1 class="top" id="top"><span>top<a class="copiable-link" href="#top"> 
&para;</a></span></h1>
+
+<table class="menu" border="0" cellspacing="0">
+<tr><td class="menu-entry-destination">&bull; <a href="#chapt" 
accesskey="1">chapt</a>:</td><td>&nbsp;&nbsp;</td><td 
class="menu-entry-description">
+</td></tr>
+</table>
+<hr>
+<div class="chapter-level-extent" id="chapt">
+<div class="nav-panel">
+<p>
+Previous: <a href="#Top" accesskey="p" rel="prev">top</a>, Up: <a href="#Top" 
accesskey="u" rel="up">top</a> &nbsp; </p>
+</div>
+<h2 class="chapter" id="Chap"><span>1 Chap<a class="copiable-link" 
href="#Chap"> &para;</a></span></h2>
+
+<dl class="defblock">
+<dd><p>Some text<a class="footnote" id="DOCF1" href="#FOOT1"><sup>1</sup></a>.
+</p>
+<div class="example">
+<pre class="example-preformatted">an example
+</pre></div>
+
+<table class="menu" border="0" cellspacing="0">
+<tr><td class="menu-entry-destination">&bull; <a href="other_manual.html#Top" 
accesskey="1">(other_manual)</a>:</td><td>&nbsp;&nbsp;</td><td 
class="menu-entry-description">
+</td></tr>
+</table>
+
+</dd><dt class="defline"><span class="category-def">a: </span><strong 
class="def-name">b</strong> <var class="def-var-arguments">c d</var></dt>
+</dl>
+</div>
+</div>
+<div class="footnotes-segment">
+<hr>
+<h4 class="footnotes-heading">Footnotes</h4>
+
+<h5 class="footnote-body-heading"><a id="FOOT1" href="#DOCF1">(1)</a></h5>
+<p>In footnote</p>
+</div>
+
+
+
+</body>
+</html>
+';
+
+
+$result_converted{'latex'}->{'text_block_before_defline'} = 
'\\documentclass{book}
+\\usepackage{amsfonts}
+\\usepackage{amsmath}
+\\usepackage[gen]{eurosym}
+\\usepackage{textcomp}
+\\usepackage{graphicx}
+\\usepackage{etoolbox}
+\\usepackage{titleps}
+\\usepackage[utf8]{inputenc}
+\\usepackage[T1]{fontenc}
+\\usepackage{embrac}
+\\usepackage{expl3}
+\\usepackage{tabularx}
+\\usepackage{float}
+% use hidelinks to remove boxes around links to be similar to Texinfo TeX
+\\usepackage[hidelinks]{hyperref}
+
+\\makeatletter
+\\newcommand{\\Texinfosettitle}{No Title}%
+
+% redefine the \\mainmatter command such that it does not clear page
+% as if in double page
+\\renewcommand\\mainmatter{\\clearpage\\@mainmattertrue\\pagenumbering{arabic}}
+\\newenvironment{Texinfopreformatted}{%
+  
\\par\\GNUTobeylines\\obeyspaces\\frenchspacing\\parskip=\\z@\\parindent=\\z@}{}
+{\\catcode`\\^^M=13 \\gdef\\GNUTobeylines{\\catcode`\\^^M=13 
\\def^^M{\\null\\par}}}
+\\newenvironment{Texinfoindented}{\\begin{list}{}{}\\item\\relax}{\\end{list}}
+
+
+% used for substitutions in commands
+\\newcommand{\\Texinfoplaceholder}[1]{}
+
+\\newpagestyle{single}{\\sethead[\\chaptername{} \\thechapter{} 
\\chaptertitle{}][][\\thepage]
+                              {\\chaptername{} \\thechapter{} 
\\chaptertitle{}}{}{\\thepage}}
+
+% braces are upright in italic and slanted only in @def*
+% so it is turned off here, and turned on @def* lines
+\\EmbracOff{}%
+
+% allow line breaking at underscore
+\\let\\Texinfounderscore\\_
+\\renewcommand{\\_}{\\Texinfounderscore\\discretionary{}{}{}}
+\\renewcommand{\\includegraphics}[1]{\\fbox{FIG \\detokenize{#1}}}
+
+\\makeatother
+% set default for @setchapternewpage
+\\makeatletter
+\\patchcmd{\\chapter}{\\if@openright\\cleardoublepage\\else\\clearpage\\fi}{\\Texinfoplaceholder{setchapternewpage
 placeholder}\\clearpage}{}{}
+\\makeatother
+\\pagestyle{single}%
+
+\\label{anchor:Top}%
+\\chapter{{Chap}}
+\\label{anchor:chapt}%
+
+\\begin{quote}
+\\unskip{\\parskip=0pt\\noindent}%
+Some text\\footnote{In footnote}.
+
+\\begin{Texinfoindented}
+\\begin{Texinfopreformatted}%
+\\ttfamily an example
+\\end{Texinfopreformatted}
+\\end{Texinfoindented}
+
+
+\\end{quote}
+
+\\noindent\\begin{tabularx}{\\linewidth}{@{}Xr}
+\\rightskip=5em plus 1 fill \\hangindent=2em \\hyphenpenalty=10000
+\\texttt{b \\EmbracOn{}\\textnormal{\\textsl{c d}}\\EmbracOff{}}& [a]
+\\end{tabularx}
+
+\\end{document}
+';
+
+
+$result_converted{'docbook'}->{'text_block_before_defline'} = '<chapter 
label="1" id="chapt">
+<title>Chap</title>
+
+<blockquote><para>Some text<footnote><para>In footnote</para></footnote>.
+</para>
+<screen>an example
+</screen>
+
+</blockquote><synopsis><phrase role="category"><emphasis 
role="bold">a</emphasis>:</phrase> <varname>b</varname> <emphasis 
role="arg">c</emphasis> <emphasis role="arg">d</emphasis></synopsis>
+</chapter>
+';
+
+
+$result_converted{'xml'}->{'text_block_before_defline'} = '<node name="Top" 
spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">chapt</nodenext></node>
+<top spaces=" "><sectiontitle>top</sectiontitle>
+
+</top>
+<node name="chapt" spaces=" "><nodename>chapt</nodename><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Chap</sectiontitle>
+
+<defblock endspaces=" ">
+<definitionitem><para>Some text<footnote><para>In footnote</para></footnote>.
+</para>
+<example endspaces=" ">
+<pre xml:space="preserve">an example
+</pre></example>
+
+<menu endspaces=" ">
+<menuentry><menuleadingtext>* 
</menuleadingtext><menunode>(other_manual)</menunode><menuseparator>::</menuseparator><menudescription><pre
 xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+</definitionitem><defline spaces=" 
"><definitionterm><defcategory>a</defcategory> <defsymbol>b</defsymbol> 
<defparam>c</defparam> <defparam>d</defparam></definitionterm></defline>
+</defblock>
+</chapter>
+';
+
+1;



reply via email to

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