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{'ref_in_center'} = {
'contents' => [
{
'contents' => [
{
'contents' => [],
'type' => 'preamble_before_content'
}
],
'type' => 'before_node_section'
},
{
'args' => [
{
'contents' => [
{
'text' => 'Top'
}
],
'info' => {
'spaces_after_argument' => {
'text' => '
'
}
},
'type' => 'line_arg'
}
],
'cmdname' => 'node',
'extra' => {
'normalized' => 'Top'
},
'info' => {
'spaces_before_argument' => {
'text' => ' '
}
},
'source_info' => {
'file_name' => '',
'line_nr' => 1,
'macro' => ''
}
},
{
'args' => [
{
'contents' => [
{
'text' => 'top'
}
],
'info' => {
'spaces_after_argument' => {
'text' => '
'
}
},
'type' => 'line_arg'
}
],
'cmdname' => 'top',
'contents' => [
{
'text' => '
',
'type' => 'empty_line'
}
],
'extra' => {},
'info' => {
'spaces_before_argument' => {
'text' => ' '
}
},
'source_info' => {
'file_name' => '',
'line_nr' => 2,
'macro' => ''
}
},
{
'args' => [
{
'contents' => [
{
'text' => 'chap'
}
],
'info' => {
'spaces_after_argument' => {
'text' => '
'
}
},
'type' => 'line_arg'
}
],
'cmdname' => 'node',
'extra' => {
'normalized' => 'chap'
},
'info' => {
'spaces_before_argument' => {
'text' => ' '
}
},
'source_info' => {
'file_name' => '',
'line_nr' => 4,
'macro' => ''
}
},
{
'args' => [
{
'contents' => [
{
'text' => 'Chapter'
}
],
'info' => {
'spaces_after_argument' => {
'text' => '
'
}
},
'type' => 'line_arg'
}
],
'cmdname' => 'chapter',
'contents' => [
{
'text' => '
',
'type' => 'empty_line'
},
{
'args' => [
{
'contents' => [
{
'args' => [
{
'contents' => [
{
'text' => 'Top'
}
],
'extra' => {
'node_content' => [
{}
],
'normalized' => 'Top'
},
'type' => 'brace_command_arg'
}
],
'cmdname' => 'ref',
'source_info' => {
'file_name' => '',
'line_nr' => 7,
'macro' => ''
}
}
],
'info' => {
'spaces_after_argument' => {
'text' => '
'
}
},
'type' => 'line_arg'
}
],
'cmdname' => 'center',
'info' => {
'spaces_before_argument' => {
'text' => ' '
}
},
'source_info' => {
'file_name' => '',
'line_nr' => 7,
'macro' => ''
}
},
{
'text' => '
',
'type' => 'empty_line'
},
{
'args' => [
{
'contents' => [
{
'args' => [
{
'contents' => [
{
'text' => 'Top'
}
],
'type' => 'brace_command_arg'
},
{
'info' => {
'spaces_before_argument' => {
'text' => ' '
}
},
'type' => 'brace_command_arg'
},
{
'contents' => [
{
'text' => 'title
'
}
],
'type' => 'brace_command_arg'
}
],
'cmdname' => 'ref',
'source_info' => {
'file_name' => '',
'line_nr' => 9,
'macro' => ''
}
}
],
'type' => 'line_arg'
}
],
'cmdname' => 'center',
'info' => {
'spaces_before_argument' => {
'text' => ' '
}
},
'source_info' => {
'file_name' => '',
'line_nr' => 9,
'macro' => ''
}
},
{
'contents' => [
{
'text' => 'very long
'
}
],
'type' => 'paragraph'
}
],
'extra' => {},
'info' => {
'spaces_before_argument' => {
'text' => ' '
}
},
'source_info' => {
'file_name' => '',
'line_nr' => 5,
'macro' => ''
}
}
],
'type' => 'document_root'
};
$result_trees{'ref_in_center'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0]{'args'}[0]{'extra'}{'node_content'}[0] = $result_trees{'ref_in_center'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0];
$result_texis{'ref_in_center'} = '@node Top
@top top
@node chap
@chapter Chapter
@center @ref{Top}
@center @ref{Top, ,title
}very long
';
$result_texts{'ref_in_center'} = 'top
***
1 Chapter
*********
Top
Top
very long
';
$result_sectioning{'ref_in_center'} = {
'structure' => {
'section_childs' => [
{
'cmdname' => 'top',
'extra' => {
'associated_node' => {
'cmdname' => 'node',
'extra' => {
'normalized' => 'Top'
},
'structure' => {}
}
},
'structure' => {
'section_childs' => [
{
'cmdname' => 'chapter',
'extra' => {
'associated_node' => {
'cmdname' => 'node',
'extra' => {
'normalized' => 'chap'
},
'structure' => {}
}
},
'structure' => {
'section_level' => 1,
'section_number' => 1,
'section_up' => {},
'toplevel_prev' => {},
'toplevel_up' => {}
}
}
],
'section_level' => 0,
'section_up' => {}
}
}
],
'section_level' => -1
}
};
$result_sectioning{'ref_in_center'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'section_up'} = $result_sectioning{'ref_in_center'}{'structure'}{'section_childs'}[0];
$result_sectioning{'ref_in_center'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_prev'} = $result_sectioning{'ref_in_center'}{'structure'}{'section_childs'}[0];
$result_sectioning{'ref_in_center'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_up'} = $result_sectioning{'ref_in_center'}{'structure'}{'section_childs'}[0];
$result_sectioning{'ref_in_center'}{'structure'}{'section_childs'}[0]{'structure'}{'section_up'} = $result_sectioning{'ref_in_center'};
$result_nodes{'ref_in_center'} = {
'cmdname' => 'node',
'extra' => {
'associated_section' => {
'cmdname' => 'top',
'extra' => {},
'structure' => {}
},
'normalized' => 'Top'
},
'structure' => {
'node_next' => {
'cmdname' => 'node',
'extra' => {
'associated_section' => {
'cmdname' => 'chapter',
'extra' => {},
'structure' => {
'section_number' => 1
}
},
'normalized' => 'chap'
},
'structure' => {
'node_prev' => {},
'node_up' => {}
}
}
}
};
$result_nodes{'ref_in_center'}{'structure'}{'node_next'}{'structure'}{'node_prev'} = $result_nodes{'ref_in_center'};
$result_nodes{'ref_in_center'}{'structure'}{'node_next'}{'structure'}{'node_up'} = $result_nodes{'ref_in_center'};
$result_menus{'ref_in_center'} = {
'cmdname' => 'node',
'extra' => {
'normalized' => 'Top'
},
'structure' => {}
};
$result_errors{'ref_in_center'} = [
{
'error_line' => '@ref missing closing brace
',
'file_name' => '',
'line_nr' => 9,
'macro' => '',
'text' => '@ref missing closing brace',
'type' => 'error'
},
{
'error_line' => 'misplaced }
',
'file_name' => '',
'line_nr' => 10,
'macro' => '',
'text' => 'misplaced }',
'type' => 'error'
}
];
$result_floats{'ref_in_center'} = {};
$result_converted{'plaintext'}->{'ref_in_center'} = 'top
***
1 Chapter
*********
*note Top::
*note title
: Top.
very long
';
$result_converted{'html_text'}->{'ref_in_center'} = '<div class="top-level-extent" id="Top">
<div class="nav-panel">
</div>
<h1 class="top" id="top"><span>top<a class="copiable-link" href="#top"> ¶</a></span></h1>
<ul class="mini-toc">
<li><a href="#chap" accesskey="1">Chapter</a></li>
</ul>
<hr>
<div class="chapter-level-extent" id="chap">
<div class="nav-panel">
</div>
<h2 class="chapter" id="Chapter"><span>1 Chapter<a class="copiable-link" href="#Chapter"> ¶</a></span></h2>
<div class="center"><a class="ref" href="#Top">top</a>
</div>
<div class="center">‘title
’
</div><p>very long
</p></div>
</div>
';
$result_converted{'latex'}->{'ref_in_center'} = '\\documentclass{book}
\\usepackage{amsfonts}
\\usepackage{amsmath}
\\usepackage[gen]{eurosym}
\\usepackage{textcomp}
\\usepackage{graphicx}
\\usepackage{etoolbox}
\\usepackage{titleps}
\\usepackage[utf8]{inputenc}
\\usepackage[T1]{fontenc}
\\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}}
% 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{document}
\\label{anchor:Top}%
\\chapter{{Chapter}}
\\label{anchor:chap}%
\\begin{center}
\\hyperref[anchor:Top]{\\chaptername~\\ref*{anchor:Top} [Top], page~\\pageref*{anchor:Top}}
\\end{center}
\\begin{center}
title
\\end{center}
very long
\\end{document}
';
$result_converted{'docbook'}->{'ref_in_center'} = '<chapter label="1" id="chap">
<title>Chapter</title>
<simpara role="center"><link linkend="Top">Top</link></simpara>
<simpara role="center"><link>title
</link></simpara>
<para>very long
</para></chapter>
';
1;