[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sun, 29 Sep 2024 08:47:15 -0400 (EDT) |
branch: master
commit 6c87359ac1ae3d41771bb6669061f317232d8458
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Jun 26 13:06:23 2024 +0200
* doc/tp_api/texi2any_internals.texi, doc/tp_api/api_includes/*.texi:
add to version control to have reference versions, but also to have
something for users who cannot regenerate the files but have access to
version control files.
---
.gitignore | 2 -
ChangeLog | 7 +
doc/tp_api/api_includes/Texinfo-Commands.texi | 406 +++++++
doc/tp_api/api_includes/Texinfo-Common.texi | 426 +++++++
.../api_includes/Texinfo-Convert-Converter.texi | 791 +++++++++++++
.../api_includes/Texinfo-Convert-DocBook.texi | 87 ++
doc/tp_api/api_includes/Texinfo-Convert-HTML.texi | 96 ++
doc/tp_api/api_includes/Texinfo-Convert-Info.texi | 87 ++
.../Texinfo-Convert-NodeNameNormalization.texi | 115 ++
.../api_includes/Texinfo-Convert-Plaintext.texi | 87 ++
.../api_includes/Texinfo-Convert-Texinfo.texi | 60 +
.../Texinfo-Convert-TexinfoMarkup.texi | 153 +++
.../api_includes/Texinfo-Convert-TexinfoXML.texi | 87 ++
doc/tp_api/api_includes/Texinfo-Convert-Text.texi | 183 +++
.../api_includes/Texinfo-Convert-Unicode.texi | 151 +++
doc/tp_api/api_includes/Texinfo-Convert-Utils.texi | 175 +++
doc/tp_api/api_includes/Texinfo-Document.texi | 574 +++++++++
doc/tp_api/api_includes/Texinfo-Indices.texi | 196 +++
.../api_includes/Texinfo-ManipulateTree.texi | 105 ++
doc/tp_api/api_includes/Texinfo-OutputUnits.texi | 305 +++++
doc/tp_api/api_includes/Texinfo-Parser.texi | 1246 ++++++++++++++++++++
doc/tp_api/api_includes/Texinfo-Report.texi | 179 +++
doc/tp_api/api_includes/Texinfo-Structuring.texi | 265 +++++
.../api_includes/Texinfo-Transformations.texi | 158 +++
doc/tp_api/api_includes/Texinfo-Translations.texi | 170 +++
doc/tp_api/texi2any_internals.texi | 384 ++++++
26 files changed, 6493 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 9bd1dfec36..4ec6a53741 100644
--- a/.gitignore
+++ b/.gitignore
@@ -182,9 +182,7 @@ doc/refcard/*.ps
doc/tp_api/*.t2p
doc/tp_api/*.info
-doc/tp_api/api_includes
doc/tp_api/texi2any_internals.pdf
-doc/tp_api/texi2any_internals.texi
man/info.1
man/install-info.1
diff --git a/ChangeLog b/ChangeLog
index 8634f3393a..204829c588 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-06-26 Patrice Dumas <pertusus@free.fr>
+
+ * doc/tp_api/texi2any_internals.texi, doc/tp_api/api_includes/*.texi:
+ add to version control to have reference versions, but also to have
+ something for users who cannot regenerate the files but have access to
+ version control files.
+
2024-06-26 Patrice Dumas <pertusus@free.fr>
* configure.ac: fix --enable-pod-simple-texinfo-tests help string.
diff --git a/doc/tp_api/api_includes/Texinfo-Commands.texi
b/doc/tp_api/api_includes/Texinfo-Commands.texi
new file mode 100644
index 0000000000..7f7f87d999
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Commands.texi
@@ -0,0 +1,406 @@
+@node Texinfo@asis{::}Commands
+@chapter Texinfo::Commands
+
+@node Texinfo@asis{::}Commands NAME
+@section Texinfo::Commands NAME
+
+Texinfo::Commands - Classification of commands
+
+@node Texinfo@asis{::}Commands SYNOPSIS
+@section Texinfo::Commands SYNOPSIS
+
+@verbatim
+ use Texinfo::Commands;
+ if ($Texinfo::Commands::accent_commands{$a_command}) {
+ print STDERR "$a_command is an accent command\n";
+ }
+@end verbatim
+
+@node Texinfo@asis{::}Commands NOTES
+@section Texinfo::Commands NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Commands DESCRIPTION
+@section Texinfo::Commands DESCRIPTION
+
+Texinfo::Commands holds a few hashes with information on @@-commands
+and hashes classifying Texinfo @@-commands.
+
+@node Texinfo@asis{::}Commands @@-COMMAND INFORMATION
+@section @@-COMMAND INFORMATION
+
+Hashes are defined as @code{our} variables, and are therefore available
+outside of the module.
+
+@table @asis
+@item %index_names
+@anchor{Texinfo@asis{::}Commands %index_names}
+@cindex @code{%index_names}
+
+Hash describing the default Texinfo indices. The format of this hash is
+described in @ref{Texinfo@asis{::}Document $indices_information =
$document->indices_information(),,
@code{Texinfo::Document::indices_information}}.
+
+@end table
+
+@node Texinfo@asis{::}Commands @@-COMMAND CLASSES
+@section @@-COMMAND CLASSES
+
+Hashes are defined as @code{our} variables, and are therefore available
+outside of the module.
+
+The key of the hashes are @@-command names without the @@. The
+following hashes are available:
+
+@table @asis
+@item %accent_commands
+@anchor{Texinfo@asis{::}Commands %accent_commands}
+@cindex @code{%accent_commands}
+
+Accent @@-commands taking an argument, like @code{@@'} or @code{@@ringaccent},
+including @code{@@dotless} and @code{@@tieaccent}.
+
+@item %block_commands
+@anchor{Texinfo@asis{::}Commands %block_commands}
+@cindex @code{%block_commands}
+
+Commands delimiting a block with a closing @code{@@end}. The values are:
+
+@table @asis
+@item @emph{conditional}
+@anchor{Texinfo@asis{::}Commands @emph{conditional}}
+
+@code{@@if*} commands;
+
+@item @emph{def}
+@anchor{Texinfo@asis{::}Commands @emph{def}}
+
+Definition commands like @code{@@deffn};
+
+@item @emph{float}
+@anchor{Texinfo@asis{::}Commands @emph{float}}
+
+@code{@@float};
+
+@item @emph{format_raw}
+@anchor{Texinfo@asis{::}Commands @emph{format_raw}}
+
+raw output format commands such as @code{@@html} or @code{@@info};
+
+@item @emph{item_container}
+@anchor{Texinfo@asis{::}Commands @emph{item_container}}
+
+commands with @code{@@item} containing
+any content, @code{@@itemize} and @code{@@enumerate};
+
+@item @emph{item_line}
+@anchor{Texinfo@asis{::}Commands @emph{item_line}}
+
+commands like @code{@@table} in which the @code{@@item} argument is on its
line;
+
+@item @emph{menu}
+@anchor{Texinfo@asis{::}Commands @emph{menu}}
+
+menu @@-commands, @code{@@menu}, @code{@@detailmenu}
+and @code{@@direntry};
+
+@item @emph{math}
+@anchor{Texinfo@asis{::}Commands @emph{math}}
+
+Math block commands, like @code{@@displaymath}.
+
+@item @emph{multitable}
+@anchor{Texinfo@asis{::}Commands @emph{multitable}}
+
+@code{@@multitable};
+
+@item @emph{other}
+@anchor{Texinfo@asis{::}Commands @emph{other}}
+
+The remaining block commands.
+
+@item @emph{preformatted}
+@anchor{Texinfo@asis{::}Commands @emph{preformatted}}
+
+Commands whose content should not be filled, like @code{@@example} or
@code{@@display}.
+
+@item @emph{quotation}
+@anchor{Texinfo@asis{::}Commands @emph{quotation}}
+
+Commands like @code{@@quotation}.
+
+@item @emph{raw}
+@anchor{Texinfo@asis{::}Commands @emph{raw}}
+
+@@-commands that have no expansion
+of @@-commands in their bodies (@code{@@macro}, @code{@@verbatim} and
@code{@@ignore});
+
+@item @emph{region}
+@anchor{Texinfo@asis{::}Commands @emph{region}}
+
+Commands delimiting a region of the document out of the main processing:
+@code{@@titlepage}, @code{@@copying}, @code{@@documentdescription}.
+
+@end table
+
+@item %blockitem_commands
+@anchor{Texinfo@asis{::}Commands %blockitem_commands}
+@cindex @code{%blockitem_commands}
+
+Block commands containing @code{@@item} with possible content before an
@code{@@item},
+like @code{@@itemize}, @code{@@table} or @code{@@multitable}.
+
+@item %brace_code_commands
+@anchor{Texinfo@asis{::}Commands %brace_code_commands}
+@cindex @code{%brace_code_commands}
+
+Brace commands that have their argument in code style, like
+@code{@@code}.
+
+@item %brace_commands
+@anchor{Texinfo@asis{::}Commands %brace_commands}
+@cindex @code{%brace_commands}
+
+The commands that take braces. Value is @emph{noarg} for brace commands without
+argument such as @code{@@AA}, @code{@@TeX}, or @code{@@equiv}. Other values
include
+@emph{accent}, @emph{arguments}, @emph{context} and other values.
+
+@item %close_paragraph_commands
+@anchor{Texinfo@asis{::}Commands %close_paragraph_commands}
+@cindex @code{%close_paragraph_commands}
+
+Commands that stop a paragraph. Root commands are not specified here,
+but they also close paragraphs.
+
+@item %commands_args_number
+@anchor{Texinfo@asis{::}Commands %commands_args_number}
+@cindex @code{%commands_args_number}
+
+Set to the number of arguments separated by commas that may appear in braces or
+on the @@-command line. That means 0 or unset for most block commands,
+including @code{@@example} which has an unlimited (variadic) number of
arguments, 1
+for @code{@@quotation}, 2 for @code{@@float}, 1 for most brace commands, 2 for
@code{@@email}
+and @code{@@abbr}, 5 for @code{@@image} and @code{@@ref}.
+
+Values are not necessarily set for all the commands, as commands are
+also classified by type of command, some type of commands implying a
+number of arguments, and the number of arguments may not be set if it
+corresponds to the default (0 for block commands, 1 for other commands
+that take arguments).
+
+@item %contain_basic_inline_commands
+@anchor{Texinfo@asis{::}Commands %contain_basic_inline_commands}
+@cindex @code{%contain_basic_inline_commands}
+
+Commands containing simple text only, much like paragraph text, but
+without @code{@@ref}, @code{@@footnote}, @code{@@titlefont}, @code{@@anchor}
nor @code{@@verb}.
+
+@item %contain_plain_text_commands
+@anchor{Texinfo@asis{::}Commands %contain_plain_text_commands}
+@cindex @code{%contain_plain_text}
+
+Commands accepting only plain text with accent, symbol and glyph
+commands.
+
+@item %def_commands
+@anchor{Texinfo@asis{::}Commands %def_commands}
+@cindex @code{%def_commands}
+
+Definition commands.
+
+@item %default_index_commands
+@anchor{Texinfo@asis{::}Commands %default_index_commands}
+@cindex @code{%default_index_commands}
+
+Index entry commands corresponding to default indices. For example
+@code{@@cindex}.
+
+@item %explained_commands
+@anchor{Texinfo@asis{::}Commands %explained_commands}
+@cindex @code{%explained_commands}
+
+@@-commands whose second argument explain first argument and further
+@@-command call without first argument, as @code{@@abbr} and @code{@@acronym}.
+
+@item %formattable_line_commands
+@anchor{Texinfo@asis{::}Commands %formattable_line_commands}
+@cindex @code{%formattable_line_commands}
+
+Line commands which may be formatted as text, but that require constructing
+some replacement text, for example @code{@@printindex}, @code{@@need} or
+@code{@@verbatiminclude}. @code{@@contents} and @code{@@shortcontents} are
not in this hash,
+since they are in a corresponding situation only when the tables of contents
+are formatted where the commands are.
+
+@item %formatted_nobrace_commands
+@anchor{Texinfo@asis{::}Commands %formatted_nobrace_commands}
+@cindex @code{%formatted_nobrace_commands}
+
+Commands not taking brace formatted as text or with text in the main
+document body, corresponding to symbol commands such as @code{@@@@} or
@code{@@:} and
+commands such as @code{@@item}. @@-commands appearing only in headers are not
+in this hash, but in in @code{%in_heading_spec_commands}.
+
+@item %formatted_line_commands
+@anchor{Texinfo@asis{::}Commands %formatted_line_commands}
+@cindex @code{%formatted_line_commands}
+
+Line commands which arguments may be formatted as text, such as
+@code{@@center}, @code{@@author}, @code{@@item}, @code{@@node},
@code{@@chapter} and other.
+Index commands may be formatted as text too, but they may be added
+with @code{@@def*index}, therefore they are not in that hash. Also,
+in general, they are not formatted as text where they appear, only
+when an index is printed.
+
+@item %heading_spec_commands
+@anchor{Texinfo@asis{::}Commands %heading_spec_commands}
+@cindex @code{%heading_spec_commands}
+
+@@-commands used to specify custom headings, like @code{@@everyheading}.
+
+@item %in_heading_spec_commands
+@anchor{Texinfo@asis{::}Commands %in_heading_spec_commands}
+@cindex @code{%in_heading_spec_commands}
+
+Special @@-commands appearing in custom headings, such as @code{@@thischapter},
+@code{@@thistitle} or @code{@@|}.
+
+@item %in_index_commands
+@anchor{Texinfo@asis{::}Commands %in_index_commands}
+
+@@-commands only valid in index entries, such as @code{@@sortas} or
@code{@@subentry}.
+
+@item %inline_conditional_commands
+@anchor{Texinfo@asis{::}Commands %inline_conditional_commands}
+
+@item %inline_format_commands
+@anchor{Texinfo@asis{::}Commands %inline_format_commands}
+@cindex @code{%inline_conditional_commands}
+@cindex @code{%inline_format_commands}
+
+Inline conditional commands, like @code{@@inlineifclear}, and inline format
+commands like @code{@@inlineraw} and @code{@@inlinefmt}.
+
+@item %letter_no_arg_commands
+@anchor{Texinfo@asis{::}Commands %letter_no_arg_commands}
+@cindex @code{%letter_no_arg_commands}
+
+@@-commands with braces but no argument corresponding to letters,
+like @code{@@AA@{@}} or @code{@@ss@{@}} or @code{@@o@{@}}.
+
+@item %math_commands
+@anchor{Texinfo@asis{::}Commands %math_commands}
+@cindex @code{%math_commands}
+
+@@-commands which contains math, like @code{@@math} or @code{@@displaymath}.
+
+@item %line_commands
+@anchor{Texinfo@asis{::}Commands %line_commands}
+@cindex @code{%line_commands}
+
+Commands that do not take braces, take arguments on the command line and are
+not block commands either, like @code{@@node}, @code{@@chapter},
@code{@@cindex}, @code{@@deffnx},
+@code{@@end}, @code{@@footnotestyle}, @code{@@set}, @code{@@settitle},
@code{@@itemx},
+@code{@@definfoenclose}, @code{@@comment} and many others.
+
+Note that @code{@@item} is in @code{%line_commands} for its role in
@code{@@table} and
+similar @@-commands.
+
+@item %no_paragraph_commands
+@anchor{Texinfo@asis{::}Commands %no_paragraph_commands}
+@cindex @code{%no_paragraph_commands}
+
+Commands that do not start a paragraph.
+
+@item %nobrace_commands
+@anchor{Texinfo@asis{::}Commands %nobrace_commands}
+@cindex @code{%nobrace_commands}
+
+Command that do not take braces, do not have argument on their line and
+are not block commands either. The value is @emph{symbol} for single character
+non-alphabetical @@-commands such as @code{@@@@}, @code{@@ } or @code{@@:}.
Other commands in that hash
+include @code{@@indent}, @code{@@tab} or @code{@@thissection}.
+
+Note that @code{@@item} is in @code{%nobrace_commands} for its role in
@code{@@multitable},
+@code{@@itemize} and @code{@@enumerate}.
+
+@item %non_formatted_block_commands
+@anchor{Texinfo@asis{::}Commands %non_formatted_block_commands}
+@cindex @code{%non_formatted_block_commands}
+
+Block commands not formatted as text, such as @code{@@ignore} or
@code{@@macro}.
+
+@item %non_formatted_brace_commands
+@anchor{Texinfo@asis{::}Commands %non_formatted_brace_commands}
+
+Brace commands that are not immediately replaced with text, such as
+@code{anchor}, @code{caption}, @code{errormsg} and others.
+
+@item %preamble_commands
+@anchor{Texinfo@asis{::}Commands %preamble_commands}
+@cindex @code{%preamble_commands}
+
+@@-commands that do not stop the preamble.
+
+@item %preformatted_commands
+@anchor{Texinfo@asis{::}Commands %preformatted_commands}
+
+@item %preformatted_code_commands
+@anchor{Texinfo@asis{::}Commands %preformatted_code_commands}
+@cindex @code{%preformatted_commands}
+@cindex @code{%preformatted_code_commands}
+
+@emph{%preformatted_commands} is for commands whose content should not
+be filled, like @code{@@example} or @code{@@display}. If the command is meant
+for code, it is also in @emph{%preformatted_code_commands}, like
@code{@@example}.
+
+@item %ref_commands
+@anchor{Texinfo@asis{::}Commands %ref_commands}
+@cindex @code{%ref_commands}
+
+Cross reference @@-command referencing nodes, like @code{@@xref} or
@code{@@link}.
+
+@item %root_commands
+@anchor{Texinfo@asis{::}Commands %root_commands}
+@cindex @code{%root_commands}
+
+Commands that are at the root of a Texinfo document, namely
+@code{@@node} and sectioning commands, except heading commands
+like @code{@@heading}.
+
+@item %sectioning_heading_commands
+@anchor{Texinfo@asis{::}Commands %sectioning_heading_commands}
+@cindex @code{%sectioning_heading_commands}
+
+All the sectioning and heading commands.
+
+@item %variadic_commands
+@anchor{Texinfo@asis{::}Commands %variadic_commands}
+@cindex @code{%variadic_commands}
+
+Commands with unlimited arguments, like @code{@@example}.
+
+@end table
+
+@node Texinfo@asis{::}Commands SEE ALSO
+@section Texinfo::Commands SEE ALSO
+
+@ref{Texinfo@asis{::}Parser NAME,, Texinfo::Parser}.
+
+@node Texinfo@asis{::}Commands AUTHOR
+@section Texinfo::Commands AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Commands COPYRIGHT AND LICENSE
+@section Texinfo::Commands COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Common.texi
b/doc/tp_api/api_includes/Texinfo-Common.texi
new file mode 100644
index 0000000000..d38a2b2088
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Common.texi
@@ -0,0 +1,426 @@
+@node Texinfo@asis{::}Common
+@chapter Texinfo::Common
+
+@node Texinfo@asis{::}Common NAME
+@section Texinfo::Common NAME
+
+Texinfo::Common - Texinfo modules common data and miscellaneous methods
+
+@node Texinfo@asis{::}Common SYNOPSIS
+@section Texinfo::Common SYNOPSIS
+
+@verbatim
+ use Texinfo::Common;
+
+
+ my @commands_to_collect = ('math');
+ my $collected_commands
+ = Texinfo::Common::collect_commands_in_tree($document_root,
+ \@commands_to_collect);
+
+ my $package_version
+ = Texinfo::Common::get_build_constant('PACKAGE_AND_VERSION');
+@end verbatim
+
+@node Texinfo@asis{::}Common NOTES
+@section Texinfo::Common NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Common DESCRIPTION
+@section Texinfo::Common DESCRIPTION
+
+Texinfo::Common holds hashes with miscellaneous information and some
+hashes with information on Texinfo @@-commands, as well as miscellaneous
+methods.
+
+@node Texinfo@asis{::}Common MISC INFORMATION
+@section MISC INFORMATION
+
+Hashes are defined as @code{our} variables, and are therefore available
+outside of the module.
+
+Values defined for a Texinfo build independently of any document or
+output format are available by calling @code{get_build_constant}:
+
+@table @asis
+@item $value = get_build_constant($name)
+@anchor{Texinfo@asis{::}Common $value = get_build_constant($name)}
+
+The following build constants are available:
+
+@table @asis
+@item PACKAGE
+@anchor{Texinfo@asis{::}Common PACKAGE}
+
+@item PACKAGE_CONFIG
+@anchor{Texinfo@asis{::}Common PACKAGE_CONFIG}
+
+@item PACKAGE_AND_VERSION
+@anchor{Texinfo@asis{::}Common PACKAGE_AND_VERSION}
+
+@item PACKAGE_AND_VERSION_CONFIG
+@anchor{Texinfo@asis{::}Common PACKAGE_AND_VERSION_CONFIG}
+
+@item PACKAGE_NAME
+@anchor{Texinfo@asis{::}Common PACKAGE_NAME}
+
+@item PACKAGE_NAME_CONFIG
+@anchor{Texinfo@asis{::}Common PACKAGE_NAME_CONFIG}
+
+@item PACKAGE_VERSION
+@anchor{Texinfo@asis{::}Common PACKAGE_VERSION}
+
+@item PACKAGE_VERSION_CONFIG
+@anchor{Texinfo@asis{::}Common PACKAGE_VERSION_CONFIG}
+
+@item PACKAGE_URL
+@anchor{Texinfo@asis{::}Common PACKAGE_URL}
+
+@item PACKAGE_URL_CONFIG
+@anchor{Texinfo@asis{::}Common PACKAGE_URL_CONFIG}
+
+Texinfo package name and versions. Values of build constants without
+@code{_CONFIG} appended are set by configure. For each variable set by
+configure there is another one with @code{_CONFIG} appended
+to the name set to the same value, to match the name of the macros set in
+C. So, for example @code{PACKAGE_VERSION_CONFIG} value is the same as
+@code{PACKAGE_VERSION}, set to the @code{PACKAGE_VERSION} value set by
configure.
+
+@end table
+
+@end table
+
+@table @asis
+@item %texinfo_output_formats
+@anchor{Texinfo@asis{::}Common %texinfo_output_formats}
+@cindex @code{%texinfo_output_formats}
+
+Cannonical output formats that have associated conditionals. In
+practice corresponds to @code{format_raw} @code{%block_commands} plus
@code{info}
+and @code{plaintext}.
+
+@end table
+
+TODO: undocumented
+%null_device_file %default_parser_customization_values
%parser_settable_configuration %multiple_at_command_options
%unique_at_command_options %converter_cmdline_options
%default_main_program_customization_options %converter_customization_options
%document_settable_at_commands %def_map %command_structuring_level
%level_to_structuring_command %encoding_name_conversion_map
%text_brace_no_arg_commands
+
+@node Texinfo@asis{::}Common @@-COMMAND INFORMATION
+@section @@-COMMAND INFORMATION
+
+Hashes are defined as @code{our} variables, and are therefore available
+outside of the module.
+
+The key of the hashes are @@-command names without the @@. The
+following hashes are available:
+
+@table @asis
+@item %all_commands
+@anchor{Texinfo@asis{::}Common %all_commands}
+@cindex @code{%all_commands}
+
+All the @@-commands.
+
+@item %def_aliases
+@anchor{Texinfo@asis{::}Common %def_aliases}
+
+@item %def_no_var_arg_commands
+@anchor{Texinfo@asis{::}Common %def_no_var_arg_commands}
+@cindex @code{%def_aliases}
+@cindex @code{%def_no_var_arg_commands}
+
+@code{%def_aliases} associates an aliased command to the original command, for
+example @code{defun} is associated to @code{deffn}.
+
+@code{%def_no_var_arg_commands} associates a definition command name with
+a true value if the @emph{argument} on the definition command line can contain
+non-metasyntactic variables. For instance, it is true for @code{deftypevr}
+but false for @code{defun}, since @code{@@defun} @emph{argument} is supposed
to contain
+metasyntactic variables only.
+
+@item %nobrace_symbol_text
+@anchor{Texinfo@asis{::}Common %nobrace_symbol_text}
+@cindex @code{%nobrace_symbol_text}
+
+Values are ASCII representation of single character non-alphabetical commands
+without brace such as @code{*} or @code{:}. The value may be an empty string.
+
+@item %small_block_associated_command
+@anchor{Texinfo@asis{::}Common %small_block_associated_command}
+@cindex @code{%small_block_associated_command}
+
+Associate small command like @code{smallexample} to the regular command
+@code{example}.
+
+@end table
+
+@node Texinfo@asis{::}Common METHODS
+@section Texinfo::Common METHODS
+
+Two methods are exported in the default case for Texinfo modules messages
+translation in the Uniforum gettext framework, @code{__} and @code{__p}.
+
+The Texinfo tree and Texinfo tree elements used in argument of some functions
+are documented in @ref{Texinfo@asis{::}Parser TEXINFO TREE}. When
customization
+information is needed, an object that defines @code{set_conf} and/or
@code{get_conf} is
+expected, for example a converter inheriting from
+@code{Texinfo::Convert::Converter}, see
@ref{Texinfo@asis{::}Convert@asis{::}Converter Getting and
+setting customization variables}.
+
+@table @asis
+@item $translated_string = __($msgid)
+@anchor{Texinfo@asis{::}Common $translated_string = __($msgid)}
+
+@item $translated_string = __p($msgctxt, $msgid)
+@anchor{Texinfo@asis{::}Common $translated_string = __p($msgctxt@comma{}
$msgid)}
+
+Returns the @emph{$msgid} string translated in the Texinfo messages text
domain.
+@code{__p} can be used instead of @code{__} to pass a @emph{$msgctxt} context
string to
+provide translators with information on the string context when the string is
+short or if the translation could depend on the context. @code{__} corresponds
to
+the @code{gettext} function and @code{__p} to the @code{pgettext} function.
+
+It is not advised to use those functions in user-defined code. It is not
+practical either, as the translatable strings marked by @code{__} or
@code{__p} need to
+be collected and added to the Texinfo messages domain. This facility could
+only be used in user-defined code with translatable strings already present in
+the domain anyway. In fact, these functions are documented mainly because they
+are automatically exported.
+
+See @ref{,,, libintl-perl},
+@url{https://www.gnu.org/software/gettext/manual/html_node/gettext.html,
@code{gettext} C interface},
+@url{https://www.gnu.org/software/gettext/manual/html_node/Perl.html, Perl in
GNU Gettext}.
+For translation of strings in output, see @ref{Texinfo@asis{::}Translations
NAME,, Texinfo::Translations}.
+
+@item collect_commands_in_tree($tree, $commands_list)
+@anchor{Texinfo@asis{::}Common collect_commands_in_tree($tree@comma{}
$commands_list)}
+@cindex @code{collect_commands_in_tree}
+
+Returns a hash reference with keys @@-commands names specified
+in the @emph{$commands_list} array reference and values arrays of
+tree elements corresponding to those @@-command found in @emph{$tree}
+by traversing the tree.
+
+@item collect_commands_list_in_tree($tree, $commands_list)
+@anchor{Texinfo@asis{::}Common collect_commands_list_in_tree($tree@comma{}
$commands_list)}
+@cindex @code{collect_commands_list_in_tree}
+
+Return a list reference containing the tree elements corresponding
+to the @@-commands names specified in the @emph{$commands_list} found
+in @emph{$tree} by traversing the tree. The order of the @@-commands
+should be kept.
+
+@item $encoding_name = element_associated_processing_encoding($element)
+@anchor{Texinfo@asis{::}Common $encoding_name =
element_associated_processing_encoding($element)}
+@cindex @code{element_associated_processing_encoding}
+
+Returns the encoding name that can be used for decoding derived
+from the encoding that was set where @emph{$element} appeared.
+
+@item $result = element_is_inline($element, $check_current)
+@anchor{Texinfo@asis{::}Common $result = element_is_inline($element@comma{}
$check_current)}
+@cindex @code{element_is_inline}
+
+Return true if the element passed in argument is in running text
+context. If the optional @emph{$check_current} argument is set,
+check the element itself, in addition to the parent context.
+
+@item ($encoded_file_name, $encoding) = encode_file_name($file_name,
$input_encoding)
+@anchor{Texinfo@asis{::}Common ($encoded_file_name@comma{} $encoding) =
encode_file_name($file_name@comma{} $input_encoding)}
+
+Encode the @emph{$file_name} text string to a binary string
@emph{$encoded_file_name}
+based on @emph{$input_encoding}. Also returns the @emph{$encoding} name
actually
+used which may have undergone some normalization. This function is mostly
+a wrapper around @ref{encode,, Encode::encode, Encode} which avoids calling
the module if not
+needed. Do nothing if @emph{$input_encoding} is @code{undef}.
+
+@item $text = enumerate_item_representation($specification, $number)
+@anchor{Texinfo@asis{::}Common $text =
enumerate_item_representation($specification@comma{} $number)}
+@cindex @code{enumerate_item_representation}
+
+This function returns the number or letter correponding to item
+number @emph{$number} for an @code{@@enumerate} specification
@emph{$specification},
+appearing on an @code{@@enumerate} line. For example
+
+@verbatim
+ enumerate_item_representation('c', 3)
+@end verbatim
+
+is @code{e}.
+
+@item $command = find_parent_root_command($object, $tree_element)
+@anchor{Texinfo@asis{::}Common $command =
find_parent_root_command($object@comma{} $tree_element)}
+@cindex @code{find_parent_root_command}
+
+Find the parent root command (sectioning command or node) of a tree element.
+The @emph{$object} argument is optional, its @code{global_commands} field is
used
+to continue through @code{@@insertcopying} if in a @code{@@copying}.
+
+@item $entry_content_element = index_content_element($element,
$prefer_reference_element)
+@anchor{Texinfo@asis{::}Common $entry_content_element =
index_content_element($element@comma{} $prefer_reference_element)}
+
+Return a Texinfo tree element corresponding to the content of the index
+entry associated to @emph{$element}. If @emph{$prefer_reference_element} is
set,
+prefer an untranslated element. If the element is an index command like
+@code{@@cindex} or an @code{@@ftable} @code{@@item}, the content element is
the argument
+of the command. If the element is a definition line, the index entry
+element is based on the name and class.
+
+@item $result = is_content_empty($tree, $do_not_ignore_index_entries)
+@anchor{Texinfo@asis{::}Common $result = is_content_empty($tree@comma{}
$do_not_ignore_index_entries)}
+@cindex @code{is_content_empty}
+
+Return true if the @emph{$tree} has content that could be formatted.
+@emph{$do_not_ignore_index_entries} is optional. If set, index entries
+are considered to be formatted.
+
+@item $file = locate_include_file($customization_information, $file_path)
+@anchor{Texinfo@asis{::}Common $file =
locate_include_file($customization_information@comma{} $file_path)}
+@cindex @code{locate_include_file}
+
+Locate @emph{$file_path}. If @emph{$file_path} is an absolute path or has
@code{.}
+or @code{..} in the path directories it is checked that the path exists and is
a
+file. Otherwise, the file name in @emph{$file_path} is located in include
+directories also used to find texinfo files included in Texinfo documents.
+@emph{$file_path} should be a binary string. @code{undef} is returned if the
file was
+not found, otherwise the file found is returned as a binary string.
+
+@item ($index_entry, $index_info) = lookup_index_entry($index_entry_info,
$indices_information)
+@anchor{Texinfo@asis{::}Common ($index_entry@comma{} $index_info) =
lookup_index_entry($index_entry_info@comma{} $indices_information)}
+
+Returns an @emph{$index_entry} hash based on the @emph{$index_entry_info} and
+@emph{$indices_information}. Also returns the @emph{$index_info} hash with
information on
+the index associated to the index entry. @emph{$index_entry_info} should be
+an array reference with an index name as first element and the index entry
number
+in that index (1-based) as second element. In general, the
@emph{$index_entry_info}
+is an @ref{Texinfo@asis{::}Parser index_entry,, @code{extra}
@emph{index_entry}} associated to an element.
+
+The @emph{$index_entry} hash is described in @ref{Texinfo@asis{::}Document
index_entries}. The
+@emph{$index_info} hash is described in @ref{Texinfo@asis{::}Document
$indices_information = $document->indices_information(),,
@code{Texinfo::Document::indices_information}}.
+
+@item $normalized_name = normalize_top_node_name($node_string)
+@anchor{Texinfo@asis{::}Common $normalized_name =
normalize_top_node_name($node_string)}
+@cindex @code{normalize_top_node_name}
+
+Normalize the node name string given in argument, by normalizing
+Top node case.
+
+@item $result = remove_from_array($array, $element)
+@anchor{Texinfo@asis{::}Common $result = remove_from_array($array@comma{}
$element)}
+
+Remove first occurence of @emph{$element} in the array reference @emph{$array}.
+Return the removed element, or @code{undef} if not found.
+
+@item $level = section_level($section)
+@anchor{Texinfo@asis{::}Common $level = section_level($section)}
+@cindex @code{section_level}
+
+Return numbered level of the tree sectioning element @emph{$section}, as
modified by
+raise/lowersections.
+
+@item $element = set_global_document_command($customization_information,
$global_commands_information, $cmdname, $command_location)
+@anchor{Texinfo@asis{::}Common $element =
set_global_document_command($customization_information@comma{}
$global_commands_information@comma{} $cmdname@comma{} $command_location)}
+@cindex @code{set_global_document_command}
+
+Set the Texinfo customization variable corresponding to @emph{$cmdname} in
+@emph{$customization_information}. The @emph{$global_commands_information}
should
+contain information about global commands in a Texinfo document, typically
obtained
+from a parsed document @ref{Texinfo@asis{::}Document $commands =
global_commands_information($document),,
$document->global_commands_information()}.
+@emph{$command_location} specifies where in the document the value should be
taken from,
+for commands that may appear more than once. The possibilities are:
+
+@table @asis
+@item last
+@anchor{Texinfo@asis{::}Common last}
+
+Set to the last value for the command.
+
+@item preamble
+@anchor{Texinfo@asis{::}Common preamble}
+
+Set sequentially to the values in the Texinfo preamble.
+
+@item preamble_or_first
+@anchor{Texinfo@asis{::}Common preamble_or_first}
+
+Set to the first value of the command if the first command is not
+in the Texinfo preamble, else set as with @emph{preamble},
+sequentially to the values in the Texinfo preamble.
+
+@end table
+
+The @emph{$element} returned is the last element that was used to set the
+customization value, or @code{undef} if no customization value was found.
+
+Notice that the only effect of this function is to set a customization
+variable value, no @@-command side effects are run, no associated customization
+variables are set.
+
+@item $status = set_informative_command_value($customization_information,
$element)
+@anchor{Texinfo@asis{::}Common $status =
set_informative_command_value($customization_information@comma{} $element)}
+@cindex @code{set_informative_command_value}
+
+Set the Texinfo customization option corresponding to the tree element
+@emph{$element}. The command associated to the tree element should be
+a command that sets some information, such as @code{@@documentlanguage},
+@code{@@contents} or @code{@@footnotestyle} for example. Return true if the
command
+argument was found and the customization variable was set.
+
+@item set_output_encodings($customization_information, $document)
+@anchor{Texinfo@asis{::}Common
set_output_encodings($customization_information@comma{} $document)}
+@cindex @code{set_output_encodings}
+
+If not already set, set @code{OUTPUT_ENCODING_NAME} based on input file
+encoding. Also set @code{OUTPUT_PERL_ENCODING} accordingly which is used
+to output in the correct encoding. In general, @code{OUTPUT_PERL_ENCODING}
+should not be set directly by user-defined code such that it corresponds
+to @code{OUTPUT_ENCODING_NAME}.
+
+@item $split_contents = split_custom_heading_command_contents($element)
+@anchor{Texinfo@asis{::}Common $split_contents =
split_custom_heading_command_contents($element)}
+@cindex @code{split_custom_heading_command_contents}
+
+Split the @emph{$element} contents at @code{@@|} in at max three parts.
+Return an element containing the split parts in contents, or @code{undef} if
+the @emph{$element} has no useful content. The input @emph{$element}
+is supposed to be @code{$element->@{'args'@}->[0]}
+of @code{%Texinfo::Commands::heading_spec_commands} commands such as
@code{@@everyheading}.
+
+@item $status = valid_customization_option($name)
+@anchor{Texinfo@asis{::}Common $status = valid_customization_option($name)}
+@cindex @code{valid_option}
+
+Return true if the @emph{$name} is a known customization option.
+
+@item $status = valid_tree_transformation($name)
+@anchor{Texinfo@asis{::}Common $status = valid_tree_transformation($name)}
+@cindex @code{valid_tree_transformation}
+
+Return true if the @emph{$name} is a known tree transformation name
+that may be passed with @code{TREE_TRANSFORMATIONS} to modify a texinfo
+tree.
+
+@end table
+
+@node Texinfo@asis{::}Common SEE ALSO
+@section Texinfo::Common SEE ALSO
+
+@ref{Texinfo@asis{::}Parser NAME,, Texinfo::Parser},
@ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter} and @ref{Texinfo@asis{::}Report NAME,,
Texinfo::Report}.
+
+@node Texinfo@asis{::}Common AUTHOR
+@section Texinfo::Common AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Common COPYRIGHT AND LICENSE
+@section Texinfo::Common COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-Converter.texi
b/doc/tp_api/api_includes/Texinfo-Convert-Converter.texi
new file mode 100644
index 0000000000..9f392bdc64
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-Converter.texi
@@ -0,0 +1,791 @@
+@node Texinfo@asis{::}Convert@asis{::}Converter
+@chapter Texinfo::Convert::Converter
+
+@node Texinfo@asis{::}Convert@asis{::}Converter NAME
+@section Texinfo::Convert::Converter NAME
+
+Texinfo::Convert::Converter - Parent class for Texinfo tree converters
+
+@node Texinfo@asis{::}Convert@asis{::}Converter SYNOPSIS
+@section Texinfo::Convert::Converter SYNOPSIS
+
+@verbatim
+ package Texinfo::Convert::MyConverter;
+
+ use Texinfo::Convert::Converter;
+ @ISA = qw(Texinfo::Convert::Converter);
+
+ sub converter_defaults ($$) {
+ return %myconverter_defaults;
+ }
+ sub converter_initialize($) {
+ my $self = shift;
+ ...
+ }
+
+ sub conversion_initialization($;$) {
+ my $self = shift;
+ my $document = shift;
+
+ if ($document) {
+ $self->set_document($document);
+ }
+
+ $self->{'document_context'} = [{}];
+ ...
+ }
+
+ sub conversion_finalization($) {
+ my $self = shift;
+ }
+
+ sub convert_tree($$) {
+ ...
+ }
+
+ sub convert($$) {
+ my $self = shift;
+ my $document = shift;
+
+ $self->conversion_initialization($document);
+
+ ...
+ $self->conversion_finalization();
+ }
+
+ sub output($$) {
+ my $self = shift;
+ my $document = shift;
+
+ $self->conversion_initialization($document);
+
+ ...
+ $self->conversion_finalization();
+ ...
+ }
+
+ # end of Texinfo::Convert::MyConverter
+
+ my $converter = Texinfo::Convert::MyConverter->converter();
+ $converter->output($texinfo_parsed_document);
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}Converter NOTES
+@section Texinfo::Convert::Converter NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}Converter DESCRIPTION
+@section Texinfo::Convert::Converter DESCRIPTION
+
+@code{Texinfo::Convert::Converter} is a super class that can be used to
+simplify converters initialization. The class also provide some
+useful methods. In turn, the converter should define some methods for
+conversion. In general @code{convert_tree}, @code{output} and @code{convert}
should be
+defined.
+
+@table @asis
+@item $result = $converter->convert_tree($tree)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $result =
$converter->convert_tree($tree)}
+@cindex @code{convert_tree}
+
+The @code{convert_tree} method is mandatory and should convert portions of
Texinfo
+tree. Takes a @emph{$converter} and Texinfo tree @emph{$tree} in arguments.
Returns
+the converted output.
+
+@item $result = $converter->output($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $result =
$converter->output($document)}
+
+@item $result = $converter->output_tree($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $result =
$converter->output_tree($document)}
+@cindex @code{output}
+@cindex @code{output_tree}
+
+The @code{output} method is used by converters as entry point for conversion
+to a file with headers and so on. Although not called from other
+modules, this method should in general be implemented by converters.
+@code{output} is called from @code{texi2any}. @code{output} takes a
@emph{$converter} and a
+Texinfo parsed document @code{Texinfo::Document} @emph{$document} as arguments.
+
+@code{Texinfo::Convert::Converter} implements a generic @code{output_tree}
+function suitable for conversion of the Texinfo tree, with the conversion
+result output into a file or returned from the function. @code{output_tree}
+takes a @emph{$converter} and a Texinfo parsed document
@code{Texinfo::Document}
+@emph{$document} as arguments. In a converter that uses @code{output_tree},
+@code{output} is in general defined as:
+
+@verbatim
+ sub output($$) {
+ my $self = shift;
+ my $document = shift;
+
+ return $self->output_tree($document);
+ }
+@end verbatim
+
+In general, @code{output} and @code{output_tree} output to files and return
@code{undef}.
+When the output file name is an empty string, however, it is customary
+for @code{output} and @code{output_tree} to return the output as a character
string
+instead.
+
+For output formats based on output units conversion, the
+@code{Texinfo::Convert::Plaintext} @code{output} method could be a good
starting
+point.
+
+@item $result = $converter->convert($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $result =
$converter->convert($document)}
+@cindex @code{convert}
+
+Entry point for the conversion of a Texinfo parsed document without
+the headers done when outputting to a file. @code{convert} takes a
@emph{$converter}
+and a Texinfo parsed document @code{Texinfo::Document} @emph{$document} as
arguments.
+Returns the output as a character string. Not mandatory, not called from
+other modules nor from @code{texi2any}, but used in the @code{texi2any} test
suite.
+
+@item $result = $converter->convert_output_unit($output_unit)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $result =
$converter->convert_output_unit($output_unit)}
+@cindex @code{convert_output_unit}
+
+Can be used for the conversion of output units by converters.
+@code{convert_output_unit} takes a @emph{$converter} and an output unit
+@emph{$output_unit} as argument. The implementation of
+@code{convert_output_unit} of @code{Texinfo::Convert::Converter} could be
suitable in
+many cases. Output units are typically returned by
@ref{Texinfo@asis{::}OutputUnits $output_units = split_by_section($document),,
Texinfo::OutputUnits
+split_by_section}
+or @ref{Texinfo@asis{::}OutputUnits $output_units =
+split_by_node($document),, Texinfo::OutputUnits split_by_node}.
+
+Output units are not relevant for all the formats, the Texinfo tree can also be
+converted directly, in general by using @code{output_tree}.
+
+@end table
+
+Two methods, @code{converter_defaults} and @code{converter_initialize} are
+used for initialization, to give information
+to @code{Texinfo::Convert::Converter} and can be redefined in converters.
+
+To help with the conversion, the @code{set_document} function associates a
+@code{Texinfo::Document} to a converter. Other methods are called in default
+implementations to be redefined to call code at specific moments of the
+conversion. @code{conversion_initialization}, for instance, is generally
+called at the beginning of @code{output}, @code{output_tree} and
@code{convert}.
+@code{conversion_finalization} is generally called at the end of
@code{output_tree},
+@code{output} and @code{convert}. @code{output_tree} also calls the
+@code{conversion_output_begin} method before the Texinfo tree conversion to
obtain
+the beginning of the output. @code{output_tree} calls the
+@code{conversion_output_begin} method after the Texinfo tree conversion to
obtain
+the end of the output.
+
+Existing backends may be used as examples that implement and use those
+methods. @code{Texinfo::Convert::Texinfo} together with
+@code{Texinfo::Convert::PlainTexinfo}, as well as
+@code{Texinfo::Convert::TextContent} are trivial examples.
+@code{Texinfo::Convert::Text} is less trivial, although still simple,
+while @code{Texinfo::Convert::DocBook} is a real converter
+that is also not too complex.
+
+The documentation of @ref{Texinfo@asis{::}Common NAME,, Texinfo::Common},
@ref{Texinfo@asis{::}Convert@asis{::}Unicode NAME,, Texinfo::Convert::Unicode}
+describes modules or additional function that may be useful for backends,
+while the parsed Texinfo tree is described in @ref{Texinfo@asis{::}Parser
NAME,, Texinfo::Parser}.
+
+@node Texinfo@asis{::}Convert@asis{::}Converter METHODS
+@section Texinfo::Convert::Converter METHODS
+
+@node Texinfo@asis{::}Convert@asis{::}Converter Converter Initialization
+@subsection Converter Initialization
+
+@cindex @code{converter}
+@cindex @code{Texinfo::Convert::Converter} initialization
+
+
+A module subclassing @code{Texinfo::Convert::Converter} is created by calling
+the @code{converter} method that should be inherited from
+@code{Texinfo::Convert::Converter}.
+
+@table @asis
+@item $converter = MyConverter->converter($options)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $converter =
MyConverter->converter($options)}
+
+The @emph{$options} hash reference holds options for the converter.
+These options are Texinfo customization options and a few other options that
can
+be passed to the converter. Most of the customization options
+are described in the Texinfo manual or in the customization API manual.
+Those customization options, when appropriate, override the document content.
+@strong{TODO what about the other options (all are used in converters).
Describe
+in converter_defaults?}
+
+The @code{converter} function returns a converter object (a blessed hash
+reference) after checking the options and performing some initializations.
+
+@end table
+
+To help with these initializations, the modules subclassing
@code{Texinfo::Convert::Converter}
+can define two methods:
+
+@table @asis
+@item %defaults = $converter->converter_defaults($options)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter %defaults =
$converter->converter_defaults($options)}
+@cindex @code{converter_defaults}
+
+The module can provide a defaults hash for converter customization options.
+The @emph{$options} hash reference holds options for the converter.
+
+@item converter_initialize
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter converter_initialize}
+@cindex @code{converter_initialize}
+
+This method is called at the end of the @code{Texinfo::Convert::Converter}
+converter initialization.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Converter Conversion
+@subsection Conversion
+
+For conversion with @code{output} and @code{convert} a document to convert
should be
+associated to the converter, in general the document passed in argument of
+@code{output} or @code{convert}. The @code{set_document} function associates a
+@code{Texinfo::Document} to a converter. This function is used in the default
+implementations.
+
+@table @asis
+@item $converter->set_document($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter
$converter->set_document($document)}
+@cindex @code{set_document}
+
+Associate @emph{$document} to @emph{$converter}. Also set the encoding
related customization
+options based on @emph{$converter} customization information and information on
+document encoding, and setup converter hash @code{convert_text_options} value
that
+can be used to call @ref{Texinfo@asis{::}Convert@asis{::}Text $result =
convert_to_text($tree@comma{} $text_options),,
Texinfo::Convert::Text::convert_to_text}.
+
+@end table
+
+The @code{conversion_initialization}, @code{conversion_finalization},
+@code{conversion_output_begin} and @code{conversion_output_end} can be
redefined to
+call code at diverse moments:
+
+@table @asis
+@item $converter->conversion_initialization($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter
$converter->conversion_initialization($document)}
+
+@item $converter->conversion_finalization()
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter
$converter->conversion_finalization()}
+@cindex @code{conversion_initialization}
+@cindex @code{conversion_finalization}
+
+@code{conversion_initialization} is called at the beginning of
@code{output_tree} and
+of the default implementations of the @code{output} and @code{convert}
functions.
+@code{conversion_finalization} is called at the end of @code{output_tree} and
of
+the default @code{output} and @code{convert} methods implementations.
+These functions should be redefined to have code run before a document
+conversion and after the document conversion.
+
+In the default case, @code{conversion_initialization} calls
+@ref{Texinfo@asis{::}Convert@asis{::}Converter
$converter->set_document($document),, set_document} to associate the
@code{Texinfo::Document}
+document passed in argument to the converter. A subclass converter redefining
+@code{conversion_initialization} should in general call @code{set_document} in
the
+redefined function too to associate the converted document to the converter.
+
+@item $beginning = $converter->conversion_output_begin($output_file,
$output_filename)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $beginning =
$converter->conversion_output_begin($output_file@comma{} $output_filename)}
+
+@item $end = $converter->conversion_output_end()
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $end =
$converter->conversion_output_end()}
+@cindex @code{conversion_output_begin}
+@cindex @code{conversion_output_end}
+
+@code{conversion_output_begin} returned string @emph{$beginning} is output
+by the @code{output_tree} calling method before the Texinfo tree conversion.
+The @emph{$output_file} argument is the output file path.
+If @emph{$output_file} is an empty string, it means that text will be returned
by
+the converter instead of being written to an output file.
+@emph{$output_filename} is, in general, the file name portion of
@emph{$output_file}
+(without directory) but can also be set based on @code{@@setfilename}.
+
+@code{conversion_output_end} returned string @emph{$end} is output
+by the @code{output_tree} calling method after the Texinfo tree conversion.
+
+The default methods implementations return an empty string.
+
+@end table
+
+Calling @code{conversion_initialization} and, if needed,
@code{conversion_finalization}
+in redefined @code{output} and @code{convert} methods is not mandated, but it
is
+recommended to have similar converter codes. In subclassed converters that do
+not need to define @code{conversion_initialization}, calling the default
+@code{Texinfo::Convert::Converter} @code{conversion_initialization}
implementation is
+also recommended to avoid having to explictely call @code{set_document}.
+If @code{conversion_initialization} is defined in a converter subclass it is
+recommended to call @code{set_document} at the very beginning of the function
to
+have the document associated to the converter.
+
+@node Texinfo@asis{::}Convert@asis{::}Converter Getting and setting
customization variables
+@subsection Getting and setting customization variables
+
+@code{Texinfo::Convert::Converter} implements a simple interface to
+set and retrieve Texinfo customization variables. Helper
+functions from diverse Texinfo modules needing customization
+information expect an object implementing @code{get_conf} and/or
+@code{set_conf}. The converter itself can therefore be used in
+such cases.
+
+@table @asis
+@item $converter->force_conf($variable_name, $variable_value)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter
$converter->force_conf($variable_name@comma{} $variable_value)}
+@cindex @code{force_conf}
+
+Set the Texinfo customization option @emph{$variable_name} to
@emph{$variable_value}.
+This should rarely be used, but the purpose of this method is to be able
+to revert a customization that is always wrong for a given output
+format, like the splitting for example.
+
+@item $converter->get_conf($variable_name)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter
$converter->get_conf($variable_name)}
+@cindex @code{get_conf}
+
+Returns the value of the Texinfo customization variable @emph{$variable_name}.
+
+@item $status = $converter->set_conf($variable_name, $variable_value)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $status =
$converter->set_conf($variable_name@comma{} $variable_value)}
+@cindex @code{set_conf}
+
+Set the Texinfo customization option @emph{$variable_name} to
@emph{$variable_value} if
+not set as a converter option. Returns false if the customization options
+was not set.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Converter Registering error and warning
messages
+@subsection Registering error and warning messages
+
+@code{Texinfo::Convert::Converter} implements an interface to register error
and
+warning messages in the converter, that can be retrieved later on, in general
+to be given to @code{Texinfo::Report::add_formatted_message}. Underneath,
+@code{Texinfo::Report} is used to setup the messages data structure.
+
+@table @asis
+@item $converter->converter_document_error($text, $continuation)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter
$converter->converter_document_error($text@comma{} $continuation)}
+
+@item $converter->converter_document_warn($text, $continuation)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter
$converter->converter_document_warn($text@comma{} $continuation)}
+@cindex @code{converter_document_error}
+@cindex @code{converter_document_warn}
+
+Register a warning or an error. The @emph{$text} is the text of the error or
+warning.
+
+The @emph{$continuation} optional arguments, if true, conveys that the line is
a
+continuation line of a message.
+
+@item $converter->converter_line_error($text, $error_location_info,
$continuation)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter
$converter->converter_line_error($text@comma{} $error_location_info@comma{}
$continuation)}
+
+@item $converter->converter_line_warn($text, $error_location_info,
$continuation)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter
$converter->converter_line_warn($text@comma{} $error_location_info@comma{}
$continuation)}
+@cindex @code{converter_line_error}
+@cindex @code{converter_line_warn}
+
+Register a warning or an error with a line information. The @emph{$text} is
the
+text of the error or warning. The @emph{$error_location_info} argument holds
the
+information on the error or warning location. The @emph{$error_location_info}
+reference on hash may be obtained from Texinfo elements @emph{source_info}
keys.
+It may also be setup to point to a file name, using the @code{file_name} key
and to
+a line number, using the @code{line_nr} key. The @code{file_name} key value
should be
+a binary string.
+
+The @emph{$continuation} optional arguments, if true, conveys that
+the line is a continuation line of a message.
+
+@item \@@error_warning_messages = $converter->get_converter_errors()
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter \@@error_warning_messages =
$converter->get_converter_errors()}
+@cindex @code{get_converter_errors}
+
+Return a reference on an array containing the error or warning messages
+registered in the converter. Error and warning messages are hash references as
+described in @ref{Texinfo@asis{::}Report ($error_warnings_list@comma{}
+$error_count) = errors($registrar),, Texinfo::Report::errors} and can be used
in input of @ref{Texinfo@asis{::}Report $registrar->add_formatted_message
+($msg),, Texinfo::Report::add_formatted_message}.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Converter Translations in output
documents
+@subsection Translations in output documents
+
+@code{Texinfo::Convert::Converter} provides wrappers around
+@ref{Texinfo@asis{::}Translations NAME,, Texinfo::Translations} methods that
sets the language to the current
+@code{documentlanguage}.
+
+The @code{cdt} and @code{pcdt} methods are used to translate strings to be
output in
+converted documents, and return a Texinfo tree. The @code{cdt_string} is
similar
+but returns a simple string, for already converted strings.
+
+@table @asis
+@item $tree = $converter->cdt($string, $replaced_substrings,
$translation_context)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $tree =
$converter->cdt($string@comma{} $replaced_substrings@comma{}
$translation_context)}
+
+@item $string = $converter->cdt_string($string, $replaced_substrings,
$translation_context)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $string =
$converter->cdt_string($string@comma{} $replaced_substrings@comma{}
$translation_context)}
+@cindex @code{cdt}
+@cindex @code{cdt_string}
+
+The @emph{$string} is a string to be translated. With @code{cdt}
+the function returns a Texinfo tree, as the string is interpreted
+as Texinfo code after translation. With @code{cdt_string} a string
+is returned.
+
+@emph{$replaced_substrings} is an optional hash reference specifying
+some substitution to be done after the translation. The key of the
+@emph{$replaced_substrings} hash reference identifies what is to be
substituted.
+In the string to be translated word in brace matching keys of
+@emph{$replaced_substrings} are replaced.
+For @code{cdt}, the value is a Texinfo tree that is substituted in the
+resulting texinfo tree. For @code{cdt_string}, the value is a string that
+is replaced in the resulting string.
+
+The @emph{$translation_context} is optional. If not @code{undef} this is a
translation
+context string for @emph{$string}. It is the first argument of @code{pgettext}
+in the C API of Gettext.
+
+@item $tree = $object->pcdt($translation_context, $string,
$replaced_substrings)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $tree =
$object->pcdt($translation_context@comma{} $string@comma{}
$replaced_substrings)}
+@cindex @code{pcdt}
+
+Same to @code{cdt} except that the @emph{$translation_context} is not optional.
+This function is useful to mark strings with a translation context for
+translation. This function is similar to pgettext in the Gettext C API.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Converter Index sorting
+@subsection Index sorting
+
+You should call the following methods to sort indices in conversion:
+
+@table @asis
+@item $sorted_indices = $converter->get_converter_indices_sorted_by_index()
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $sorted_indices =
$converter->get_converter_indices_sorted_by_index()}
+
+@item $sorted_indices = $converter->get_converter_indices_sorted_by_letter()
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $sorted_indices =
$converter->get_converter_indices_sorted_by_letter()}
+@cindex @code{get_converter_indices_sorted_by_index}
+@cindex @code{get_converter_indices_sorted_by_letter}
+
+@code{get_converter_indices_sorted_by_letter} returns the indices sorted by
index
+and letter, while @code{get_converter_indices_sorted_by_index} returns the
indices
+with all entries of an index together.
+
+When sorting by letter, an array reference of letter hash references is
+associated with each index name. Each letter hash reference has two
+keys, a @emph{letter} key with the letter, and an @emph{entries} key with an
array
+reference of sorted index entries beginning with the letter. The letter
+is a character string suitable for sorting letters, but is not necessarily
+the best to use for output.
+
+When simply sorting, the array of the sorted index entries is associated
+with the index name.
+
+The functions call @ref{Texinfo@asis{::}Document $sorted_indices =
$document->sorted_indices_by_letter($customization_information@comma{}
$use_unicode_collation@comma{} $locale_lang),,
@code{Texinfo::Document::sorted_indices_by_letter}}
+or @ref{Texinfo@asis{::}Document $sorted_indices =
$document->sorted_indices_by_index($customization_information@comma{}
$use_unicode_collation@comma{} $locale_lang),,
@code{Texinfo::Document::sorted_indices_by_index}}
+with arguments based on @code{USE_UNICODE_COLLATION},
@code{COLLATION_LANGUAGE} and
+@code{DOCUMENTLANGUAGE_COLLATION} customization options, and, if relevant,
current
+@code{@@documentlanguage}.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Converter Conversion to XML
+@subsection Conversion to XML
+
+Some @code{Texinfo::Convert::Converter} methods target conversion to XML.
+Most methods take a @emph{$converter} as argument to get some
+information and use methods for error reporting.
+
+@table @asis
+@item $formatted_text =
$converter->xml_format_text_with_numeric_entities($text)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $formatted_text =
$converter->xml_format_text_with_numeric_entities($text)}
+@cindex @code{xml_format_text_with_numeric_entities}
+
+Replace quotation marks and hyphens used to represent dash in
+Texinfo text with numeric XML entities.
+
+@item $protected_text = $converter->xml_protect_text($text)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $protected_text =
$converter->xml_protect_text($text)}
+@cindex @code{xml_protect_text}
+
+Protect special XML characters (&, <, >, ") of @emph{$text}.
+
+@item $comment = $converter->xml_comment($text)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $comment =
$converter->xml_comment($text)}
+@cindex @code{xml_comment}
+
+Returns an XML comment for @emph{$text}.
+
+@item $result = xml_accent($text, $accent_command, $in_upper_case,
$use_numeric_entities)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $result =
xml_accent($text@comma{} $accent_command@comma{} $in_upper_case@comma{}
$use_numeric_entities)}
+@cindex @code{xml_accent}
+
+@emph{$text} is the text appearing within an accent command.
@emph{$accent_command}
+should be a Texinfo tree element corresponding to an accent command taking
+an argument. @emph{$in_upper_case} is optional, and, if set, the text is put
+in upper case. The function returns the accented letter as XML named entity
+if possible, falling back to numeric entities if there is no named entity
+and returns the argument as last resort. @emph{$use_numeric_entities}
+is optional. If set, numerical entities are used instead of named entities
+if possible.
+
+@item $result = $converter->xml_accents($accent_command, $in_upper_case)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $result =
$converter->xml_accents($accent_command@comma{} $in_upper_case)}
+@cindex @code{xml_accents}
+
+@emph{$accent_command} is an accent command, which may have other accent
+commands nested. If @emph{$in_upper_case} is set, the result should be
+upper cased. The function returns the accents formatted as XML.
+
+@item $result = xml_numeric_entity_accent($accent_command_name, $text)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $result =
xml_numeric_entity_accent($accent_command_name@comma{} $text)}
+@cindex @code{xml_numeric_entity_accent}
+
+@emph{$accent_command_name} is the name of an accent command. @emph{$text} is
the text
+appearing within the accent command. Returns the accented letter as XML
numeric
+entity, or @code{undef} is there is no such entity.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Converter Helper methods
+@subsection Helper methods
+
+The module provides methods that may be useful for converter.
+Most methods take a @emph{$converter} as argument to get some
+information and use methods for error reporting, see
@ref{Texinfo@asis{::}Convert@asis{::}Converter Registering error and
+warning messages,, Registering error and
+warning messages}. Also to translate strings, see
@ref{Texinfo@asis{::}Convert@asis{::}Converter Translations in output
+documents,, Translations in output
+documents}. For useful methods that need a converter optionally and can be
+used in converters that do not inherit from
@code{Texinfo::Convert::Converter}, see
+@ref{Texinfo@asis{::}Convert@asis{::}Utils NAME,, Texinfo::Convert::Utils}.
+
+@table @asis
+@item $contents_element = $converter->comma_index_subentries_tree($entry,
$separator)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $contents_element =
$converter->comma_index_subentries_tree($entry@comma{} $separator)}
+@cindex @code{comma_index_subentries_tree}
+
+@emph{$entry} is a Texinfo tree index entry element. The function sets up
+an array with the @code{@@subentry} contents. The result is returned as
+@code{contents} in the @emph{$contents_element} element, or @code{undef} if
there is no
+such content. @emph{$separator} is an optional separator argument used, if
given,
+instead of the default: a comma followed by a space.
+
+@item $result = $converter->convert_accents($accent_command, \&format_accents,
$output_encoded_characters, $in_upper_case)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $result =
$converter->convert_accents($accent_command@comma{} \&format_accents@comma{}
$output_encoded_characters@comma{} $in_upper_case)}
+@cindex @code{convert_accents}
+
+@emph{$accent_command} is an accent command, which may have other accent
+commands nested. The function returns the accents formatted either
+as encoded letters if @emph{$output_encoded_characters} is set, or formatted
+using @emph{\&format_accents}. If @emph{$in_upper_case} is set, the result
should be
+uppercased.
+
+@item $succeeded =
$converter->create_destination_directory($destination_directory_path,
$destination_directory_name)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $succeeded =
$converter->create_destination_directory($destination_directory_path@comma{}
$destination_directory_name)}
+@cindex @code{create_destination_directory}
+
+Create destination directory @emph{$destination_directory_path}.
+@emph{$destination_directory_path} should be a binary string, while
+@emph{$destination_directory_name} should be a character string, that can be
used in
+error messages. @emph{$succeeded} is true if the creation was successful or
+uneeded, false otherwise.
+
+@item ($output_file, $destination_directory, $output_filename, $document_name,
$input_basefile) = $converter->determine_files_and_directory($output_format)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter ($output_file@comma{}
$destination_directory@comma{} $output_filename@comma{} $document_name@comma{}
$input_basefile) = $converter->determine_files_and_directory($output_format)}
+@cindex @code{determine_files_and_directory}
+
+Determine output file and directory, as well as names related to files. The
+result depends on the presence of @code{@@setfilename}, on the Texinfo input
file
+name, and on customization options such as @code{OUTPUT}, @code{SUBDIR} or
@code{SPLIT},
+as described in the Texinfo manual. If @emph{$output_format} is defined and
not an
+empty string, @code{_$output_format} is prepended to the default directory
name.
+
+@emph{$output_file} is mainly relevant when not split and should be used as the
+output file name. In general, if not split and @emph{$output_file} is an empty
+string, it means that text should be returned by the converter instead of being
+written to an output file. This is used in the test suite.
+@emph{$destination_directory} is either the directory @emph{$output_file} is
in, or if
+split, the directory where the files should be created.
@emph{$output_filename}
+is, in general, the file name portion of @emph{$output_file} (without
directory)
+but can also be set based on @code{@@setfilename}, in particular when
+@emph{$output_file} is an empty string. @emph{$document_name} is
@emph{$output_filename}
+without extension. @emph{$input_basefile} is based on the input texinfo file
name,
+with the file name portion only (without directory).
+
+The strings returned are text strings.
+
+@item ($encoded_name, $encoding) =
$converter->encoded_input_file_name($character_string_name,
$input_file_encoding)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter ($encoded_name@comma{}
$encoding) = $converter->encoded_input_file_name($character_string_name@comma{}
$input_file_encoding)}
+
+@item ($encoded_name, $encoding) =
$converter->encoded_output_file_name($character_string_name)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter ($encoded_name@comma{}
$encoding) = $converter->encoded_output_file_name($character_string_name)}
+@cindex @code{encoded_input_file_name}
+@cindex @code{encoded_output_file_name}
+
+Encode @emph{$character_string_name} in the same way as other file names are
+encoded in the converter, based on customization variables, and possibly
+on the input file encoding. Return the encoded name and the encoding
+used to encode the name. The @code{encoded_input_file_name} and
+@code{encoded_output_file_name} functions use different customization
variables to
+determine the encoding.
+
+The @emph{$input_file_encoding} argument is optional. If set, it is used for
+the input file encoding. It is useful if there is more precise information
+on the input file encoding where the file name appeared.
+
+Note that @code{encoded_output_file_name} is a wrapper around the
+function with the same name in @ref{Texinfo@asis{::}Convert@asis{::}Utils
($encoded_name@comma{} $encoding) =
$converter->encoded_output_file_name($converter@comma{}
$character_string_name),, Texinfo::Convert::Utils::encoded_output_file_name},
+and @code{encoded_input_file_name} is a wrapper around the
+function with the same name in @ref{Texinfo@asis{::}Convert@asis{::}Utils
($encoded_name@comma{} $encoding) =
$converter->encoded_input_file_name($converter@comma{}
$character_string_name@comma{} $input_file_encoding),,
Texinfo::Convert::Utils::encoded_input_file_name}.
+
+@item ($caption, $prepended) = $converter->float_name_caption($float)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter ($caption@comma{}
$prepended) = $converter->float_name_caption($float)}
+@cindex @code{float_name_caption}
+
+@emph{$float} is a texinfo tree @code{@@float} element. This function
+returns the caption element that should be used for the float formatting
+and the @emph{$prepended} texinfo tree combining the type and label
+of the float.
+
+@item $tree = $converter->float_type_number($float)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $tree =
$converter->float_type_number($float)}
+@cindex @code{float_type_number}
+
+@emph{$float} is a texinfo tree @code{@@float} element. This function
+returns the type and number of the float as a texinfo tree with
+translations.
+
+@item $end_line = $converter->format_comment_or_return_end_line($element)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $end_line =
$converter->format_comment_or_return_end_line($element)}
+@cindex @code{format_comment_or_return_end_line}
+
+Format comment at end of line or return the end of line associated with
+the element. In many cases, converters ignore comments and output is
+better formatted with new lines added independently of the presence
+of newline or comment in the initial Texinfo line, so most converters
+are better off not using this method.
+
+@item $filename = sub $converter->node_information_filename($normalized,
$label_element)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $filename = sub
$converter->node_information_filename($normalized@comma{} $label_element)}
+@cindex @code{node_information_filename}
+
+Returns the normalized file name corresponding to the @emph{$normalized}
+node name and to the @emph{$label_element} node name element contents.
+
+@item ($normalized_name, $filename) =
$converter->normalized_sectioning_command_filename($element)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter ($normalized_name@comma{}
$filename) = $converter->normalized_sectioning_command_filename($element)}
+@cindex @code{normalized_sectioning_command_filename}
+
+Returns a normalized name @emph{$normalized_name} corresponding to a sectioning
+command tree element @emph{$element}, expanding the command argument using
+transliteration and characters protection. Also returns @emph{$filename}
+the corresponding filename based on @emph{$normalized_name} taking into
+account additional constraint on file names and adding a file extension.
+
+@item $converter->present_bug_message($message, $element)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter
$converter->present_bug_message($message@comma{} $element)}
+@cindex @code{present_bug_message}
+
+Show a bug message using @emph{$message} text. Use information on
+@emph{$element} tree element if given in argument.
+
+@item $converter->set_global_document_commands($commands_location,
$selected_commands)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter
$converter->set_global_document_commands($commands_location@comma{}
$selected_commands)}
+@cindex @code{set_global_document_commands}
+
+Set the Texinfo customization options for @@-commands.
@emph{$selected_commands}
+is an array reference containing the @@-commands set.
@emph{$commands_location}
+specifies where in the document the value should be taken from. The
+possibilities are:
+
+@table @asis
+@item before
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter before}
+
+Set to the values before document conversion, from defaults and command-line.
+
+@item last
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter last}
+
+Set to the last value for the command.
+
+@item preamble
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter preamble}
+
+Set sequentially to the values in the Texinfo preamble.
+
+@item preamble_or_first
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter preamble_or_first}
+
+Set to the first value of the command if the first command is not
+in the Texinfo preamble, else set as with @emph{preamble},
+sequentially to the values in the Texinfo preamble.
+
+@end table
+
+Notice that the only effect of this function is to set a customization
+variable value, no @@-command side effects are run, no associated customization
+variables are set.
+
+For more information on the function used to set the value for each of the
command, see
+@ref{Texinfo@asis{::}Common $element =
set_global_document_command($customization_information@comma{}
$global_commands_information@comma{} $cmdname@comma{} $command_location),,
Texinfo::Common set_global_document_command}.
+
+@item $table_item_tree = $converter->table_item_content_tree($element)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $table_item_tree =
$converter->table_item_content_tree($element)}
+@cindex @code{table_item_content_tree}
+
+@emph{$element} should be an @code{@@item} or @code{@@itemx} tree element.
+Returns a tree in which the @@-command in argument of @code{@@*table}
+of the @emph{$element} has been applied to the @emph{$element} line argument,
+or @code{undef}.
+
+@item $result = $converter->top_node_filename($document_name)
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $result =
$converter->top_node_filename($document_name)}
+@cindex @code{top_node_filename}
+
+Returns a file name for the Top node file using either @code{TOP_FILE}
+customization value, or @code{EXTENSION} customization value and
@emph{$document_name}.
+
+@end table
+
+Finally, there is:
+
+@table @asis
+@item $result = $converter->output_internal_links()
+@anchor{Texinfo@asis{::}Convert@asis{::}Converter $result =
$converter->output_internal_links()}
+@cindex @code{output_internal_links}
+
+At this level, the method just returns undef. It is used in the HTML
+output, following the @code{--internal-links} option of @code{texi2any}
+specification.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Converter SEE ALSO
+@section Texinfo::Convert::Converter SEE ALSO
+
+@ref{Texinfo@asis{::}Common NAME,, Texinfo::Common},
@ref{Texinfo@asis{::}Convert@asis{::}Unicode NAME,, Texinfo::Convert::Unicode},
@ref{Texinfo@asis{::}Report NAME,, Texinfo::Report},
+@ref{Texinfo@asis{::}Translations NAME,, Texinfo::Translations},
@ref{Texinfo@asis{::}Convert@asis{::}Utils NAME,, Texinfo::Convert::Utils} and
@ref{Texinfo@asis{::}Parser NAME,, Texinfo::Parser}.
+
+@node Texinfo@asis{::}Convert@asis{::}Converter AUTHOR
+@section Texinfo::Convert::Converter AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}Converter COPYRIGHT AND LICENSE
+@section Texinfo::Convert::Converter COPYRIGHT AND LICENSE
+
+Copyright 2011- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-DocBook.texi
b/doc/tp_api/api_includes/Texinfo-Convert-DocBook.texi
new file mode 100644
index 0000000000..e830c22b11
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-DocBook.texi
@@ -0,0 +1,87 @@
+@node Texinfo@asis{::}Convert@asis{::}DocBook
+@chapter Texinfo::Convert::DocBook
+
+@node Texinfo@asis{::}Convert@asis{::}DocBook NAME
+@section Texinfo::Convert::DocBook NAME
+
+Texinfo::Convert::DocBook - Convert Texinfo tree to DocBook
+
+@node Texinfo@asis{::}Convert@asis{::}DocBook SYNOPSIS
+@section Texinfo::Convert::DocBook SYNOPSIS
+
+@verbatim
+ my $converter
+ = Texinfo::Convert::DocBook->converter({'NUMBER_SECTIONS' => 0});
+
+ $converter->output($document);
+ $converter->convert($document);
+ $converter->convert_tree($tree);
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}DocBook NOTES
+@section Texinfo::Convert::DocBook NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}DocBook DESCRIPTION
+@section Texinfo::Convert::DocBook DESCRIPTION
+
+Texinfo::Convert::DocBook converts a Texinfo tree to DocBook.
+
+@node Texinfo@asis{::}Convert@asis{::}DocBook METHODS
+@section Texinfo::Convert::DocBook METHODS
+
+@table @asis
+@item $converter = Texinfo::Convert::DocBook->converter($options)
+@anchor{Texinfo@asis{::}Convert@asis{::}DocBook $converter =
Texinfo@asis{::}Convert@asis{::}DocBook->converter($options)}
+
+Initialize converter from Texinfo to DocBook.
+
+The @emph{$options} hash reference holds Texinfo customization options for the
+converter. These options should be Texinfo customization options
+that can be passed to the converter. Most of the customization options are
+described in the Texinfo manual or in the customization API manual. Those
+customization options, when appropriate, override the document content.
+
+See @ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter} for more information.
+
+@item $converter->output($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}DocBook $converter->output($document)}
+
+Convert a Texinfo parsed document @emph{$document} and output the result in
files as
+described in the Texinfo manual.
+
+@item $result = $converter->convert($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}DocBook $result =
$converter->convert($document)}
+
+Convert a Texinfo parsed document @emph{$document} and return the resulting
output.
+
+@item $result = $converter->convert_tree($tree)
+@anchor{Texinfo@asis{::}Convert@asis{::}DocBook $result =
$converter->convert_tree($tree)}
+
+Convert a Texinfo tree portion @emph{$tree} and return the resulting
+output. This function does not try to output a full document but only
+portions. For a full document use @code{convert}.
+
+In general, this function should be called after the converter has been
+associated to a document by a call to @code{output} or @code{convert}.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}DocBook AUTHOR
+@section Texinfo::Convert::DocBook AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}DocBook COPYRIGHT AND LICENSE
+@section Texinfo::Convert::DocBook COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-HTML.texi
b/doc/tp_api/api_includes/Texinfo-Convert-HTML.texi
new file mode 100644
index 0000000000..914dc634ce
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-HTML.texi
@@ -0,0 +1,96 @@
+@node Texinfo@asis{::}Convert@asis{::}HTML
+@chapter Texinfo::Convert::HTML
+
+@node Texinfo@asis{::}Convert@asis{::}HTML NAME
+@section Texinfo::Convert::HTML NAME
+
+Texinfo::Convert::HTML - Convert Texinfo tree to HTML
+
+@node Texinfo@asis{::}Convert@asis{::}HTML SYNOPSIS
+@section Texinfo::Convert::HTML SYNOPSIS
+
+@verbatim
+ my $converter
+ = Texinfo::Convert::HTML->converter({'NUMBER_SECTIONS' => 0});
+
+ $converter->output($document);
+ $converter->convert($document);
+ $converter->convert_tree($tree);
+ $converter->output_internal_links(); # HTML only
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}HTML NOTES
+@section Texinfo::Convert::HTML NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}HTML DESCRIPTION
+@section Texinfo::Convert::HTML DESCRIPTION
+
+Texinfo::Convert::HTML converts a Texinfo tree to HTML.
+
+@node Texinfo@asis{::}Convert@asis{::}HTML METHODS
+@section Texinfo::Convert::HTML METHODS
+
+@table @asis
+@item $converter = Texinfo::Convert::HTML->converter($options)
+@anchor{Texinfo@asis{::}Convert@asis{::}HTML $converter =
Texinfo@asis{::}Convert@asis{::}HTML->converter($options)}
+
+Initialize converter from Texinfo to HTML.
+
+The @emph{$options} hash reference holds Texinfo customization options for the
+converter. These options should be Texinfo customization options
+that can be passed to the converter. Most of the customization options are
+described in the Texinfo manual or in the customization API manual. Those
+customization options, when appropriate, override the document content.
+
+See @ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter} for more information.
+
+@item $converter->output($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}HTML $converter->output($document)}
+
+Convert a Texinfo parsed document @emph{$document} and output the result in
files as
+described in the Texinfo manual.
+
+@item $result = $converter->convert($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}HTML $result =
$converter->convert($document)}
+
+Convert a Texinfo parsed document @emph{$document} and return the resulting
output.
+
+@item $result = $converter->convert_tree($tree)
+@anchor{Texinfo@asis{::}Convert@asis{::}HTML $result =
$converter->convert_tree($tree)}
+
+Convert a Texinfo tree portion @emph{$tree} and return the resulting
+output. This function does not try to output a full document but only
+portions. For a full document use @code{convert}.
+
+In general, this function should be called after the converter has been
+associated to a document by a call to @code{output} or @code{convert}.
+
+@item $result = $converter->output_internal_links()
+@anchor{Texinfo@asis{::}Convert@asis{::}HTML $result =
$converter->output_internal_links()}
+@cindex @code{output_internal_links}
+
+Returns text representing the links in the document. The format should
+follow the @code{--internal-links} option of the @code{texi2any}
+specification. This is only supported in (and relevant for) HTML.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}HTML AUTHOR
+@section Texinfo::Convert::HTML AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}HTML COPYRIGHT AND LICENSE
+@section Texinfo::Convert::HTML COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-Info.texi
b/doc/tp_api/api_includes/Texinfo-Convert-Info.texi
new file mode 100644
index 0000000000..c45b0edf2d
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-Info.texi
@@ -0,0 +1,87 @@
+@node Texinfo@asis{::}Convert@asis{::}Info
+@chapter Texinfo::Convert::Info
+
+@node Texinfo@asis{::}Convert@asis{::}Info NAME
+@section Texinfo::Convert::Info NAME
+
+Texinfo::Convert::Info - Convert Texinfo tree to Info
+
+@node Texinfo@asis{::}Convert@asis{::}Info SYNOPSIS
+@section Texinfo::Convert::Info SYNOPSIS
+
+@verbatim
+ my $converter
+ = Texinfo::Convert::Info->converter({'NUMBER_SECTIONS' => 0});
+
+ $converter->output($document);
+ $converter->convert($document);
+ $converter->convert_tree($tree);
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}Info NOTES
+@section Texinfo::Convert::Info NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}Info DESCRIPTION
+@section Texinfo::Convert::Info DESCRIPTION
+
+Texinfo::Convert::Info converts a Texinfo tree to Info.
+
+@node Texinfo@asis{::}Convert@asis{::}Info METHODS
+@section Texinfo::Convert::Info METHODS
+
+@table @asis
+@item $converter = Texinfo::Convert::Info->converter($options)
+@anchor{Texinfo@asis{::}Convert@asis{::}Info $converter =
Texinfo@asis{::}Convert@asis{::}Info->converter($options)}
+
+Initialize converter from Texinfo to Info.
+
+The @emph{$options} hash reference holds Texinfo customization options for the
+converter. These options should be Texinfo customization options
+that can be passed to the converter. Most of the customization options are
+described in the Texinfo manual or in the customization API manual. Those
+customization options, when appropriate, override the document content.
+
+See @ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter} for more information.
+
+@item $converter->output($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}Info $converter->output($document)}
+
+Convert a Texinfo parsed document @emph{$document} and output the result in
files as
+described in the Texinfo manual.
+
+@item $result = $converter->convert($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}Info $result =
$converter->convert($document)}
+
+Convert a Texinfo parsed document @emph{$document} and return the resulting
output.
+
+@item $result = $converter->convert_tree($tree)
+@anchor{Texinfo@asis{::}Convert@asis{::}Info $result =
$converter->convert_tree($tree)}
+
+Convert a Texinfo tree portion @emph{$tree} and return the resulting
+output. This function does not try to output a full document but only
+portions. For a full document use @code{convert}.
+
+In general, this function should be called after the converter has been
+associated to a document by a call to @code{output} or @code{convert}.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Info AUTHOR
+@section Texinfo::Convert::Info AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}Info COPYRIGHT AND LICENSE
+@section Texinfo::Convert::Info COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-NodeNameNormalization.texi
b/doc/tp_api/api_includes/Texinfo-Convert-NodeNameNormalization.texi
new file mode 100644
index 0000000000..d6835ed95d
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-NodeNameNormalization.texi
@@ -0,0 +1,115 @@
+@node Texinfo@asis{::}Convert@asis{::}NodeNameNormalization
+@chapter Texinfo::Convert::NodeNameNormalization
+
+@node Texinfo@asis{::}Convert@asis{::}NodeNameNormalization NAME
+@section Texinfo::Convert::NodeNameNormalization NAME
+
+Texinfo::Convert::NodeNameNormalization - Normalize and transliterate Texinfo
trees
+
+@node Texinfo@asis{::}Convert@asis{::}NodeNameNormalization SYNOPSIS
+@section Texinfo::Convert::NodeNameNormalization SYNOPSIS
+
+@verbatim
+ use Texinfo::Convert::NodeNameNormalization qw(convert_to_identifier
+ normalize_transliterate_texinfo);
+
+ my $normalized = convert_to_identifier({'contents' => $node_contents});
+
+ my $file_name = normalize_transliterate_texinfo({'contents'
+ => $section_contents});
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}NodeNameNormalization NOTES
+@section Texinfo::Convert::NodeNameNormalization NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}NodeNameNormalization DESCRIPTION
+@section Texinfo::Convert::NodeNameNormalization DESCRIPTION
+
+@code{Texinfo::Convert::NodeNameNormalization} allows to normalize node names
+with @code{convert_to_normalized} and @code{convert_to_identifier}.
+@code{convert_to_identifier} follows the specification described in the Texinfo
+manual @emph{HTML Xref} node. This is useful whenever one want a unique
identifier
+for Texinfo content, which is only composed of letter, digits, @code{-} and
@code{_},
+for example for @code{@@node}, @code{@@float} and @code{@@anchor} names
normalization.
+@code{convert_to_normalized} leaves out the step of protecting characters.
+
+It is also possible to transliterate non-ASCII letters, instead of mangling
+them, with @code{normalize_transliterate_texinfo}, losing the uniqueness
feature of
+normalized node names.
+
+Another method, @code{transliterate_protect_file_name} transliterates non-ASCII
+letters and protect characters that should not appear on file names.
+
+@node Texinfo@asis{::}Convert@asis{::}NodeNameNormalization METHODS
+@section Texinfo::Convert::NodeNameNormalization METHODS
+
+@table @asis
+@item $partially_normalized = convert_to_normalized($tree)
+@anchor{Texinfo@asis{::}Convert@asis{::}NodeNameNormalization
$partially_normalized = convert_to_normalized($tree)}
+@cindex @code{convert_to_normalized}
+
+The Texinfo @emph{$tree} is returned as a string, with @@-commands and spaces
+normalized as described in the Texinfo manual @emph{HTML Xref} node. ASCII
+7-bit characters other than spaces and non-ASCII characters are left as
+is in the resulting string.
+
+@item $normalized = convert_to_identifier($tree)
+@anchor{Texinfo@asis{::}Convert@asis{::}NodeNameNormalization $normalized =
convert_to_identifier($tree)}
+@cindex @code{convert_to_identifier}
+
+The Texinfo @emph{$tree} is returned as a string, normalized as described in
the
+Texinfo manual @emph{HTML Xref} node.
+
+The result will be poor for Texinfo trees which are not @@-command arguments
+(on an @@-command line or in braces), for instance if the tree contains
+@code{@@node} or block commands.
+
+@item $transliterated = normalize_transliterate_texinfo($tree, $no_unidecode)
+@anchor{Texinfo@asis{::}Convert@asis{::}NodeNameNormalization $transliterated
= normalize_transliterate_texinfo($tree@comma{} $no_unidecode)}
+@cindex @code{normalize_transliterate_texinfo}
+
+The Texinfo @emph{$tree} is returned as a string, with non-ASCII letters
+transliterated as ASCII, but otherwise similar with
@code{convert_to_identifier}
+output. If the optional @emph{$no_unidecode} argument is set,
@code{Text::Unidecode}
+is not used for characters whose transliteration is not built-in.
+
+@item $transliterated = transliterate_texinfo($tree, $no_unidecode)
+@anchor{Texinfo@asis{::}Convert@asis{::}NodeNameNormalization $transliterated
= transliterate_texinfo($tree@comma{} $no_unidecode)}
+@cindex @code{transliterate_texinfo}
+
+The Texinfo @emph{$tree} is returned as a string, with non-ASCII letters
+transliterated as ASCII. If the optional @emph{$no_unidecode} argument is set,
+@code{Text::Unidecode} is not used for characters whose transliteration is not
+built-in.
+
+@item $file_name = transliterate_protect_file_name($string, $no_unidecode)
+@anchor{Texinfo@asis{::}Convert@asis{::}NodeNameNormalization $file_name =
transliterate_protect_file_name($string@comma{} $no_unidecode)}
+@cindex @code{transliterate_protect_file_name}
+
+The string @emph{$string} is returned with non-ASCII letters transliterated as
+ASCII, and ASCII characters not safe in file names protected as in
+node normalization. If the optional @emph{$no_unidecode} argument is set,
+@code{Text::Unidecode} is not used for characters whose transliteration is not
+built-in.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}NodeNameNormalization AUTHOR
+@section Texinfo::Convert::NodeNameNormalization AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}NodeNameNormalization COPYRIGHT AND
LICENSE
+@section Texinfo::Convert::NodeNameNormalization COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-Plaintext.texi
b/doc/tp_api/api_includes/Texinfo-Convert-Plaintext.texi
new file mode 100644
index 0000000000..282ac5659e
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-Plaintext.texi
@@ -0,0 +1,87 @@
+@node Texinfo@asis{::}Convert@asis{::}Plaintext
+@chapter Texinfo::Convert::Plaintext
+
+@node Texinfo@asis{::}Convert@asis{::}Plaintext NAME
+@section Texinfo::Convert::Plaintext NAME
+
+Texinfo::Convert::Plaintext - Convert Texinfo tree to Plaintext
+
+@node Texinfo@asis{::}Convert@asis{::}Plaintext SYNOPSIS
+@section Texinfo::Convert::Plaintext SYNOPSIS
+
+@verbatim
+ my $converter
+ = Texinfo::Convert::Plaintext->converter({'NUMBER_SECTIONS' => 0});
+
+ $converter->output($document);
+ $converter->convert($document);
+ $converter->convert_tree($tree);
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}Plaintext NOTES
+@section Texinfo::Convert::Plaintext NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}Plaintext DESCRIPTION
+@section Texinfo::Convert::Plaintext DESCRIPTION
+
+Texinfo::Convert::Plaintext converts a Texinfo tree to Plaintext.
+
+@node Texinfo@asis{::}Convert@asis{::}Plaintext METHODS
+@section Texinfo::Convert::Plaintext METHODS
+
+@table @asis
+@item $converter = Texinfo::Convert::Plaintext->converter($options)
+@anchor{Texinfo@asis{::}Convert@asis{::}Plaintext $converter =
Texinfo@asis{::}Convert@asis{::}Plaintext->converter($options)}
+
+Initialize converter from Texinfo to Plaintext.
+
+The @emph{$options} hash reference holds Texinfo customization options for the
+converter. These options should be Texinfo customization options
+that can be passed to the converter. Most of the customization options are
+described in the Texinfo manual or in the customization API manual. Those
+customization options, when appropriate, override the document content.
+
+See @ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter} for more information.
+
+@item $converter->output($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}Plaintext
$converter->output($document)}
+
+Convert a Texinfo parsed document @emph{$document} and output the result in
files as
+described in the Texinfo manual.
+
+@item $result = $converter->convert($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}Plaintext $result =
$converter->convert($document)}
+
+Convert a Texinfo parsed document @emph{$document} and return the resulting
output.
+
+@item $result = $converter->convert_tree($tree)
+@anchor{Texinfo@asis{::}Convert@asis{::}Plaintext $result =
$converter->convert_tree($tree)}
+
+Convert a Texinfo tree portion @emph{$tree} and return the resulting
+output. This function does not try to output a full document but only
+portions. For a full document use @code{convert}.
+
+In general, this function should be called after the converter has been
+associated to a document by a call to @code{output} or @code{convert}.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Plaintext AUTHOR
+@section Texinfo::Convert::Plaintext AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}Plaintext COPYRIGHT AND LICENSE
+@section Texinfo::Convert::Plaintext COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-Texinfo.texi
b/doc/tp_api/api_includes/Texinfo-Convert-Texinfo.texi
new file mode 100644
index 0000000000..15dd9aff8e
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-Texinfo.texi
@@ -0,0 +1,60 @@
+@node Texinfo@asis{::}Convert@asis{::}Texinfo
+@chapter Texinfo::Convert::Texinfo
+
+@node Texinfo@asis{::}Convert@asis{::}Texinfo NAME
+@section Texinfo::Convert::Texinfo NAME
+
+Texinfo::Convert::Texinfo - Convert a Texinfo tree to Texinfo code
+
+@node Texinfo@asis{::}Convert@asis{::}Texinfo SYNOPSIS
+@section Texinfo::Convert::Texinfo SYNOPSIS
+
+@verbatim
+ use Texinfo::Convert::Texinfo qw(convert_to_texinfo);
+
+ my $texinfo_text = convert_to_texinfo($tree);
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}Texinfo NOTES
+@section Texinfo::Convert::Texinfo NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}Texinfo DESCRIPTION
+@section Texinfo::Convert::Texinfo DESCRIPTION
+
+@code{Texinfo::Convert::Texinfo} converts a Texinfo tree (described in
+@ref{Texinfo@asis{::}Parser NAME,, Texinfo::Parser}) to Texinfo code. If the
Texinfo tree results from
+parsing some Texinfo document, The converted Texinfo code should be
+exactly the same as the initial document, except that user defined @@-macros
+and @code{@@value} are expanded, and some invalid code is discarded.
+
+@node Texinfo@asis{::}Convert@asis{::}Texinfo METHODS
+@section Texinfo::Convert::Texinfo METHODS
+
+@table @asis
+@item $texinfo_text = convert_to_texinfo($tree)
+@anchor{Texinfo@asis{::}Convert@asis{::}Texinfo $texinfo_text =
convert_to_texinfo($tree)}
+@cindex @code{convert_to_texinfo}
+
+Converts the Texinfo tree @emph{$tree} to Texinfo code.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Texinfo AUTHOR
+@section Texinfo::Convert::Texinfo AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}Texinfo COPYRIGHT AND LICENSE
+@section Texinfo::Convert::Texinfo COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-TexinfoMarkup.texi
b/doc/tp_api/api_includes/Texinfo-Convert-TexinfoMarkup.texi
new file mode 100644
index 0000000000..a120813374
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-TexinfoMarkup.texi
@@ -0,0 +1,153 @@
+@node Texinfo@asis{::}Convert@asis{::}TexinfoMarkup
+@chapter Texinfo::Convert::TexinfoMarkup
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoMarkup NAME
+@section Texinfo::Convert::TexinfoMarkup NAME
+
+Texinfo::Convert::TexinfoMarkup - Convert Texinfo tree to element and
attribute markup
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoMarkup SYNOPSIS
+@section Texinfo::Convert::TexinfoMarkup SYNOPSIS
+
+@verbatim
+ package Texinfo::Convert::TexinfoMyMarkup;
+
+ use Texinfo::Convert::TexinfoMarkup;
+
+ @ISA = qw(Texinfo::Convert::TexinfoMarkup);
+
+ sub converter_defaults ($$) {
+ return %myconverter_defaults;
+ }
+
+ sub txi_markup_protect_text($$)
+ {
+ my $self = shift;
+ ....
+ }
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoMarkup NOTES
+@section Texinfo::Convert::TexinfoMarkup NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoMarkup DESCRIPTION
+@section Texinfo::Convert::TexinfoMarkup DESCRIPTION
+
+@code{Texinfo::Convert::TexinfoMarkup} converts a Texinfo tree to the Texinfo
+Markup Language which is based on nested elements with attributes, similar
+to XML. All the information present in the Texinfo tree, after
+expansion of @code{@@macro}, @code{@@value} and inclusion of include files is
+kept. @code{Texinfo::Convert::TexinfoMarkup} is an abstract class, to be used
as a
+super class for modules implementing specific markup formatting functions
+called by @code{Texinfo::Convert::TexinfoMarkup}.
+
+The Texinfo Markup Language elements and attributes are not documented,
+but the Texinfo XML output by the @code{Texinfo::Convert::TexinfoXML} subclass
+(@ref{Texinfo@asis{::}Convert@asis{::}TexinfoXML NAME,,
Texinfo::Convert::TexinfoXML}) is a straightforward formatting as XML,
+and is described by the Texinfo DTD. Therefore the Texinfo DTD can be
+used as a description of the structure of both Texinfo XML and of the
+more abstract Texinfo Markup Language.
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoMarkup METHODS
+@section Texinfo::Convert::TexinfoMarkup METHODS
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoMarkup Markup formatting methods
defined by subclasses
+@subsection Markup formatting methods defined by subclasses
+
+The following methods should be implemented by the modules inheriting
+from @code{Texinfo::Convert::TexinfoMarkup}:
+
+@table @asis
+@item $result = $converter->txi_markup_atom($atom)
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoMarkup $result =
$converter->txi_markup_atom($atom)}
+
+Format the @emph{$atom} symbol string in a simpler way than with an element.
For
+example in XML the formatting of the symbol is achieved with an entity.
+
+@item $result = $converter->txi_markup_comment($comment_string)
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoMarkup $result =
$converter->txi_markup_comment($comment_string)}
+
+Format @emph{$comment_string} as a comment.
+
+@item $result = $converter->txi_markup_convert_text($element)
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoMarkup $result =
$converter->txi_markup_convert_text($element)}
+
+Called to format the Texinfo tree @emph{$element} text, which is a
+reference on a hash. The @emph{$element} text is in the @code{text} key.
+The @code{type} key value may also be set to distinguish the type of text
+(@ref{Texinfo@asis{::}Parser Types for text elements}).
+Texinfo tree elements are described in details in @ref{Texinfo@asis{::}Parser
TEXINFO TREE}.
+
+@item $result = $converter->txi_markup_element($format_element, $attributes)
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoMarkup $result =
$converter->txi_markup_element($format_element@comma{} $attributes)}
+
+@item $result = $converter->txi_markup_open_element($format_element,
$attributes)
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoMarkup $result =
$converter->txi_markup_open_element($format_element@comma{} $attributes)}
+
+@item $result = $converter->txi_markup_close_element($format_element,
$attributes)
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoMarkup $result =
$converter->txi_markup_close_element($format_element@comma{} $attributes)}
+
+@code{txi_markup_element} is called for the formatting of empty elements.
Otherwise,
+@code{txi_markup_open_element} is called when an element is opened, and
+@code{txi_markup_close_element} is called when an element is closed.
+@emph{$format_element} is the element name, @emph{$attributes} is a reference
on an
+array containing references on arrays of pairs, one pair for each attribute,
with
+the attribute name as the first item of the pair and the attribute text as the
+second item of the pair.
+
+@item $result = $converter->txi_markup_header()
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoMarkup $result =
$converter->txi_markup_header()}
+
+Called to format a header at the beginning of output files.
+
+@item $result = $converter->txi_markup_protect_text($string)
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoMarkup $result =
$converter->txi_markup_protect_text($string)}
+
+Protect special character in text for text fragments out of text
+Texinfo tree elements. For example, for spaces at end of line that
+are ignorable in most output formats, for @code{@@set} or @code{@@macro}
+arguments.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoMarkup Formatting state
information
+@subsection Formatting state information
+
+A method is available for subclasses to gather information on the
+formatting state:
+
+@table @asis
+@item $converter->in_monospace()
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoMarkup
$converter->in_monospace()}
+
+Return 1 if in a context where spacing should be kept
+and @code{---} or @code{''} left as is, for example in @code{@@code},
@code{@@example}.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoMarkup AUTHOR
+@section Texinfo::Convert::TexinfoMarkup AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoMarkup SEE ALSO
+@section Texinfo::Convert::TexinfoMarkup SEE ALSO
+
+@ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter}. @ref{Texinfo@asis{::}Convert@asis{::}TexinfoXML
NAME,, Texinfo::Convert::TexinfoXML}. The
+@code{Texinfo::Convert::TexinfoSXML} is another subclass, which outputs
+SXML. It is not much documented.
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoMarkup COPYRIGHT AND LICENSE
+@section Texinfo::Convert::TexinfoMarkup COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-TexinfoXML.texi
b/doc/tp_api/api_includes/Texinfo-Convert-TexinfoXML.texi
new file mode 100644
index 0000000000..b412639806
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-TexinfoXML.texi
@@ -0,0 +1,87 @@
+@node Texinfo@asis{::}Convert@asis{::}TexinfoXML
+@chapter Texinfo::Convert::TexinfoXML
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoXML NAME
+@section Texinfo::Convert::TexinfoXML NAME
+
+Texinfo::Convert::TexinfoXML - Convert Texinfo tree to TexinfoXML
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoXML SYNOPSIS
+@section Texinfo::Convert::TexinfoXML SYNOPSIS
+
+@verbatim
+ my $converter
+ = Texinfo::Convert::TexinfoXML->converter({'NUMBER_SECTIONS' => 0});
+
+ $converter->output($document);
+ $converter->convert($document);
+ $converter->convert_tree($tree);
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoXML NOTES
+@section Texinfo::Convert::TexinfoXML NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoXML DESCRIPTION
+@section Texinfo::Convert::TexinfoXML DESCRIPTION
+
+Texinfo::Convert::TexinfoXML converts a Texinfo tree to TexinfoXML.
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoXML METHODS
+@section Texinfo::Convert::TexinfoXML METHODS
+
+@table @asis
+@item $converter = Texinfo::Convert::TexinfoXML->converter($options)
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoXML $converter =
Texinfo@asis{::}Convert@asis{::}TexinfoXML->converter($options)}
+
+Initialize converter from Texinfo to TexinfoXML.
+
+The @emph{$options} hash reference holds Texinfo customization options for the
+converter. These options should be Texinfo customization options
+that can be passed to the converter. Most of the customization options are
+described in the Texinfo manual or in the customization API manual. Those
+customization options, when appropriate, override the document content.
+
+See @ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter} for more information.
+
+@item $converter->output($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoXML
$converter->output($document)}
+
+Convert a Texinfo parsed document @emph{$document} and output the result in
files as
+described in the Texinfo manual.
+
+@item $result = $converter->convert($document)
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoXML $result =
$converter->convert($document)}
+
+Convert a Texinfo parsed document @emph{$document} and return the resulting
output.
+
+@item $result = $converter->convert_tree($tree)
+@anchor{Texinfo@asis{::}Convert@asis{::}TexinfoXML $result =
$converter->convert_tree($tree)}
+
+Convert a Texinfo tree portion @emph{$tree} and return the resulting
+output. This function does not try to output a full document but only
+portions. For a full document use @code{convert}.
+
+In general, this function should be called after the converter has been
+associated to a document by a call to @code{output} or @code{convert}.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoXML AUTHOR
+@section Texinfo::Convert::TexinfoXML AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}TexinfoXML COPYRIGHT AND LICENSE
+@section Texinfo::Convert::TexinfoXML COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-Text.texi
b/doc/tp_api/api_includes/Texinfo-Convert-Text.texi
new file mode 100644
index 0000000000..8c75710346
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-Text.texi
@@ -0,0 +1,183 @@
+@node Texinfo@asis{::}Convert@asis{::}Text
+@chapter Texinfo::Convert::Text
+
+@node Texinfo@asis{::}Convert@asis{::}Text NAME
+@section Texinfo::Convert::Text NAME
+
+Texinfo::Convert::Text - Convert Texinfo tree to simple text
+
+@node Texinfo@asis{::}Convert@asis{::}Text SYNOPSIS
+@section Texinfo::Convert::Text SYNOPSIS
+
+@verbatim
+ use Texinfo::Convert::Text qw(convert_to_text text_accents);
+
+ my $result = convert_to_text($tree);
+
+ my $accents_text = text_accents($accents, 'utf-8');
+
+ # using text conversion options set in $converter derived from
+ # Texinfo::Convert::Converter
+ my $text_options = $converter->{'convert_text_options'};
+
+ set_options_code($text_options);
+ my $result_with_converter = convert_to_text($tree, $text_options);
+ reset_options_code($text_options);
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}Text NOTES
+@section Texinfo::Convert::Text NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}Text DESCRIPTION
+@section Texinfo::Convert::Text DESCRIPTION
+
+@code{Texinfo::Convert::Text} is a simple backend that converts a Texinfo tree
+to simple text. It is used in converters, especially for file names.
+The conversion is very simple, and, in the default case, cannot handle
+error handling nor some output strings translation.
+
+Converters derived from @ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter} should have conversion
+text options associated to the @code{convert_text_options} key.
+
+The main function is @code{convert_to_text}. The text conversion options
+can be modified with the @code{set_*} functions before calling
@code{convert_to_text},
+and reset afterwards with the corresponding @code{reset_*} functions.
+
+@node Texinfo@asis{::}Convert@asis{::}Text METHODS
+@section Texinfo::Convert::Text METHODS
+
+@table @asis
+@item $result = convert_to_text($tree, $text_options)
+@anchor{Texinfo@asis{::}Convert@asis{::}Text $result =
convert_to_text($tree@comma{} $text_options)}
+@cindex @code{convert_to_text}
+
+Convert a Texinfo tree to simple text. @emph{$text_options} is a hash
reference of
+options. The converter is very simple, and has almost no internal state
+besides the options. It cannot handle as is output strings translation or
+error storing.
+
+If the @emph{converter} option is set, some additional features may be
available
+for the conversion of some @@-commands, like output strings translation or
+error reporting.
+
+The @code{NUMBER_SECTIONS}, @code{ASCII_GLYPH} and @code{TEST} options
corresponding to
+customization variables may be set in @emph{$text_options}. The following
options
+may also be set:
+
+@table @asis
+@item enabled_encoding
+@anchor{Texinfo@asis{::}Convert@asis{::}Text enabled_encoding}
+
+If set, the value is considered to be the encoding name texinfo accented
+letters should be converted to. This option being set corresponds to the
+@code{--enable-encoding} option, or the @code{ENABLE_ENCODING} customization
+variable for Info and Plaintext and for some conversion to text in other
+formats. For file names in HTML and LaTeX, and for DocBook or Texinfo XML,
+this variable should in general be set unless the output encoding is US-ASCII.
+
+@item set_case
+@anchor{Texinfo@asis{::}Convert@asis{::}Text set_case}
+
+If positive, the text is upper-cased, if negative, the text is lower-cased.
+
+@item sort_string
+@anchor{Texinfo@asis{::}Convert@asis{::}Text sort_string}
+
+A somehow internal option to convert to text more suitable for alphabetical
+sorting rather than presentation.
+
+@item converter
+@anchor{Texinfo@asis{::}Convert@asis{::}Text converter}
+
+If this converter object is passed to the function, some features of this
+object may be used during conversion. Mostly error reporting and strings
+translation. See also @ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter}.
+
+@item expanded_formats
+@anchor{Texinfo@asis{::}Convert@asis{::}Text expanded_formats}
+
+A reference on a hash. The keys should be format names (like @code{html},
+@code{tex}), and if the corresponding value is set, the format is expanded.
+
+@end table
+
+@item $result_accent_text = ascii_accent_fallback($converter, $text,
$accent_command)
+@anchor{Texinfo@asis{::}Convert@asis{::}Text $result_accent_text =
ascii_accent_fallback($converter@comma{} $text@comma{} $accent_command)}
+@cindex @code{ascii_accent_fallback}
+
+@emph{$text} is the text appearing within an accent command.
@emph{$accent_command}
+should be a Texinfo tree element corresponding to an accent command taking
+an argument. The function returns a transliteration of the accented
+character. The @emph{$converter} argument is ignored, but needed for this
+function to be in argument of functions that need a fallback for accents
+conversion.
+
+@item set_options_code($text_options)
+@anchor{Texinfo@asis{::}Convert@asis{::}Text set_options_code($text_options)}
+
+@item reset_options_code($text_options)
+@anchor{Texinfo@asis{::}Convert@asis{::}Text reset_options_code($text_options)}
+@cindex @code{set_options_code}
+@cindex @code{reset_options_code}
+
+@code{set_options_code} sets @emph{$text_options} to be in code style.
+(mostly @code{--}, @code{---}, @code{''} and @code{``} are kept as is).
@code{reset_options_code}
+undo the effect of @code{set_options_code}.
+
+@code{reset_options_code} should always be called after
@code{set_options_code}.
+
+@item set_options_encoding($text_options, $encoding)
+@anchor{Texinfo@asis{::}Convert@asis{::}Text
set_options_encoding($text_options@comma{} $encoding)}
+
+@item set_options_encoding_if_not_ascii($customization_information,
$text_options)
+@anchor{Texinfo@asis{::}Convert@asis{::}Text
set_options_encoding_if_not_ascii($customization_information@comma{}
$text_options)}
+
+@item reset_options_encoding($text_options)
+@anchor{Texinfo@asis{::}Convert@asis{::}Text
reset_options_encoding($text_options)}
+@cindex @code{set_options_encoding}
+@cindex @code{set_options_encoding_if_not_ascii}
+@cindex @code{reset_options_encoding}
+
+@code{set_options_encoding} sets @code{enabled_encoding} in
@emph{$text_options}
+to @emph{$encoding}. @code{set_options_encoding_if_not_ascii} sets
@code{enabled_encoding}
+in @emph{$text_options} based on customization options associated to
+@emph{$customization_information}. In that case, @code{enabled_encoding} is
set unless
+the output encoding is US-ASCII even if @code{ENABLE_ENCODING} is not set.
+
+@code{reset_options_encoding} undo the effect of @code{set_options_encoding}
and
+@code{set_options_encoding_if_not_ascii} and should always be called after
these
+functions.
+
+@item $accents_text = text_accents($accents, $encoding, $set_case)
+@anchor{Texinfo@asis{::}Convert@asis{::}Text $accents_text =
text_accents($accents@comma{} $encoding@comma{} $set_case)}
+@cindex @code{text_accents}
+
+@emph{$accents} is an accent command that may contain other nested accent
+commands. The function will format the whole stack of nested accent
+commands and the innermost text. If @emph{$encoding} is set, the formatted
+text is converted to this encoding as much as possible instead of being
+converted as simple ASCII. If @emph{$set_case} is positive, the result
+is meant to be upper-cased, if it is negative, the result is to be
+lower-cased.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Text AUTHOR
+@section Texinfo::Convert::Text AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}Text COPYRIGHT AND LICENSE
+@section Texinfo::Convert::Text COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-Unicode.texi
b/doc/tp_api/api_includes/Texinfo-Convert-Unicode.texi
new file mode 100644
index 0000000000..cb0e34f276
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-Unicode.texi
@@ -0,0 +1,151 @@
+@node Texinfo@asis{::}Convert@asis{::}Unicode
+@chapter Texinfo::Convert::Unicode
+
+@node Texinfo@asis{::}Convert@asis{::}Unicode NAME
+@section Texinfo::Convert::Unicode NAME
+
+Texinfo::Convert::Unicode - Representation as Unicode characters
+
+@node Texinfo@asis{::}Convert@asis{::}Unicode SYNOPSIS
+@section Texinfo::Convert::Unicode SYNOPSIS
+
+@verbatim
+ use Texinfo::Convert::Unicode qw(unicode_accent encoded_accents
+ unicode_text);
+ use Texinfo::Convert::Text qw(convert_to_text);
+
+ my ($contents_element, $stack)
+ = Texinfo::Convert::Utils::find_innermost_accent_contents($accent);
+
+ my $formatted_accents = encoded_accents ($converter,
+ convert_to_text($contents_element), $stack, $encoding,
+ \&Texinfo::Text::ascii_accent_fallback);
+
+ my $accent_text = unicode_accent('e', $accent_command);
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}Unicode NOTES
+@section Texinfo::Convert::Unicode NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}Unicode DESCRIPTION
+@section Texinfo::Convert::Unicode DESCRIPTION
+
+@code{Texinfo::Convert::Unicode} provides methods dealing with Unicode
+representation and conversion of Unicode code points, to be used in Texinfo
+converters.
+
+When an encoding supported in Texinfo is given as argument of a method of the
+module, the accented letters or characters returned by the method should only
+be represented by Unicode code points if it is known that Perl should manage
+to convert the Unicode code points to encoded characters in the encoding
+character set. Note that the actual conversion is done by Perl, not by the
+module.
+
+@node Texinfo@asis{::}Convert@asis{::}Unicode METHODS
+@section Texinfo::Convert::Unicode METHODS
+
+@table @asis
+@item $result = brace_no_arg_command($command_name, $encoding)
+@anchor{Texinfo@asis{::}Convert@asis{::}Unicode $result =
brace_no_arg_command($command_name@comma{} $encoding)}
+@cindex @code{brace_no_arg_command}
+
+Return the Unicode representation of a command with brace and no argument
+@emph{$command_name} (like @code{@@bullet@{@}}, @code{@@aa@{@}} or
@code{@@guilsinglleft@{@}}),
+or @code{undef} if the Unicode representation cannot be converted to encoding
+@emph{$encoding}.
+
+@item $possible_conversion = check_unicode_point_conversion($arg,
$output_debug)
+@anchor{Texinfo@asis{::}Convert@asis{::}Unicode $possible_conversion =
check_unicode_point_conversion($arg@comma{} $output_debug)}
+@cindex @code{check_unicode_point_conversion}
+
+Check that it is possible to output actual UTF-8 binary bytes
+corresponding to the Unicode code point string @emph{$arg} (such as
+@code{201D}). Perl gives a warning and will not output UTF-8 for
+Unicode non-characters such as U+10FFFF. If the optional
+@emph{$output_debug} argument is set, a debugging output warning
+is emitted if the test of the conversion failed.
+Returns 1 if the conversion is possible and can be attempted,
+0 otherwise.
+
+@item $result = encoded_accents($converter, $text, $stack, $encoding,
$format_accent, $set_case)
+@anchor{Texinfo@asis{::}Convert@asis{::}Unicode $result =
encoded_accents($converter@comma{} $text@comma{} $stack@comma{}
$encoding@comma{} $format_accent@comma{} $set_case)}
+@cindex @code{encoded_accents}
+
+@emph{$encoding} is the encoding the accented characters should be encoded to.
If
+@emph{$encoding} not set, @emph{$result} is set to @code{undef}. Nested
accents and
+their content are passed with @emph{$text} and @emph{$stack}. @emph{$text} is
the text
+appearing within nested accent commands. @emph{$stack} is an array reference
+holding the nested accents texinfo tree elements. In general, @emph{$text} is
+the formatted contents and @emph{$stack} the stack returned by
+@ref{Texinfo@asis{::}Convert@asis{::}Utils ($contents_element@comma{}
+\@@accent_commands) = find_innermost_accent_contents($element),,
Texinfo::Convert::Utils::find_innermost_accent_contents}. The function
+tries to convert as much as possible the accents to @emph{$encoding} starting
from the
+innermost accent.
+
+@emph{$format_accent} is a function reference that is used to format the accent
+commands if there is no encoded character available at some point of the
+conversion of the @emph{$stack}. @emph{$converter} is a converter object
optionaly
+used by @emph{$format_accent}. It may be @code{undef} if there is no need of
+converter object in @emph{$format_accent}.
+
+If @emph{$set_case} is positive, the result is upper-cased, while if it is
negative,
+the result is lower-cased.
+
+@item $width = string_width($string)
+@anchor{Texinfo@asis{::}Convert@asis{::}Unicode $width = string_width($string)}
+@cindex @code{string_width}
+
+Return the string width, taking into account the fact that some characters
+have a zero width (like composing accents) while some have a width of 2
+(most chinese characters, for example).
+
+@item $result = unicode_accent($text, $accent_command)
+@anchor{Texinfo@asis{::}Convert@asis{::}Unicode $result =
unicode_accent($text@comma{} $accent_command)}
+@cindex @code{unicode_accent}
+
+@emph{$text} is the text appearing within an accent command.
@emph{$accent_command}
+should be a Texinfo tree element corresponding to an accent command taking
+an argument. The function returns the Unicode representation of the accented
+character.
+
+@item $is_decoded = unicode_point_decoded_in_encoding($encoding,
$unicode_point)
+@anchor{Texinfo@asis{::}Convert@asis{::}Unicode $is_decoded =
unicode_point_decoded_in_encoding($encoding@comma{} $unicode_point)}
+@cindex @code{unicode_point_decoded_in_encoding}
+
+Return true if the @emph{$unicode_point} will be encoded in the encoding
+@emph{$encoding}. The @emph{$unicode_point} should be specified as a four
letter
+string describing an hexadecimal number with letters in upper case
+(such as @code{201D}). Tables are used to determine if the
@emph{$unicode_point}
+will be encoded, when the encoding does not cover the whole Unicode range.
+
+If the encoding is not supported in Texinfo, the result will always be false.
+
+@item $result = unicode_text($text, $in_code)
+@anchor{Texinfo@asis{::}Convert@asis{::}Unicode $result =
unicode_text($text@comma{} $in_code)}
+@cindex @code{unicode_text}
+
+Return @emph{$text} with dashes and quotes corresponding, for example to
@code{---} or
+@code{'}, represented as Unicode code points. If @emph{$in_code} is set, the
text is
+considered to be in code style.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Unicode AUTHOR
+@section Texinfo::Convert::Unicode AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}Unicode COPYRIGHT AND LICENSE
+@section Texinfo::Convert::Unicode COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Convert-Utils.texi
b/doc/tp_api/api_includes/Texinfo-Convert-Utils.texi
new file mode 100644
index 0000000000..589661b2eb
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Convert-Utils.texi
@@ -0,0 +1,175 @@
+@node Texinfo@asis{::}Convert@asis{::}Utils
+@chapter Texinfo::Convert::Utils
+
+@node Texinfo@asis{::}Convert@asis{::}Utils NAME
+@section Texinfo::Convert::Utils NAME
+
+Texinfo::Convert::Utils - miscellaneous functions usable in all converters
+
+@node Texinfo@asis{::}Convert@asis{::}Utils SYNOPSIS
+@section Texinfo::Convert::Utils SYNOPSIS
+
+@verbatim
+ use Texinfo::Convert::Utils;
+
+ my $today_tree = Texinfo::Convert::Utils::expand_today($converter);
+ my $verbatiminclude_tree
+ = Texinfo::Convert::Utils::expand_verbatiminclude($converter,
+ $verbatiminclude);
+@end verbatim
+
+@node Texinfo@asis{::}Convert@asis{::}Utils NOTES
+@section Texinfo::Convert::Utils NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Convert@asis{::}Utils DESCRIPTION
+@section Texinfo::Convert::Utils DESCRIPTION
+
+Miscellaneous methods that may be useful for backends converting Texinfo
+trees. This module contains the methods that can be used in converters
+which do not inherit from @ref{Texinfo@asis{::}Convert@asis{::}Converter
NAME,, Texinfo::Convert::Converter}.
+
+@node Texinfo@asis{::}Convert@asis{::}Utils METHODS
+@section Texinfo::Convert::Utils METHODS
+
+No method is exported in the default case.
+
+Most methods takes a @emph{$converter} as argument, in some cases optionally,
+to get some information, see
+@ref{Texinfo@asis{::}Convert@asis{::}Converter Getting and setting
customization variables}
+and use methods for error reporting, see
@ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter}
+and @ref{Texinfo@asis{::}Report NAME,, Texinfo::Report}, and for
+strings translations, see @ref{Texinfo@asis{::}Translations NAME,,
Texinfo::Translations}.
+
+Even when the caller does not inherit from
@ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter}, it
+could implement the required interfaces and could also have a converter
+available in some cases, to call the functions which require a converter.
+
+@table @asis
+@item $result = add_heading_number($converter, $heading_element,
$heading_text, $do_number)
+@anchor{Texinfo@asis{::}Convert@asis{::}Utils $result =
add_heading_number($converter@comma{} $heading_element@comma{}
$heading_text@comma{} $do_number)}
+@cindex @code{add_heading_number}
+
+The @emph{$converter} argument may be undef. @emph{$heading_element} is
+a heading command tree element. @emph{$heading_text} is the already
+formatted heading text. if the @emph{$do_number} optional argument is
+defined and false, no number is used and the text is returned as is.
+This function returns the heading with a number and the appendix
+part if needed. If @emph{$converter} is not defined, the resulting
+string won't be translated.
+
+@item ($category, $class, $type, $name, $arguments) =
definition_arguments_content($element)
+@anchor{Texinfo@asis{::}Convert@asis{::}Utils ($category@comma{}
$class@comma{} $type@comma{} $name@comma{} $arguments) =
definition_arguments_content($element)}
+@cindex @code{definition_arguments_content}
+
+@emph{$element} should be a @code{@@def*} Texinfo tree element. The
+@emph{$category}, @emph{$class}, @emph{$type}, @emph{$name} are elements
corresponding
+to the definition @@-command line. Texinfo elements
+on the @@-command line corresponding to arguments in the function
+definition are returned in the @emph{$arguments} element.
+Arguments correspond to text following the other elements
+on the @@-command line. If there is no argument, @emph{$arguments}
+will be @code{undef}.
+
+@item $tree = definition_category_tree($converter, $def_line)
+@anchor{Texinfo@asis{::}Convert@asis{::}Utils $tree =
definition_category_tree($converter@comma{} $def_line)}
+@cindex @code{definition_category_tree}
+
+The @emph{$converter} argument may be undef. @emph{$def_line} is a
+@code{def_line} Texinfo tree container. This function
+returns a Texinfo tree corresponding to the category of the
+@emph{$def_line} taking the class into account, if there is one.
+If @emph{$converter} is not defined, the resulting string won't be
+translated.
+
+@item ($encoded_name, $encoding) =
$converter->encoded_input_file_name($converter, $character_string_name,
$input_file_encoding)
+@anchor{Texinfo@asis{::}Convert@asis{::}Utils ($encoded_name@comma{}
$encoding) = $converter->encoded_input_file_name($converter@comma{}
$character_string_name@comma{} $input_file_encoding)}
+
+@item ($encoded_name, $encoding) =
$converter->encoded_output_file_name($converter, $character_string_name)
+@anchor{Texinfo@asis{::}Convert@asis{::}Utils ($encoded_name@comma{}
$encoding) = $converter->encoded_output_file_name($converter@comma{}
$character_string_name)}
+@cindex @code{encoded_input_file_name}
+@cindex @code{encoded_output_file_name}
+
+Encode @emph{$character_string_name} in the same way as other file names are
+encoded in converters, based on customization variables, and possibly
+on the input file encoding. Return the encoded name and the encoding
+used to encode the name. The @code{encoded_input_file_name} and
+@code{encoded_output_file_name} functions use different customization
variables to
+determine the encoding. The @emph{$converter} argument is not optional
+and is used both to access to customization variables and to access to parser
+information.
+
+The @emph{$input_file_encoding} argument is optional. If set, it is used for
+the input file encoding. It is useful if there is more precise information
+on the input file encoding where the file name appeared.
+
+@item $tree = expand_today($converter)
+@anchor{Texinfo@asis{::}Convert@asis{::}Utils $tree = expand_today($converter)}
+@cindex @code{expand_today}
+
+Expand today's date, as a Texinfo tree with translations. The
@emph{$converter}
+argument is not optional and is used both to retrieve customization information
+and to translate strings.
+
+@item $tree = expand_verbatiminclude($converter, $verbatiminclude)
+@anchor{Texinfo@asis{::}Convert@asis{::}Utils $tree =
expand_verbatiminclude($converter@comma{} $verbatiminclude)}
+@cindex @code{expand_verbatiminclude}
+
+The @emph{$converter} argument is required and is used to output error
messages and
+retrieve customization information
@ref{Texinfo@asis{::}Convert@asis{::}Converter Getting and
+setting customization variables}. @emph{$verbatiminclude} is a
@code{@@verbatiminclude}
+tree element. This function returns a @code{@@verbatim} tree elements after
finding
+the included file and reading it.
+
+@item ($contents_element, \@@accent_commands) =
find_innermost_accent_contents($element)
+@anchor{Texinfo@asis{::}Convert@asis{::}Utils ($contents_element@comma{}
\@@accent_commands) = find_innermost_accent_contents($element)}
+@cindex @code{find_innermost_accent_contents}
+
+@emph{$element} should be an accent command Texinfo tree element. Returns
+an element containing the innermost accent @@-command contents,
+normally a text element with one or two letter, and an array reference
+containing the accent commands nested in @emph{$element} (including
+@emph{$element}). If there is no argument at all for the accent command,
+@emph{$contents_element} is @code{undef}.
+
+@item $heading_element = find_root_command_next_heading_command($element,
$expanded_format_raw, $do_not_ignore_contents, $do_not_ignore_index_entries)
+@anchor{Texinfo@asis{::}Convert@asis{::}Utils $heading_element =
find_root_command_next_heading_command($element@comma{}
$expanded_format_raw@comma{} $do_not_ignore_contents@comma{}
$do_not_ignore_index_entries)}
+
+Return an heading element found in the @emph{$element} contents if it
+appears before contents that could be formatted. @emph{$expanded_format_raw}
+is a hash reference with raw output formats (html, docbook, xml...) as
+keys, associated value should be set for expanded raw output formats.
+@emph{$do_not_ignore_contents} is optional. If set, @code{@@contents} and
+@code{@@shortcontents} are considered to be formatted.
+@emph{$do_not_ignore_index_entries} is optional. If set, index entries
+are considered to be formatted.
+
+Only heading elements corresponding to @code{@@heading}, @code{@@subheading}
and similar
+@@-commands that are not associated to nodes in general are found, not
+sectioning commands.
+
+@end table
+
+@node Texinfo@asis{::}Convert@asis{::}Utils SEE ALSO
+@section Texinfo::Convert::Utils SEE ALSO
+
+@ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter} and @ref{Texinfo@asis{::}Translations NAME,,
Texinfo::Translations}.
+
+@node Texinfo@asis{::}Convert@asis{::}Utils AUTHOR
+@section Texinfo::Convert::Utils AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Convert@asis{::}Utils COPYRIGHT AND LICENSE
+@section Texinfo::Convert::Utils COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Document.texi
b/doc/tp_api/api_includes/Texinfo-Document.texi
new file mode 100644
index 0000000000..8ddf52eeec
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Document.texi
@@ -0,0 +1,574 @@
+@node Texinfo@asis{::}Document
+@chapter Texinfo::Document
+
+@node Texinfo@asis{::}Document NAME
+@section Texinfo::Document NAME
+
+Texinfo::Document - Texinfo document tree and information
+
+@node Texinfo@asis{::}Document SYNOPSIS
+@section Texinfo::Document SYNOPSIS
+
+@verbatim
+ use Texinfo::Parser;
+
+ my $parser = Texinfo::Parser::parser();
+ my $document = $parser->parse_texi_file("somefile.texi");
+
+ my $indices_information = $document->indices_information();
+ my $float_types_arrays = $document->floats_information();
+ my $internal_references_array
+ = $parser->internal_references_information();
+
+ # $identifier_target is an hash reference on normalized
+ # node/float/anchor names.
+ my $identifier_target = $document->labels_information();
+
+ # A hash reference, keys are @-command names, value is an
+ # array reference holding all the corresponding @-commands.
+ # Also contains dircategory and direntry list.
+ my $global_commands_information
+ = $document->global_commands_information();
+
+ # a hash reference on document information (encodings,
+ # input file name, for example).
+ my $global_information = $document->global_information();
+@end verbatim
+
+@node Texinfo@asis{::}Document NOTES
+@section Texinfo::Document NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Document DESCRIPTION
+@section Texinfo::Document DESCRIPTION
+
+This module is used to represent parsed Texinfo documents, with the Texinfo
+tree and associated information. In general a document is obtained from
+a Texinfo parser call, there is no need to setup the document.
+
+@node Texinfo@asis{::}Document METHODS
+@section Texinfo::Document METHODS
+
+@node Texinfo@asis{::}Document Getting document information
+@subsection Getting document information
+
+The main purpose of Texinfo::Document methods is to retrieve information
+on a Texinfo document.
+
+The Texinfo tree obtained by parsing a Texinfo document is available through
+@code{tree}:
+
+@table @asis
+@item $tree = tree($document, $handler_only)
+@anchor{Texinfo@asis{::}Document $tree = tree($document@comma{} $handler_only)}
+@cindex @code{tree}
+
+The @emph{$tree} is a hash reference. It is described in
+@ref{Texinfo@asis{::}Parser TEXINFO TREE}.
+
+If @emph{$handler_only} is set and XS extensions are used, the returned
+tree holds a reference to the C Texinfo tree data only, but no actual
+Perl Texinfo tree. This avoids building the Perl tree if all the
+functions called with the tree as argument have XS interfaces and
+directly use the C data and do not use the Perl tree.
+
+@end table
+
+Some global information is available through @code{global_information}:
+
+@table @asis
+@item $info = global_information($document)
+@anchor{Texinfo@asis{::}Document $info = global_information($document)}
+@cindex @code{global_information}
+
+The @emph{$info} returned is a hash reference. The possible keys are
+
+@table @asis
+@item included_files
+@anchor{Texinfo@asis{::}Document included_files}
+
+An array of included file paths as they appear in the document. Binary
+strings. From both @code{@@include} and @code{@@verbatiminclude}.
+
+@item input_encoding_name
+@anchor{Texinfo@asis{::}Document input_encoding_name}
+
+@item input_perl_encoding
+@anchor{Texinfo@asis{::}Document input_perl_encoding}
+
+@code{input_encoding_name} string is the encoding name used for the
+Texinfo code.
+@code{input_perl_encoding} string is a corresponding Perl encoding name.
+
+@item input_file_name
+@anchor{Texinfo@asis{::}Document input_file_name}
+
+@item input_directory
+@anchor{Texinfo@asis{::}Document input_directory}
+
+The name of the main Texinfo input file and the associated directory.
+Binary strings. In @code{texi2any}, they should come from the command line
+(and can be decoded with the encoding in the customization variable
+@code{COMMAND_LINE_ENCODING}).
+
+@end table
+
+@end table
+
+Some command lists are available, such that it is possible to go through
+the corresponding tree elements without walking the tree. They are
+available through @code{global_commands_information}:
+
+@table @asis
+@item $commands = global_commands_information($document)
+@anchor{Texinfo@asis{::}Document $commands =
global_commands_information($document)}
+@cindex @code{global_commands_information}
+
+@emph{$commands} is an hash reference. The keys are @@-command names. The
+associated values are array references containing all the corresponding
+tree elements.
+
+The following list of commands is also available as a key:
+
+@table @asis
+@item dircategory_direntry
+@anchor{Texinfo@asis{::}Document dircategory_direntry}
+
+An array of successive @code{@@dircategory} and @code{@@direntry} as they
appear
+in the document.
+
+@end table
+
+@end table
+
+All the @@-commands that have an associated label (so can be the
+target of cross references) @asis{}-@asis{}-@asis{} @code{@@node},
@code{@@anchor} and @code{@@float} with
+label @asis{}-@asis{}-@asis{} have a normalized name associated, constructed
as described in the
+@emph{HTML Xref} node in the Texinfo documentation. Those normalized labels
and
+the association with @@-commands is available through
@code{labels_information}:
+
+@table @asis
+@item $identifier_target = labels_information($document)
+@anchor{Texinfo@asis{::}Document $identifier_target =
labels_information($document)}
+@cindex @code{labels_information}
+
+@emph{$identifier_target} is a hash reference whose keys are normalized
+labels, and the associated value is the corresponding @@-command.
+
+@item $labels_list = labels_list ($document)
+@anchor{Texinfo@asis{::}Document $labels_list = labels_list ($document)}
+@cindex @code{labels_list}
+
+@emph{$labels_list} is a list of Texinfo tree command elements that
+could be the target of cross references.
+
+@end table
+
+Information on @code{@@float} grouped by type of floats, each type
corresponding
+to potential @code{@@listoffloats} is available through
@code{floats_information}.
+
+@table @asis
+@item $float_types = floats_information($document)
+@anchor{Texinfo@asis{::}Document $float_types = floats_information($document)}
+@cindex @code{floats_information}
+
+@emph{$float_types} is a hash reference whose keys are normalized float
+types (the first float argument, or the @code{@@listoffloats} argument).
+The normalization is the same as for the first step of node names
+normalization. The value is the list of float tree elements appearing
+in the texinfo document.
+
+@end table
+
+Internal references, nodes and section lists may also be available.
+
+@table @asis
+@item $internal_references_array = internal_references_information($document)
+@anchor{Texinfo@asis{::}Document $internal_references_array =
internal_references_information($document)}
+@cindex @code{internal_references_information}
+
+The function returns an array reference of cross-reference commands referring
+to the same document with @@-commands that refer to node, anchors or floats.
+
+@item $nodes_list = nodes_list($document)
+@anchor{Texinfo@asis{::}Document $nodes_list = nodes_list($document)}
+
+Returns an array reference containing the document nodes. In general set to
+the nodes list returned by @ref{Texinfo@asis{::}Structuring $nodes_list =
nodes_tree($document),, Texinfo::Structuring
+nodes_tree}, by a call
+to @ref{Texinfo@asis{::}Document register_document_nodes_list
($document@comma{}
+$nodes_list),, register_document_nodes_list}.
+
+@item $sections_list = sections_list($document)
+@anchor{Texinfo@asis{::}Document $sections_list = sections_list($document)}
+
+Returns an array reference containing the document sections. In general set
to the sections list returned by
+@ref{Texinfo@asis{::}Structuring $sections_list =
sectioning_structure($document),, Texinfo::Structuring sectioning_structure},
+by a call to @ref{Texinfo@asis{::}Document register_document_sections_list
($document@comma{} $sections_list),, register_document_sections_list}.
+
+@end table
+
+Information about defined indices, indices merging and index entries is
+available through @code{indices_information}.
+
+@table @asis
+@item $indices_information = $document->indices_information()
+@anchor{Texinfo@asis{::}Document $indices_information =
$document->indices_information()}
+@cindex @code{indices_information}
+
+@emph{$indices_information} is a hash reference. The keys are
+
+@table @asis
+@item in_code
+@anchor{Texinfo@asis{::}Document in_code}
+
+1 if the index entries should be formatted as code, 0 in the opposite case.
+
+@item name
+@anchor{Texinfo@asis{::}Document name}
+
+The index name.
+
+@item prefix
+@anchor{Texinfo@asis{::}Document prefix}
+
+An array reference of prefix associated to the index.
+
+@item merged_in
+@anchor{Texinfo@asis{::}Document merged_in}
+
+In case the index is merged to another index, this key holds the name of
+the index the index is merged into. It takes into account indirectly
+merged indices.
+
+@item index_entries
+@anchor{Texinfo@asis{::}Document index_entries}
+
+An array reference containing index entry structures for index entries
+associated with the index. The index entry could be associated to
+@@-commands like @code{@@cindex}, or @code{@@item} in @code{@@vtable}, or
definition
+commands entries like @code{@@deffn}.
+
+The keys of the index entry structures are
+
+@table @asis
+@item index_name
+@anchor{Texinfo@asis{::}Document index_name}
+
+The index name associated to the command. Not modified if the corresponding
+index is merged in another index (with @code{@@synindex}, for example).
+
+@item entry_element
+@anchor{Texinfo@asis{::}Document entry_element}
+
+The element in the parsed tree associated with the @@-command holding the
+index entry.
+
+@item entry_number
+@anchor{Texinfo@asis{::}Document entry_number}
+
+The number of the index entry.
+
+@end table
+
+@end table
+
+The following shows the references corresponding to the default indexes
+@emph{cp} and @emph{fn}, the @emph{fn} index having its entries formatted as
code and
+the indices corresponding to the following texinfo
+
+@verbatim
+ @defindex some
+ @defcodeindex code
+
+ $index_names = {'cp' => {'name' => 'cp', 'in_code' => 0, },
+ 'fn' => {'name' => 'fn', 'in_code' => 1, },
+ 'some' => {'in_code' => 0},
+ 'code' => {'in_code' => 1}};
+@end verbatim
+
+If @code{name} is not set, it is set to the index name.
+
+@end table
+
+@node Texinfo@asis{::}Document Merging and sorting indices
+@subsection Merging and sorting indices
+
+Merged and sorted document indices are also available. Parsed indices
+are not merged nor sorted, @ref{Texinfo@asis{::}Indices NAME,,
Texinfo::Indices} functions are
+called to merge or sort the indices the first time the following
+methods are called. The results are afterwards associated to the
+document and simply returned.
+
+In general, those methods should not be called directly, instead
+@ref{Texinfo@asis{::}Convert@asis{::}Converter Index sorting} Converter
methods should be
+used, which already call the following functions.
+
+@table @asis
+@item $merged_indices = $document->merged_indices()
+@anchor{Texinfo@asis{::}Document $merged_indices = $document->merged_indices()}
+@cindex @code{merged_indices}
+
+Merge indices if needed and return merged indices. The @emph{$merged_indices}
+returned is a hash reference whose keys are the index names and values arrays
+of index entry structures described in @ref{Texinfo@asis{::}Document
index_entries,, index_entries}.
+
+@ref{Texinfo@asis{::}Indices $merged_indices =
merge_indices($indices_information),, @code{Texinfo::Indices::merge_indices}}
+is used to merge the indices.
+
+In general, it is not useful to call this function directly, as it is already
+called by index sorting functions.
+
+@item $sorted_indices =
$document->sorted_indices_by_index($customization_information,
$use_unicode_collation, $locale_lang)
+@anchor{Texinfo@asis{::}Document $sorted_indices =
$document->sorted_indices_by_index($customization_information@comma{}
$use_unicode_collation@comma{} $locale_lang)}
+
+@item $sorted_indices =
$document->sorted_indices_by_letter($customization_information,
$use_unicode_collation, $locale_lang)
+@anchor{Texinfo@asis{::}Document $sorted_indices =
$document->sorted_indices_by_letter($customization_information@comma{}
$use_unicode_collation@comma{} $locale_lang)}
+@cindex @code{sorted_indices_by_index}
+@cindex @code{sorted_indices_by_letter}
+
+@code{sorted_indices_by_letter} returns the indices sorted by index and letter,
+while @code{sorted_indices_by_index} returns the indices with all entries
+of an index together.
+
+By default, indices are sorted according to the @emph{Unicode Collation
Algorithm}
+defined in the @url{http://www.unicode.org/reports/tr10/, Unicode Technical
Standard
+#10}, without language-specific collation
+tailoring. If @emph{$use_unicode_collation} is set to 0, the sorting will not
use
+the @emph{Unicode Collation Algorithm} and simply sort according to the
codepoints.
+If @emph{$locale_lang} is set, the language is used for linguistic tailoring
of the
+sorting, if possible.
+
+When sorting by letter, an array reference of letter hash references is
+associated with each index name. Each letter hash reference has two
+keys, a @emph{letter} key with the letter, and an @emph{entries} key with an
array
+reference of sorted index entries beginning with the letter. The letter
+is a character string suitable for sorting letters, but is not necessarily
+the best to use for output.
+
+When simply sorting, the array of the sorted index entries is associated
+with the index name.
+
+The optional @emph{$customization_information} argument is used for
+error reporting, both to find the @ref{Texinfo@asis{::}Report NAME,,
Texinfo::Report} object to use for error
+reporting and Texinfo customization variables information. In general, it
+should be a converter (@ref{Texinfo@asis{::}Convert@asis{::}Converter Getting
and setting
+customization variables}) or a document @ref{Texinfo@asis{::}Document Getting
+customization options values registered in document}).
+
+@ref{Texinfo@asis{::}Indices $index_entries_sorted =
sort_indices_by_index($document@comma{} $registrar@comma{}
$customization_information@comma{} $use_unicode_collation@comma{}
$locale_lang),, @code{Texinfo::Indices::sort_indices_by_index}}
+and @ref{Texinfo@asis{::}Indices $index_entries_sorted =
sort_indices_by_letter($document@comma{} $registrar@comma{}
$customization_information@comma{} $use_unicode_collation@comma{}
$locale_lang),, @code{Texinfo::Indices::sort_indices_by_letter}}
+are used to sort the indices, if needed.
+
+In general, those methods should not be called directly, instead
+@ref{Texinfo@asis{::}Convert@asis{::}Converter $sorted_indices =
$converter->get_converter_indices_sorted_by_index(),,
@code{Texinfo::Convert::Converter::get_converter_indices_sorted_by_index}}
+and @ref{Texinfo@asis{::}Convert@asis{::}Converter $sorted_indices =
$converter->get_converter_indices_sorted_by_letter(),,
@code{Texinfo::Convert::Converter::get_converter_indices_sorted_by_letter}}
+should be used. The @code{Texinfo::Convert::Converter} methods call
+@code{sorted_indices_by_index} and @code{sorted_indices_by_letter}.
+
+@end table
+
+@node Texinfo@asis{::}Document Getting errors and error registering object
+@subsection Getting errors and error registering object
+
+A document has a @ref{Texinfo@asis{::}Report NAME,, Texinfo::Report} objet
associated, that is used to
+register errors and warning messages in. To get the errors registered
+in the document, the @code{errors} method should be called.
+It is also possible to get the document associated @code{Texinfo::Report} objet
+by calling the @code{registrar} accessor method.
+
+@table @asis
+@item $registrar = registrar($document)
+@anchor{Texinfo@asis{::}Document $registrar = registrar($document)}
+
+Returns the @code{Texinfo::Report} object associated with the @emph{$document}.
+
+In general, this is not needed as most functions use the document associated
+@code{Texinfo::Report} object automatically. However, for some functions a
+@code{Texinfo::Report} object is passed in argument, being able to
+get the document registrar object is interesting in those cases.
+
+@item ($error warnings list, $error count) = errors($document)
+@anchor{Texinfo@asis{::}Document ($error warnings list@comma{} $error count) =
errors($document)}
+
+This function returns as @emph{$error_count} the count of errors since setting
+up the @emph{$document} (or calling the function). The returned
+@emph{$error_warnings_list} is an array of hash references
+one for each error, warning or error line continuation. The format of
+these hash references is described
+in @ref{Texinfo@asis{::}Report ($error_warnings_list@comma{} $error_count) =
errors($registrar),, @code{Texinfo::Report::errors}}.
+
+@end table
+
+@node Texinfo@asis{::}Document Getting customization options values registered
in document
+@subsection Getting customization options values registered in document
+
+By default, customization information is registered in a document object
+just after parsing the Texinfo code. Structuring and tree transformation
+methods then get customization variables values from the document object
+they have in argument. The customization variables set by default may be a
+subset selected to be useful for structuring and tree transformation codes.
+
+To retrieve Texinfo customization variables you can call @code{get_conf}:
+
+@table @asis
+@item $value = $document->get_conf($variable_name)
+@anchor{Texinfo@asis{::}Document $value = $document->get_conf($variable_name)}
+
+Returns the value of the Texinfo customization variable @emph{$variable_name}
+(possibly @code{undef}), if the variable value was registered in the document,
+or @code{undef}.
+
+@end table
+
+@node Texinfo@asis{::}Document Registering document and information in document
+@subsection Registering document and information in document
+
+The setup of a document is described next, it should only be used in
+parsers codes.
+
+@table @asis
+@item $document = Texinfo::Document::register($tree, $global_information,
$indices_information, $floats_information, $internal_references_information,
$global_commands_information, $identifier_target, $labels_list,
$parser_registrar)
+@anchor{Texinfo@asis{::}Document $document =
Texinfo@asis{::}Document@asis{::}register($tree@comma{}
$global_information@comma{} $indices_information@comma{}
$floats_information@comma{} $internal_references_information@comma{}
$global_commands_information@comma{} $identifier_target@comma{}
$labels_list@comma{} $parser_registrar)}
+
+Setup a document. There is no reason to call this method out of parsers, as
+it is already done by the Texinfo parsers. The arguments are gathered
+during parsing and correspond to information returned by the other methods.
+
+@end table
+
+Further information can be registered in the document.
+
+@table @asis
+@item register_document_nodes_list ($document, $nodes_list)
+@anchor{Texinfo@asis{::}Document register_document_nodes_list
($document@comma{} $nodes_list)}
+@cindex @code{register_document_nodes_list}
+
+Register the @emph{$nodes_list} array reference as @emph{$document} nodes
+list. This method should be called after the processing of document
+structure.
+
+@item register_document_options ($document, $options)
+@anchor{Texinfo@asis{::}Document register_document_options ($document@comma{}
$options)}
+@cindex @code{register_document_options}
+
+The @emph{$options} hash reference holds options for the document. These
options
+should be Texinfo customization options. Usually, the options registered in
+the document contain those useful for structuring and tree transformation
+getting place between Texinfo code parsing and conversion to output formats.
+Indeed, document customization options are mainly accessed by structuring and
+tree transformation methods (by calling @ref{Texinfo@asis{::}Document $value =
$document->get_conf($variable_name),, @code{get_conf}}). The options should in
general be registered before
+the calls to @code{get_conf}.
+
+@item register_document_sections_list ($document, $sections_list)
+@anchor{Texinfo@asis{::}Document register_document_sections_list
($document@comma{} $sections_list)}
+@cindex @code{register_document_sections_list}
+
+Register the @emph{$sections_list} array reference as @emph{$document} sections
+list. This method should be called after the processing of document
+structure.
+
+@item set_document_global_info($document, $key, $value)
+@anchor{Texinfo@asis{::}Document set_document_global_info($document@comma{}
$key@comma{} $value)}
+@cindex @code{set_document_global_info}
+
+Add @emph{$value} @emph{$key} global information to @emph{$document}. This
method
+should not be generally useful, as document global information is already
+set by the Texinfo parser. The information set should be available through
+the next calls to @ref{Texinfo@asis{::}Document $info =
global_information($document),, global_information}.
+The method should in general be called before the calls to
+@code{global_information}.
+
+@end table
+
+@node Texinfo@asis{::}Document Methods for Perl and C code interactions
+@subsection Methods for Perl and C code interactions
+
+The parsing of Texinfo code, structuring and transformations of the tree
+called through Texinfo Perl modules may be done by pure Perl modules or
+by C code called through XS interfaces. In general, it makes no difference
+whether pure Perl or C code is used. When the document and tree are
+modified by C code, the Perl structures are automatically rebuilt when
+calling the accessors described previously. In some cases, however, specific
+functions need to be called to pass information from C to Perl or perform
+actions related to C data.
+
+The methods can always be called on pure Perl modules even if they do nothing.
+Therefore it is, in general, better to call them assuming that modules
+setting up C data were called, even when it is not the case.
+
+First, @code{document_descriptor} can be called to get the document identifier
+document used by C code to retrieve the document data in C. In general
+this identifier is directly and transparently taken from the document, but may
+need to be set on other objects in rare cases.
+
+@table @asis
+@item $document_descriptor = $document->document_descriptor()
+@anchor{Texinfo@asis{::}Document $document_descriptor =
$document->document_descriptor()}
+@cindex @code{document_descriptor}
+
+Returns the document descriptor if the document is available as C data,
+0 or @code{undef} if not.
+
+@end table
+
+When the tree is directly accessed in Perl (not through a document)
+but is modified by C code, for instance called through
@ref{Texinfo@asis{::}Common NAME,, Texinfo::Common} or
+@ref{Texinfo@asis{::}Transformations NAME,, Texinfo::Transformations} methods,
the Perl structures need to be rebuilt
+from the C data with @code{rebuild_tree}:
+
+@table @asis
+@item $rebuilt_tree = rebuild_tree($tree, $no_store)
+@anchor{Texinfo@asis{::}Document $rebuilt_tree = rebuild_tree($tree@comma{}
$no_store)}
+@cindex @code{rebuild_tree}
+
+Return a @emph{$rebuilt_tree}, rebuilt from C data if needed. If there
+is no C data, the tree is returned as is. The tree rebuilt is
+based on the Texinfo parsed document associated to the Texinfo
+tree @emph{$tree}.
+
+If the optional @emph{$no_store} argument is set, remove the C data.
+
+@end table
+
+Note that the Perl tree associated to a document is rebuilt from C data
+when calling @code{$document->tree()}. Similarly, the tree is rebuilt when
+calling other accessors that depend on the document tree. Therefore
+@code{rebuild_tree} should only be called when there is no document associated
to a
+tree and @code{$document->tree()} cannot be called to rebuild the tree.
+
+Some methods allow to release the memory held by C data associated
+to a Texinfo parsed document:
+
+@table @asis
+@item remove_document($document)
+@anchor{Texinfo@asis{::}Document remove_document($document)}
+@cindex @code{remove_document}
+
+Remove the C data corresponding to @emph{$document}.
+
+@end table
+
+@node Texinfo@asis{::}Document SEE ALSO
+@section Texinfo::Document SEE ALSO
+
+@ref{Texinfo@asis{::}Parser NAME,, Texinfo::Parser}.
@ref{Texinfo@asis{::}Structuring NAME,, Texinfo::Structuring}.
+
+@node Texinfo@asis{::}Document AUTHOR
+@section Texinfo::Document AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Document COPYRIGHT AND LICENSE
+@section Texinfo::Document COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Indices.texi
b/doc/tp_api/api_includes/Texinfo-Indices.texi
new file mode 100644
index 0000000000..bb51d243b0
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Indices.texi
@@ -0,0 +1,196 @@
+@node Texinfo@asis{::}Indices
+@chapter Texinfo::Indices
+
+@node Texinfo@asis{::}Indices NAME
+@section Texinfo::Indices NAME
+
+Texinfo::Indices - merging and sorting indices from Texinfo
+
+@node Texinfo@asis{::}Indices SYNOPSIS
+@section Texinfo::Indices SYNOPSIS
+
+@verbatim
+ use Texinfo::Indices;
+
+ # $document is a parsed Texinfo::Document document.
+ my $indices_information = $document->indices_information();
+ my $merged_index_entries
+ = Texinfo::Indices::merge_indices($indices_information);
+
+ # $registrar is a Texinfo::Report object. $config is an object
+ # implementing the get_conf() method.
+ my $index_entries_sorted;
+ if ($sort_by_letter) {
+ $index_entries_sorted
+ = Texinfo::Indices::sort_indices_by_letter($document, $registrar,
+ $config);
+ } else {
+ $index_entries_sorted
+ = Texinfo::Indices::sort_indices_by_index($document, $registrar,
+ $config);
+ }
+@end verbatim
+
+@node Texinfo@asis{::}Indices NOTES
+@section Texinfo::Indices NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Indices DESCRIPTION
+@section Texinfo::Indices DESCRIPTION
+
+@code{merge_indices} may be used to merge indices. Document indices may be
sorted
+with @code{sort_indices_by_index} or @code{sort_indices_by_letter}. Other
functions
+deal with formatting of index entries as text or getting information on
+index entry.
+
+Note that, in general, the functions used to merge or sort indices
+should not be called directly, corresponding functions
+in @ref{Texinfo@asis{::}Document NAME,, Texinfo::Document} already call the
functions in this module, and,
+in addition, cache the result with the document. Furthermore, it should
+be even better to call converter functions, which call document functions.
+
+@node Texinfo@asis{::}Indices METHODS
+@section Texinfo::Indices METHODS
+
+No method is exported.
+
+@table @asis
+@item $sort_string = index_entry_element_sort_string($document_info,
$main_entry, $index_entry_element, $options, $prefer_reference_element)
+@anchor{Texinfo@asis{::}Indices $sort_string =
index_entry_element_sort_string($document_info@comma{} $main_entry@comma{}
$index_entry_element@comma{} $options@comma{} $prefer_reference_element)}
+@cindex @code{index_entry_element_sort_string}
+
+Return a string suitable as a sort string, for index entries.
+@emph{$document_info} is used by C code to retrieve the document data,
+using the @code{document_descriptor} key. @emph{$document_info} can be a
+converter based on @ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter}, a @ref{Texinfo@asis{::}Document NAME,,
Texinfo::Document}
+document, otherwise @code{document_descriptor} need, in general, to be
+set up explicitely.
+
+The tree element index entry processed is @emph{$index_entry_element},
+and can be a @code{@@subentry}. @emph{$main_entry} is the main index entry
+that can be used to gather information.
+
+The @emph{$options} are options used for Texinfo to text conversion for the
+generation of the sort string. If the sort string is supposed to be output,
+the @emph{$options} are typically obtained from
+@ref{Texinfo@asis{::}Indices $option =
setup_index_entry_keys_formatting($customization_information),,
setup_index_entry_keys_formatting}.
+
+If @emph{$prefer_reference_element} is set, prefer an untranslated
+element for the formatting as sort string.
+
+@item ($text, $command) =
index_entry_first_letter_text_or_command($index_entry)
+@anchor{Texinfo@asis{::}Indices ($text@comma{} $command) =
index_entry_first_letter_text_or_command($index_entry)}
+
+Return the @emph{$index_entry} leading text @emph{$text} or textual command
Texinfo
+tree hash reference @emph{$command}. Here textual commands means accent
+commands, brace commands without arguments used for character and glyph
+insertion and @code{@@U}.
+
+This method can in particular be used to format the leading letter
+of an index entry using @emph{$command} instead of the sort string set by
+@code{sort_indices_by_letter}.
+
+@item $merged_indices = merge_indices($indices_information)
+@anchor{Texinfo@asis{::}Indices $merged_indices =
merge_indices($indices_information)}
+@cindex @code{merge_indices}
+
+Returns a structure holding all the index entries by index name
+with all the entries of merged indices merged with those of the indice
+merged into. The @emph{$indices_information} argument should be an hash
reference
+with indices information, it is described in details in
+@ref{Texinfo@asis{::}Document $indices_information =
$document->indices_information(),,
@code{Texinfo::Document::indices_information}}.
+
+The @emph{$merged_indices} returned is a hash reference whose
+keys are the index names and values arrays of index entry structures
+described in details in @ref{Texinfo@asis{::}Document index_entries}.
+
+In general, this method should not be called directly, instead
+@ref{Texinfo@asis{::}Document $merged_indices = $document->merged_indices(),,
@code{Texinfo::Document::merged_indices}}
+should be called on a document, which calls @code{merge_indices} if needed and
+associate the merged indices to the document.
+
+@item $option = setup_index_entry_keys_formatting($customization_information)
+@anchor{Texinfo@asis{::}Indices $option =
setup_index_entry_keys_formatting($customization_information)}
+@cindex @code{setup_index_entry_keys_formatting}
+
+Return options relevant for index keys sorting for conversion of Texinfo
+to text to be output.
+
+@item $index_entries_sorted = sort_indices_by_index($document, $registrar,
$customization_information, $use_unicode_collation, $locale_lang)
+@anchor{Texinfo@asis{::}Indices $index_entries_sorted =
sort_indices_by_index($document@comma{} $registrar@comma{}
$customization_information@comma{} $use_unicode_collation@comma{} $locale_lang)}
+
+@item $index_entries_sorted = sort_indices_by_letter($document, $registrar,
$customization_information, $use_unicode_collation, $locale_lang)
+@anchor{Texinfo@asis{::}Indices $index_entries_sorted =
sort_indices_by_letter($document@comma{} $registrar@comma{}
$customization_information@comma{} $use_unicode_collation@comma{} $locale_lang)}
+@cindex @code{sort_indices_by_index}
+@cindex @code{sort_indices_by_letter}
+
+@code{sort_indices_by_letter} sorts by index and letter, while
+@code{sort_indices_by_index} sort all entries of an index together.
+Indices are obtained from @emph{$document}, and should have been merged
+previously, in general by using
+@ref{Texinfo@asis{::}Document $merged_indices = $document->merged_indices(),,
@code{Texinfo::Document::merged_indices}}.
+In both cases, a hash reference with index names as keys
@emph{$index_entries_sorted}
+is returned.
+
+By default, indices are sorted according to the @emph{Unicode Collation
Algorithm}
+defined in the @url{http://www.unicode.org/reports/tr10/, Unicode Technical
Standard
+#10}, without language-specific collation
+tailoring. If @emph{$use_unicode_collation} is set to 0, the sorting will not
use
+the @emph{Unicode Collation Algorithm} and simply sort according to the
codepoints.
+If @emph{$locale_lang} is set, the language is used for linguistic tailoring
of the
+sorting, if possible.
+
+When sorting by letter, an array reference of letter hash references is
+associated with each index name. Each letter hash reference has two
+keys, a @emph{letter} key with the letter, and an @emph{entries} key with an
array
+reference of sorted index entries beginning with the letter. The letter
+is a character string suitable for sorting letters, but is not necessarily
+the best to use for output.
+
+When simply sorting, the array of the sorted index entries is associated
+with the index name.
+
+The @emph{$registrar} argument can be set to a @ref{Texinfo@asis{::}Report
NAME,, Texinfo::Report} object.
+Error reporting also requires Texinfo customization variables
+information, which means an object implementing the @code{get_conf} method, a
+converter (@ref{Texinfo@asis{::}Convert@asis{::}Converter Getting and setting
customization
+variables}) or a document @ref{Texinfo@asis{::}Document Getting customization
options
+values registered in document}) as @emph{$customization_information} argument.
If
+the @emph{$registrar} argument is not set, the object used to get customization
+information is assumed to be a converter, and the error reporting uses
+converters error messages reporting functions
+(@ref{Texinfo@asis{::}Convert@asis{::}Converter Registering error and warning
messages}).
+
+In general, those methods should not be called directly, instead
+@ref{Texinfo@asis{::}Document $sorted_indices =
$document->sorted_indices_by_index($customization_information@comma{}
$use_unicode_collation@comma{} $locale_lang),,
@code{Texinfo::Document::sorted_indices_by_index}}
+or @ref{Texinfo@asis{::}Document $sorted_indices =
$document->sorted_indices_by_letter($customization_information@comma{}
$use_unicode_collation@comma{} $locale_lang),,
@code{Texinfo::Document::sorted_indices_by_letter}}
+should be called on a document. The @code{Texinfo::Document} functions call
+@code{sort_indices_by_index} or @code{sort_indices_by_letter} if needed and
associate
+the sorted indices to the document.
+
+@end table
+
+@node Texinfo@asis{::}Indices SEE ALSO
+@section Texinfo::Indices SEE ALSO
+
+@url{http://www.gnu.org/s/texinfo/manual/texinfo/, Texinfo manual},
+@ref{Texinfo@asis{::}Document NAME,, Texinfo::Document}.
+
+@node Texinfo@asis{::}Indices AUTHOR
+@section Texinfo::Indices AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Indices COPYRIGHT AND LICENSE
+@section Texinfo::Indices COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-ManipulateTree.texi
b/doc/tp_api/api_includes/Texinfo-ManipulateTree.texi
new file mode 100644
index 0000000000..87854df614
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-ManipulateTree.texi
@@ -0,0 +1,105 @@
+@node Texinfo@asis{::}ManipulateTree
+@chapter Texinfo::ManipulateTree
+
+@node Texinfo@asis{::}ManipulateTree NAME
+@section Texinfo::ManipulateTree NAME
+
+Texinfo::ManipulateTree - Texinfo modules common tree manipulation functions
+
+@node Texinfo@asis{::}ManipulateTree SYNOPSIS
+@section Texinfo::ManipulateTree SYNOPSIS
+
+@verbatim
+ use Texinfo::ManipulateTree;
+@end verbatim
+
+@node Texinfo@asis{::}ManipulateTree NOTES
+@section Texinfo::ManipulateTree NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}ManipulateTree DESCRIPTION
+@section Texinfo::ManipulateTree DESCRIPTION
+
+@code{Texinfo::ManipulateTree} contains methods for copying and modifying the
+Texinfo tree used for default conversion to output formats.
+
+For optional tree transformation, see @ref{Texinfo@asis{::}Transformations
NAME,, Texinfo::Transformations}.
+
+@node Texinfo@asis{::}ManipulateTree METHODS
+@section Texinfo::ManipulateTree METHODS
+
+The Texinfo tree and Texinfo tree elements used in argument of some functions
+are documented in @ref{Texinfo@asis{::}Parser TEXINFO TREE}. When
customization
+information is needed, an object that defines @code{get_conf} is
+expected, normally a @ref{Texinfo@asis{::}Document Getting customization
+options values registered in document} object.
+
+@table @asis
+@item move_index_entries_after_items_in_tree($tree)
+@anchor{Texinfo@asis{::}ManipulateTree
move_index_entries_after_items_in_tree($tree)}
+@cindex @code{move_index_entries_after_items_in_tree}
+
+In @code{@@enumerate} and @code{@@itemize} from the tree, move index entries
+appearing just before @code{@@item} after the @code{@@item}. Comment lines
+between index entries are moved too.
+
+@item protect_colon_in_tree($tree)
+@anchor{Texinfo@asis{::}ManipulateTree protect_colon_in_tree($tree)}
+
+@item protect_node_after_label_in_tree($tree)
+@anchor{Texinfo@asis{::}ManipulateTree protect_node_after_label_in_tree($tree)}
+@cindex @code{protect_colon_in_tree}
+@cindex @code{protect_node_after_label_in_tree}
+
+Protect colon with @code{protect_colon_in_tree} and characters that
+are special in node names after a label in menu entries (tab
+dot and comma) with @code{protect_node_after_label_in_tree}.
+The protection is achieved by putting protected characters
+in @code{@@asis@{@}}.
+
+@item protect_comma_in_tree($tree)
+@anchor{Texinfo@asis{::}ManipulateTree protect_comma_in_tree($tree)}
+@cindex @code{protect_comma_in_tree}
+
+Protect comma characters, replacing @code{,} with @@comma@{@} in tree.
+
+@item protect_first_parenthesis($element)
+@anchor{Texinfo@asis{::}ManipulateTree protect_first_parenthesis($element)}
+@cindex @code{protect_first_parenthesis}
+
+Modify @emph{$element} contents by protecting the first parenthesis.
+If @emph{$element} is undef a fatal error with a backtrace will be emitted.
+
+@item relate_index_entries_to_table_items_in_tree($document)
+@anchor{Texinfo@asis{::}ManipulateTree
relate_index_entries_to_table_items_in_tree($document)}
+@cindex @code{relate_index_entries_to_table_items_in_tree}
+
+In tables, relate index entries preceding and following an
+entry with said item. Reference one of them in the entry's
+@code{entry_associated_element}.
+
+@end table
+
+@node Texinfo@asis{::}ManipulateTree SEE ALSO
+@section Texinfo::ManipulateTree SEE ALSO
+
+@ref{Texinfo@asis{::}Document NAME,, Texinfo::Document},
@ref{Texinfo@asis{::}Structuring NAME,, Texinfo::Structuring},
@ref{Texinfo@asis{::}Transformations NAME,, Texinfo::Transformations}.
+
+@node Texinfo@asis{::}ManipulateTree AUTHOR
+@section Texinfo::ManipulateTree AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}ManipulateTree COPYRIGHT AND LICENSE
+@section Texinfo::ManipulateTree COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-OutputUnits.texi
b/doc/tp_api/api_includes/Texinfo-OutputUnits.texi
new file mode 100644
index 0000000000..cfcc310569
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-OutputUnits.texi
@@ -0,0 +1,305 @@
+@node Texinfo@asis{::}OutputUnits
+@chapter Texinfo::OutputUnits
+
+@node Texinfo@asis{::}OutputUnits NAME
+@section Texinfo::OutputUnits NAME
+
+Texinfo::OutputUnits - setup and manage Texinfo document output units
+
+@node Texinfo@asis{::}OutputUnits SYNOPSIS
+@section Texinfo::OutputUnits SYNOPSIS
+
+@verbatim
+ use Texinfo::OutputUnits qw(split_by_node split_by_section split_pages
+ units_directions units_file_directions);
+
+ # $document is a parsed Texinfo::Document document.
+ # When customization variables information is needed, it is obtained
+ # from the $document by calling the get_conf() method.
+ my $identifier_target = $document->labels_information();
+ my $output_units;
+ if ($split_at_nodes) {
+ $output_units = split_by_node($document);
+ } else {
+ $output_units = split_by_section($document);
+ }
+ split_pages($output_units, $split);
+ units_directions($identifier_target, $output_units,
+ $document->get_conf('DEBUG'));
+ units_file_directions($output_units);
+@end verbatim
+
+@node Texinfo@asis{::}OutputUnits NOTES
+@section Texinfo::OutputUnits NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}OutputUnits DESCRIPTION
+@section Texinfo::OutputUnits DESCRIPTION
+
+You can convert a Texinfo parsed document to an output format in a Converter
+code by first splitting the nodes and sectioning commands in units and then
+converting those units. We will call the main unit of output documents an
+@emph{output unit}. Usually a node is associated with a following sectioning
+command, while a sectioning command is associated with a previous node; they
+both together make up the output unit. Either the node or the sectioning
+command is considered to be the main element component.
+
+The module provides methods to setup output units associated with
+node and sectioning commands of a Texinfo parsed document. With
+@code{split_by_node} nodes are used as the main component for the separation of
+output units, while with @code{split_by_section} the sectioning command
elements
+are used to separate output units. The first mode is typical of Info format,
+while the second corresponds better to a traditional book. Note that the
+result is different when there are unassociated sectioning commands or nodes,
+in the usual case of each node being associated with a sectioning command and
+each sectioning command being associated with a node, splitting by node or by
+section does not make much difference as each output unit will consist of the
+node and the associated section in both cases.
+
+Output units are used for conversion to HTML and Info output formats. See
+@ref{Texinfo@asis{::}Convert@asis{::}Converter $result =
$converter->convert_output_unit($output_unit),,
@code{Texinfo::Convert::Converter::convert_output_unit}}
+for more information on conversion of output units in Converters. Output units
+are not relevant for all the formats, the Texinfo tree can also be converted
+directly, see @ref{Texinfo@asis{::}Convert@asis{::}Converter $result =
$converter->output_tree($document),,
@code{Texinfo::Convert::Converter::output_tree}}.
+
+The output units may be further grouped in @emph{pages}, which are not pages as
+in book pages, but more like web pages, and hold series of output units.
+The output units may have directions to other output units prepared
+by @code{units_directions}. @code{units_file_directions} should also
+set direction related to files, provided files are associated with
+output units by the user.
+
+@node Texinfo@asis{::}OutputUnits METHODS
+@section Texinfo::OutputUnits METHODS
+
+No method is exported in the default case.
+
+@node Texinfo@asis{::}OutputUnits Output units creation
+@subsection Output units creation
+
+Output units are hash references created with the following keys:
+
+@table @asis
+@item @code{type}
+@anchor{Texinfo@asis{::}OutputUnits @code{type}}
+
+The type of the output unit. Set to @code{unit} for output units associated
+with nodes and sectioning commands.
+
+@item @code{unit_command}
+@anchor{Texinfo@asis{::}OutputUnits @code{unit_command}}
+
+Main node or sectioning command associated with the output unit.
+
+@item @code{unit_contents}
+@anchor{Texinfo@asis{::}OutputUnits @code{unit_contents}}
+
+This array reference holds all the nodes and sectioning commands Texinfo tree
+elements associated with the output unit (in order). The Texinfo tree nodes
+and sectioning commands elements have an @code{associated_unit} key set that
points
+to the output unit.
+
+@item @code{tree_unit_directions}
+@anchor{Texinfo@asis{::}OutputUnits @code{tree_unit_directions}}
+
+Hash reference with @emph{next} and @emph{prev} pointing to the
+previous and the next output unit.
+
+@end table
+
+Call one of the following methods to create output units and associate them
+with nodes and sectioning command Texinfo tree elements:
+
+@table @asis
+@item $output_units = split_by_node($document)
+@anchor{Texinfo@asis{::}OutputUnits $output_units = split_by_node($document)}
+@cindex @code{split_by_node}
+
+Returns a reference array of output units where a node is associated with
+the following sectioning commands. Sectioning commands without nodes
+are also with the previous node, while nodes without sectioning commands
+are alone in their output units.
+
+Each output unit @emph{unit_command} key points to the node command
+associated with the output unit.
+
+@item $output_units = split_by_section($document)
+@anchor{Texinfo@asis{::}OutputUnits $output_units =
split_by_section($document)}
+@cindex @code{split_by_section}
+
+Similarly with @code{split_by_node}, returns an array of output units. This
+time, lone nodes are associated with the previous sections and lone
+sections makes up an output unit.
+
+Output units @emph{unit_command} keys point to the sectioning command
associated
+with the output unit.
+
+@end table
+
+@node Texinfo@asis{::}OutputUnits Grouping output units in pages
+@subsection Grouping output units in pages
+
+You can call @code{split_pages} to group together output units:
+
+@table @asis
+@item split_pages($output_units, $split)
+@anchor{Texinfo@asis{::}OutputUnits split_pages($output_units@comma{} $split)}
+@cindex @code{split_pages}
+
+Add the @emph{first_in_page} key to each output unit in the array
+reference argument @emph{$output_units}, set to the first output unit in the
group.
+
+The first output unit in the group is based on the value of @emph{$split}:
+
+@table @asis
+@item @code{chapter}
+@anchor{Texinfo@asis{::}OutputUnits @code{chapter}}
+
+The output units are grouped at chapter or other toplevel sectioning commands.
+
+@item @code{node}
+@anchor{Texinfo@asis{::}OutputUnits @code{node}}
+
+Each output unit is on its own.
+
+@item @code{section}
+@anchor{Texinfo@asis{::}OutputUnits @code{section}}
+
+The output units are grouped at sectioning commands below chapter.
+
+@item empty string
+@anchor{Texinfo@asis{::}OutputUnits empty string}
+
+No splitting, all the output units are together.
+
+@end table
+
+@end table
+
+@node Texinfo@asis{::}OutputUnits Setting output units directions
+@subsection Setting output units directions
+
+You can call the following methods to set output units directions:
+
+@table @asis
+@item units_directions($identifier_target, $output_units, $print_debug)
+@anchor{Texinfo@asis{::}OutputUnits
units_directions($identifier_target@comma{} $output_units@comma{} $print_debug)}
+@cindex @code{units_directions}
+
+The @emph{$identifier_target} argument associates identifiers with target
elements
+and is generally obtained from a parsed document,
+@ref{Texinfo@asis{::}Document $identifier_target =
labels_information($document),, @code{Texinfo::Document::labels_information}}.
+Directions are set up for the output units in the array reference
+@emph{$output_units} given in argument. The corresponding hash is associated
+with the @emph{directions} key. In this hash, keys correspond to directions
+while values are output units.
+
+@emph{$print_debug} is optional. If set, some debugging information is
printed.
+
+The following directions are set up:
+
+@table @asis
+@item This
+@anchor{Texinfo@asis{::}OutputUnits This}
+
+The output unit itself.
+
+@item Forward
+@anchor{Texinfo@asis{::}OutputUnits Forward}
+
+Unit next.
+
+@item Back
+@anchor{Texinfo@asis{::}OutputUnits Back}
+
+Previous output unit.
+
+@item NodeForward
+@anchor{Texinfo@asis{::}OutputUnits NodeForward}
+
+Following node output unit in reading order. It is the next node unit, or the
+first in menu or the next of the up node.
+
+@item NodeBack
+@anchor{Texinfo@asis{::}OutputUnits NodeBack}
+
+Preceding node output unit.
+
+@item NodeUp
+@anchor{Texinfo@asis{::}OutputUnits NodeUp}
+
+@item NodeNext
+@anchor{Texinfo@asis{::}OutputUnits NodeNext}
+
+@item NodePrev
+@anchor{Texinfo@asis{::}OutputUnits NodePrev}
+
+The up, next and previous node output unit.
+
+@item Up
+@anchor{Texinfo@asis{::}OutputUnits Up}
+
+@item Next
+@anchor{Texinfo@asis{::}OutputUnits Next}
+
+@item Prev
+@anchor{Texinfo@asis{::}OutputUnits Prev}
+
+The up, next and previous section output unit.
+
+@item FastBack
+@anchor{Texinfo@asis{::}OutputUnits FastBack}
+
+For top level output units, the previous top level output unit. For other
+output units the up top level unit. For example, for a chapter output unit it
+is the previous chapter output unit, for a subsection output unit it is the
+chapter output unit that contains the subsection.
+
+@item FastForward
+@anchor{Texinfo@asis{::}OutputUnits FastForward}
+
+The next top level output unit.
+
+@end table
+
+@item units_file_directions($output_units)
+@anchor{Texinfo@asis{::}OutputUnits units_file_directions($output_units)}
+@cindex @code{units_file_directions}
+
+In the directions reference described above for @code{units_directions},
+sets the @emph{PrevFile} and @emph{NextFile} directions to the output units in
+previous and following files.
+
+It also sets @emph{FirstInFile*} directions for all the output units by using
+the directions of the first output unit in file. So, for example,
+@emph{FirstInFileNodeNext} is the output unit associated with the next node
+of the first output unit node in the file for each output unit in the file.
+
+The API for association of pages/output units to files is not defined yet.
+
+@end table
+
+@node Texinfo@asis{::}OutputUnits SEE ALSO
+@section Texinfo::OutputUnits SEE ALSO
+
+@url{http://www.gnu.org/s/texinfo/manual/texinfo/, Texinfo manual},
+@ref{Texinfo@asis{::}Document NAME,, Texinfo::Document},
@ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter}.
+
+@node Texinfo@asis{::}OutputUnits AUTHOR
+@section Texinfo::OutputUnits AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}OutputUnits COPYRIGHT AND LICENSE
+@section Texinfo::OutputUnits COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Parser.texi
b/doc/tp_api/api_includes/Texinfo-Parser.texi
new file mode 100644
index 0000000000..0f8b806248
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Parser.texi
@@ -0,0 +1,1246 @@
+@node Texinfo@asis{::}Parser
+@chapter Texinfo::Parser
+
+@node Texinfo@asis{::}Parser NAME
+@section Texinfo::Parser NAME
+
+Texinfo::Parser - Parse Texinfo code into a Perl tree
+
+@node Texinfo@asis{::}Parser SYNOPSIS
+@section Texinfo::Parser SYNOPSIS
+
+@verbatim
+ use Texinfo::Parser;
+
+ my $parser = Texinfo::Parser::parser();
+ my $document = $parser->parse_texi_file("somefile.texi");
+
+ my ($errors, $errors_count) = $parser->errors();
+ foreach my $error_message (@$errors) {
+ warn $error_message->{'error_line'};
+ }
+@end verbatim
+
+@node Texinfo@asis{::}Parser NOTES
+@section Texinfo::Parser NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Parser DESCRIPTION
+@section Texinfo::Parser DESCRIPTION
+
+@code{Texinfo::Parser} will parse Texinfo text into a Perl tree. In one pass
+it expands user-defined @@-commands, conditionals (@code{@@ifset},
@code{@@ifinfo}...)
+and @code{@@value} and constructs the tree. Some extra information is gathered
+while doing the tree: for example, the @code{@@quotation} associated to an
@code{@@author}
+command, the number of columns in a multitable, or the node associated with a
+section.
+
+@node Texinfo@asis{::}Parser METHODS
+@section Texinfo::Parser METHODS
+
+No method is exported in the default case. The module allows both
+an object-oriented syntax, or traditional function, with the parser
+as an opaque data structure given as an argument to every function.
+
+@node Texinfo@asis{::}Parser Initialization
+@subsection Initialization
+
+The following method is used to construct a new @code{Texinfo::Parser} object:
+
+@table @asis
+@item $parser = Texinfo::Parser::parser($options)
+@anchor{Texinfo@asis{::}Parser $parser =
Texinfo@asis{::}Parser@asis{::}parser($options)}
+@cindex @code{Texinfo::Parser::parser}
+@cindex Parser initialization
+
+This method creates a new parser. The options may be provided as a hash
+reference. Most of those options correspond to Texinfo customization options
+described in the Texinfo manual.
+
+@table @asis
+@item CPP_LINE_DIRECTIVES
+@anchor{Texinfo@asis{::}Parser CPP_LINE_DIRECTIVES}
+
+Handle cpp like synchronization lines if set. Set in the default case.
+
+@item EXPANDED_FORMATS
+@anchor{Texinfo@asis{::}Parser EXPANDED_FORMATS}
+
+An array reference of the output formats for which @code{@@if@emph{FORMAT}}
+conditional blocks should be expanded. Default is empty.
+
+@item FORMAT_MENU
+@anchor{Texinfo@asis{::}Parser FORMAT_MENU}
+
+Possible values are @code{nomenu}, @code{menu} and @code{sectiontoc}. Only
report
+menu-related errors for @code{menu}.
+
+@item INCLUDE_DIRECTORIES
+@anchor{Texinfo@asis{::}Parser INCLUDE_DIRECTORIES}
+
+An array reference of directories in which @code{@@include} files should be
+searched for. Default contains the working directory, @file{.}.
+
+@item IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME
+@anchor{Texinfo@asis{::}Parser IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME}
+
+If set, spaces after an @@-command name that take braces are ignored.
+Default on.
+
+@item MAX_MACRO_CALL_NESTING
+@anchor{Texinfo@asis{::}Parser MAX_MACRO_CALL_NESTING}
+
+Maximal number of nested user-defined macro calls. Default is 100000.
+
+@item documentlanguage
+@anchor{Texinfo@asis{::}Parser documentlanguage}
+
+A string corresponding to a document language set by @code{@@documentlanguage}.
+It overrides the document @code{@@documentlanguage} information, if present.
+
+@item values
+@anchor{Texinfo@asis{::}Parser values}
+
+A hash reference. Keys are names, values are the corresponding values.
+Same as values set by @code{@@set}.
+
+@end table
+
+@end table
+
+@node Texinfo@asis{::}Parser Parsing Texinfo text
+@subsection Parsing Texinfo text
+
+Different methods may be called to parse some Texinfo code:
+@code{parse_texi_line} for a line, @code{parse_texi_piece} for a fragment of
+Texinfo, @code{parse_texi_text} for a string corresponding to a full document
+and @code{parse_texi_file} for a file. The first argument of these functions
+is a parser.
+
+When @code{parse_texi_line} is used, the resulting tree is rooted at
+a @code{root_line} type container. Otherwise, the resulting tree should be
+rooted at a @code{document_root} type container.
+
+@table @asis
+@item $tree = $parser->parse_texi_line($text, $first_line_number)
+@anchor{Texinfo@asis{::}Parser $tree = $parser->parse_texi_line($text@comma{}
$first_line_number)}
+@cindex @code{parse_texi_line}
+
+This function is used to parse a short fragment of Texinfo code.
+
+@emph{$text} is the string containing the texinfo line.
@emph{$first_line_number} is
+the line number of the line, if undef, it will be set to 1.
+
+@item $document = $parser->parse_texi_piece($text, $first_line_number)
+@anchor{Texinfo@asis{::}Parser $document =
$parser->parse_texi_piece($text@comma{} $first_line_number)}
+@cindex @code{parse_texi_piece}
+
+This function is used to parse Texinfo fragments.
+
+@emph{$text} is the string containing the texinfo text.
@emph{$first_line_number} is
+the line number of the first text line, if undef, it will be set to 1.
+
+@item $document = $parser->parse_texi_text($text, $first_line_number)
+@anchor{Texinfo@asis{::}Parser $document =
$parser->parse_texi_text($text@comma{} $first_line_number)}
+@cindex @code{parse_texi_text}
+
+This function is used to parse a text as a whole document.
+
+@emph{$text} is the string containing the texinfo text.
@emph{$first_line_number} is
+the line number of the first text line, if undef, it will be set to 1.
+
+@item $document = $parser->parse_texi_file($file_name)
+@anchor{Texinfo@asis{::}Parser $document =
$parser->parse_texi_file($file_name)}
+@cindex @code{parse_texi_file}
+
+The file with name @emph{$file_name} is considered to be a Texinfo file and
+is parsed into a tree. @emph{$file_name} should be a binary string.
+
+undef is returned if the file couldn't be read.
+
+@end table
+
+The errors collected during the tree parsing are available with
+@code{errors}. These errors are internally registered in a
@code{Texinfo::Report}
+object.
+
+@table @asis
+@item ($error_warnings_list, $error_count) = $parser->errors()
+@anchor{Texinfo@asis{::}Parser ($error_warnings_list@comma{} $error_count) =
$parser->errors()}
+@cindex @code{errors}
+
+This function returns as @emph{$error_count} the count of parsing errors.
+The @emph{$error_warnings_list} is an array of hash references
+one for each error, warning or error line continuation.
+They are described in detail in @ref{Texinfo@asis{::}Report
($error_warnings_list@comma{} $error_count) = errors($registrar),,
Texinfo::Report::errors}.
+
+@end table
+
+@node Texinfo@asis{::}Parser TEXINFO TREE
+@section TEXINFO TREE
+
+@cindex Texinfo tree elements
+
+
+A Texinfo tree element (called element because node is overloaded in
+the Texinfo world) is an hash reference. There are three main categories
+of tree element. Tree elements associated with an @@-command have a
+@code{cmdname} key holding the @@-command name. Tree elements corresponding
+to text fragments have a @code{text} key holding the corresponding text.
+Finally, the last category is other elements, which in most cases have
+a @code{type} key holding their name. Text fragments and @@-command elements
+may also have an associated type when such information is needed.
+
+The children of an @@-command or of other container element are in the array
+referred to with the @code{args} key or with the @code{contents} key. The
@code{args} key
+is for arguments of @@-commands, either in braces or on the rest of the line
+after the command, depending on the type of command. The @code{contents} key
array
+holds the contents of the texinfo code appearing within a block @@-command,
+within a container, or within a @code{@@node} or sectioning @@-command.
+
+Another important key for the elements is the @code{extra} key which is
+associated to a hash reference and holds all kinds of information that
+is gathered during the parsing and may help with the conversion.
+
+You can see examples of the tree structure by running makeinfo like
+this:
+
+@verbatim
+ makeinfo -c DUMP_TREE=1 -c TEXINFO_OUTPUT_FORMAT=parse document.texi
+@end verbatim
+
+For a simpler, more regular representation of the tree structure, you
+can do:
+
+@verbatim
+ makeinfo -c TEXINFO_OUTPUT_FORMAT=debugtree document.texi
+@end verbatim
+
+@node Texinfo@asis{::}Parser Element keys
+@subsection Element keys
+
+@cindex Texinfo tree element structure
+
+
+@table @asis
+@item cmdname
+@anchor{Texinfo@asis{::}Parser cmdname}
+
+The command name of @@-command elements.
+
+@item text
+@anchor{Texinfo@asis{::}Parser text}
+
+The text fragment of text elements.
+
+@item type
+@anchor{Texinfo@asis{::}Parser type}
+
+The type of element considered, in general a container. Frequent
+types encountered are @emph{paragraph} for a paragraph container,
+@emph{brace_container} for the container holding a brace @@-commands
+content, @emph{line_arg} and @emph{block_line_arg} contain the arguments
+appearing on the line of @@-commands. Text fragments may have a type to
+give an information of the kind of text fragment, for example
+@emph{spaces_before_paragraph} is associated to spaces appearing
+before a paragraph beginning. Most @@-commands elements do not have
+a type associated.
+
+@item args
+@anchor{Texinfo@asis{::}Parser args}
+
+Arguments in braces or on @@-command line. An array reference.
+
+@item contents
+@anchor{Texinfo@asis{::}Parser contents}
+
+The Texinfo appearing in the element. For block commands, other
+containers, @code{@@node} and sectioning commands. An array reference.
+
+@item parent
+@anchor{Texinfo@asis{::}Parser parent}
+
+The parent element.
+
+@item source_info
+@anchor{Texinfo@asis{::}Parser source_info}
+
+An hash reference corresponding to information on the location of the
+element in the Texinfo input manual. It should mainly be available for
+@@-command elements, and only for @@-commands that are considered to be
+complex enough that the location in the document is needed, for example
+to prepare an error message.
+
+The keys of the line number hash references are
+
+@table @asis
+@item line_nr
+@anchor{Texinfo@asis{::}Parser line_nr}
+
+The line number of the @@-command.
+
+@item file_name
+@anchor{Texinfo@asis{::}Parser file_name}
+
+The file name where @@-command appeared.
+
+@item macro
+@anchor{Texinfo@asis{::}Parser macro}
+
+The user macro name the @@-command is expanded from.
+
+@end table
+
+@item info
+@anchor{Texinfo@asis{::}Parser info}
+
+A hash reference holding any other information that cannot be
+obtained otherwise from the tree.
+See @ref{Texinfo@asis{::}Parser Information available in the @code{info} key,,
Information available in the @code{info} key}.
+
+@item extra
+@anchor{Texinfo@asis{::}Parser extra}
+
+A hash reference holding information that could also be obtained
+from the tree, but is directly associated to the element to simplify
+downstream code.
+See @ref{Texinfo@asis{::}Parser Information available in the @code{extra}
key,, Information available in the @code{extra} key}.
+
+@end table
+
+@node Texinfo@asis{::}Parser Element types
+@subsection Element types
+
+@node Texinfo@asis{::}Parser Types for command elements
+@subsubsection Types for command elements
+
+Some types can be associated with @@-commands (in addition to @code{cmdname}),
+although usually there will be no type at all. The following are the
+possible values of @code{type} for tree elements for @@-commands.
+
+@table @asis
+@item definfoenclose_command
+@anchor{Texinfo@asis{::}Parser definfoenclose_command}
+
+This type is set for an @@-command that is redefined by
@code{@@definfoenclose}.
+The beginning is in @code{@{'extra'@}->@{'begin'@}} and the end in
+@code{@{'extra'@}->@{'end'@}}.
+
+The command name is the info @emph{command_name} value.
+
+@item index_entry_command
+@anchor{Texinfo@asis{::}Parser index_entry_command}
+
+This is the type of index entry command like @code{@@cindex}, and, more
+importantly user-defined index entry commands. So for example if there
+is:
+
+@verbatim
+ @defindex foo
+ ...
+
+ @fooindex index entry
+@end verbatim
+
+the @code{@@fooindex} @@-command element will have the
@emph{index_entry_command}
+type.
+
+The command name is the info @emph{command_name} value.
+
+@end table
+
+@node Texinfo@asis{::}Parser Types for text elements
+@subsubsection Types for text elements
+
+The text elements may have the following types (or may have no type
+at all):
+
+@table @asis
+@item after_menu_description_line
+@anchor{Texinfo@asis{::}Parser after_menu_description_line}
+
+@item space_at_end_menu_node
+@anchor{Texinfo@asis{::}Parser space_at_end_menu_node}
+
+Space after a node in the menu entry, when there is no description,
+and space appearing after the description line.
+
+@item delimiter
+@anchor{Texinfo@asis{::}Parser delimiter}
+
+@item spaces
+@anchor{Texinfo@asis{::}Parser spaces}
+
+Spaces on definition command line separating the definition command arguments.
+Delimiters, such as comma, square brackets and parentheses appearing in
+definition command line arguments at the end of the line, separated from
+surrounding texts during the parsing phase.
+
+@item empty_line
+@anchor{Texinfo@asis{::}Parser empty_line}
+
+An empty line (possibly containing whitespace characters only).
+
+@item ignorable_spaces_after_command
+@anchor{Texinfo@asis{::}Parser ignorable_spaces_after_command}
+
+spaces appearing after an @@-command without braces that does not
+take argument on the line, but which is followed by ignorable
+spaces, such as @code{@@item} in @code{@@itemize} or @code{@@multitable}, or
@code{@@noindent}.
+
+@item spaces_after_close_brace
+@anchor{Texinfo@asis{::}Parser spaces_after_close_brace}
+
+Spaces appearing after a closing brace, for some rare commands for which
+this space should be ignorable (like @code{@@caption} or @code{@@sortas}).
+
+@item spaces_before_paragraph
+@anchor{Texinfo@asis{::}Parser spaces_before_paragraph}
+
+Space appearing before a paragraph beginning.
+
+@item raw
+@anchor{Texinfo@asis{::}Parser raw}
+
+Text in an environment where it should be kept as is (in @code{@@verbatim},
+@code{@@verb}, @code{@@macro} body).
+
+@item rawline_arg
+@anchor{Texinfo@asis{::}Parser rawline_arg}
+
+Used for the arguments to some special line commands whose arguments
+aren't subject to the usual macro expansion. For example @code{@@set},
+@code{@@clickstyle}, @code{@@unmacro}, @code{@@comment}. The argument is
associated to
+the @emph{text} key.
+
+@item spaces_at_end
+@anchor{Texinfo@asis{::}Parser spaces_at_end}
+
+Space within an index @@-command before an @@-command interrupting the
+index command.
+
+@item text_after_end
+@anchor{Texinfo@asis{::}Parser text_after_end}
+
+Text appearing after @@bye.
+
+@item text_before_beginning
+@anchor{Texinfo@asis{::}Parser text_before_beginning}
+
+Text appearing before real content, including the @code{\input texinfo.tex}.
+
+@item untranslated
+@anchor{Texinfo@asis{::}Parser untranslated}
+
+English text added by the parser that may need to be translated
+during conversion. Happens for definition line @@-commands aliases that
+leads to prepending text such as ``Function''.
+
+@end table
+
+@node Texinfo@asis{::}Parser Tree container elements
+@subsubsection Tree container elements
+
+Some types of element are containers of portions of the tree,
+either for the whole tree, or for contents appearing before @code{@@node}
+and sectioning commands.
+
+@table @asis
+@item before_node_section
+@anchor{Texinfo@asis{::}Parser before_node_section}
+
+Content before nodes and sectioning commands at the beginning of
+@code{document_root}.
+
+@item document_root
+@anchor{Texinfo@asis{::}Parser document_root}
+
+@item root_line
+@anchor{Texinfo@asis{::}Parser root_line}
+
+@code{root_line} is the type of the root tree when parsing Texinfo line
+fragments using @code{parse_texi_line}. @code{document_root} is the document
+root otherwise.
+
+@code{document_root} first content should be @code{before_node_section}, then
nodes and
+sections @@-commands elements, @code{@@bye} element and
@code{postamble_after_end}.
+
+@item postamble_after_end
+@anchor{Texinfo@asis{::}Parser postamble_after_end}
+
+This container holds everything appearing after @@bye.
+
+@item preamble_before_beginning
+@anchor{Texinfo@asis{::}Parser preamble_before_beginning}
+
+This container holds everything appearing before the first content, including
+the @code{\input texinfo.tex} line and following blank lines.
+
+@item preamble_before_setfilename
+@anchor{Texinfo@asis{::}Parser preamble_before_setfilename}
+
+This container holds everything that appears before @code{@@setfilename}.
+
+@item preamble_before_content
+@anchor{Texinfo@asis{::}Parser preamble_before_content}
+
+This container holds everything appearing before the first formatted content,
+corresponding to the @emph{preamble} in the Texinfo documentation.
+
+@end table
+
+@node Texinfo@asis{::}Parser Types of container elements
+@subsubsection Types of container elements
+
+The other types of element are containers with other elements appearing in
+their @code{contents}. The @code{paragraph} container holds normal text from
the
+Texinfo manual outside of any @@-commands, and within @@-commands with blocks
of
+text (@code{@@footnote}, @code{@@itemize} @code{@@item}, @code{@@quotation}
for example). The
+@code{preformatted} container holds the content appearing in @@-commands like
+@code{@@example} and the @code{rawpreformatted} container holds the content
appearing in
+format commands such as @code{@@html}. The other containers are more specific.
+
+The types of container element are the following:
+
+@table @asis
+@item balanced_braces
+@anchor{Texinfo@asis{::}Parser balanced_braces}
+
+Special type containing balanced braces content (braces included)
+in the context where they are valid, and where balanced braces need to
+be collected to know when a top-level brace command is closed. In
@code{@@math},
+in raw output format brace commands and within brace @@-commands in raw output
+format block commands.
+
+@item before_defline
+@anchor{Texinfo@asis{::}Parser before_defline}
+
+A container for content before the first @code{@@defline} or
@code{@@deftypeline}
+in @code{@@defblock}.
+
+@item before_item
+@anchor{Texinfo@asis{::}Parser before_item}
+
+A container for content before the first @code{@@item} of block @@-commands
+with items (@code{@@table}, @code{@@multitable}, @code{@@enumerate}...).
+
+@item brace_container
+@anchor{Texinfo@asis{::}Parser brace_container}
+
+@item brace_command_context
+@anchor{Texinfo@asis{::}Parser brace_command_context}
+
+@item brace_arg
+@anchor{Texinfo@asis{::}Parser brace_arg}
+
+@item line_arg
+@anchor{Texinfo@asis{::}Parser line_arg}
+
+@item block_line_arg
+@anchor{Texinfo@asis{::}Parser block_line_arg}
+
+@item following_arg
+@anchor{Texinfo@asis{::}Parser following_arg}
+
+Those containers occur within the @code{args} array of @@-commands taking an
+argument. @emph{brace_container} is used for the argument to commands
+taking arguments surrounded by braces when the whole text in the braces
+is in the argument. @emph{brace_arg} is used for the arguments to commands
taking
+arguments surrounded by braces when the leading and, in most cases, trailing
+spaces are not part of the argument, and for arguments in braces separated by
+commas. @emph{brace_command_context} is used for @@-commands with braces that
start
+a new context (@code{@@footnote}, @code{@@caption}, @code{@@math}).
+
+@emph{line_arg} is used for commands that take the texinfo code on the rest of
the
+line as their argument, such as @code{@@settitle}, @code{@@node},
@code{@@section}.
+@emph{block_line_arg} is similar but is used for commands that start a new
block
+(which is to be ended with @code{@@end}).
+
+@emph{following_arg} is used for the accent @@-commands argument that did not
use
+braces but instead followed the @@-command, possibly after a space, as
+
+@verbatim
+ @~n
+ @ringaccent A
+@end verbatim
+
+For example
+
+@verbatim
+ @code{in code}
+@end verbatim
+
+leads to
+
+@verbatim
+ {'cmdname' => 'code',
+ 'args' => [{'type' => 'brace_container',
+ 'contents' => [{'text' => 'in code'}]}]}
+@end verbatim
+
+@item bracketed_arg
+@anchor{Texinfo@asis{::}Parser bracketed_arg}
+
+Bracketed argument. On definition command and on @code{@@multitable} line.
+
+@item bracketed_linemacro_arg
+@anchor{Texinfo@asis{::}Parser bracketed_linemacro_arg}
+
+Argument of a user defined linemacro call in bracket. It holds directly the
+argument text (which does not contain the braces) and does not contain other
+elements. It should not appear directly in the tree as the user defined
+linemacro call is replaced by the linemacro body.
+
+@item def_category
+@anchor{Texinfo@asis{::}Parser def_category}
+
+@item def_class
+@anchor{Texinfo@asis{::}Parser def_class}
+
+@item def_type
+@anchor{Texinfo@asis{::}Parser def_type}
+
+@item def_name
+@anchor{Texinfo@asis{::}Parser def_name}
+
+@item def_typearg
+@anchor{Texinfo@asis{::}Parser def_typearg}
+
+@item def_arg
+@anchor{Texinfo@asis{::}Parser def_arg}
+
+Definition line arguments containers corresponding to the different parts of a
+definition line command. Contains one @code{bracketed_arg},
@code{def_line_arg} or
+@code{untranslated_def_line_arg} container.
+
+@item def_line
+@anchor{Texinfo@asis{::}Parser def_line}
+
+@item def_item
+@anchor{Texinfo@asis{::}Parser def_item}
+
+@item inter_def_item
+@anchor{Texinfo@asis{::}Parser inter_def_item}
+
+The @emph{def_line} type is associated with a container within a block
definition
+command. It holds the definition line arguments in @emph{block_line_arg}.
+A @code{@@def*} @@-command line command such as @code{@@deffnx} or
@code{@@defline}
+also holds the definition line arguments, in @emph{line_arg}.
+The type of each definition line arguments element describes the meaning of the
+element. It is one of @emph{def_category}, @emph{def_name}, @emph{def_class},
@emph{def_type},
+@emph{def_arg}, @emph{def_typearg}, @emph{spaces} or @emph{delimiter},
depending on the
+definition.
+
+The container with type @emph{def_item} holds the definition text content.
+Content appearing before a definition command with a x form is in
+an @emph{inter_def_item} container.
+
+@item def_line_arg
+@anchor{Texinfo@asis{::}Parser def_line_arg}
+
+@item untranslated_def_line_arg
+@anchor{Texinfo@asis{::}Parser untranslated_def_line_arg}
+
+the @emph{def_line_arg} contains one or several elements that together are a
single
+unit on a definition command line. This container is very similar with a
+@emph{bracketed_arg} on a definition line, except that there is no bracket.
+Appears in definition line arguments containers such as @emph{def_category},
+@emph{def_arg} or similar.
+
+The @emph{untranslated_def_line_arg} is similar, but only happens for
automatically
+added categories and contains only a text element. For example, the
@code{deffun}
+line @emph{def_category} container may contain an
@emph{untranslated_def_line_arg} type
+container containing itself a text element with ``Function'' as text, if the
+document language demands a translation. Note that the
+@emph{untranslated_def_line_arg} is special, as, in general, it should not be
+recursed into, as the text within is untranslated, but the untranslated text
+should be gathered when converting the @emph{untranslated_def_line_arg} type
+container.
+
+@item macro_call
+@anchor{Texinfo@asis{::}Parser macro_call}
+
+@item macro_call_line
+@anchor{Texinfo@asis{::}Parser macro_call_line}
+
+@item rmacro_call
+@anchor{Texinfo@asis{::}Parser rmacro_call}
+
+@item rmacro_call_line
+@anchor{Texinfo@asis{::}Parser rmacro_call_line}
+
+@item linemacro_call
+@anchor{Texinfo@asis{::}Parser linemacro_call}
+
+Container holding the arguments of a user defined macro, linemacro
+or rmacro. It should not appear directly in the tree as the user defined
+call is expanded. The name of the macro, rmacro or linemacro is the the info
+@emph{command_name} value. The @emph{macro_call_line} or
@emph{rmacro_call_line} elements
+are used when there are no braces and the whole line is the argument.
+
+@item macro_name
+@anchor{Texinfo@asis{::}Parser macro_name}
+
+@item macro_arg
+@anchor{Texinfo@asis{::}Parser macro_arg}
+
+Taken from @code{@@macro} definition and put in the @code{args} key array of
+the macro, @emph{macro_name} is the type of the text fragment corresponding
+to the macro name, @emph{macro_arg} is the type of the text fragments
+corresponding to macro formal arguments.
+
+@item menu_comment
+@anchor{Texinfo@asis{::}Parser menu_comment}
+
+The @emph{menu_comment} container holds what is between menu entries
+in menus. For example, in:
+
+@verbatim
+ @menu
+ Menu title
+
+ * entry::
+
+ Between entries
+ * other::
+ @end menu
+@end verbatim
+
+Both
+
+@verbatim
+ Menu title
+@end verbatim
+
+and
+
+@verbatim
+ Between entries
+@end verbatim
+
+will be in a @emph{menu_comment}.
+
+@item menu_entry
+@anchor{Texinfo@asis{::}Parser menu_entry}
+
+@item menu_entry_leading_text
+@anchor{Texinfo@asis{::}Parser menu_entry_leading_text}
+
+@item menu_entry_name
+@anchor{Texinfo@asis{::}Parser menu_entry_name}
+
+@item menu_entry_separator
+@anchor{Texinfo@asis{::}Parser menu_entry_separator}
+
+@item menu_entry_node
+@anchor{Texinfo@asis{::}Parser menu_entry_node}
+
+@item menu_entry_description
+@anchor{Texinfo@asis{::}Parser menu_entry_description}
+
+A @emph{menu_entry} holds a full menu entry, like
+
+@verbatim
+ * node:: description.
+@end verbatim
+
+The different elements of the menu entry are in the
+@emph{menu_entry} @code{contents} array reference.
+
+@emph{menu_entry_leading_text} holds the star and following spaces.
+@emph{menu_entry_name} is the menu entry name (if present),
@emph{menu_entry_node}
+corresponds to the node in the menu entry, @emph{menu_entry_separator} holds
+the text after the node and before the description, in most cases
+@code{:: }. Lastly, @emph{menu_entry_description} is for the description.
+
+@item multitable_head
+@anchor{Texinfo@asis{::}Parser multitable_head}
+
+@item multitable_body
+@anchor{Texinfo@asis{::}Parser multitable_body}
+
+@item row
+@anchor{Texinfo@asis{::}Parser row}
+
+In @code{@@multitable}, a @emph{multitable_head} container contains all the
rows
+with @code{@@headitem}, while @emph{multitable_body} contains the rows
associated
+with @code{@@item}. A @emph{row} container contains the @code{@@item} and
@code{@@tab}
+forming a row.
+
+@item paragraph
+@anchor{Texinfo@asis{::}Parser paragraph}
+
+A paragraph. The @code{contents} of a paragraph (like other container
+elements for Texinfo content) are elements representing the contents of
+the paragraph in the order they occur, such as text elements
+without a @code{cmdname} or @code{type}, or @@-command elements for commands
+appearing in the paragraph.
+
+@item preformatted
+@anchor{Texinfo@asis{::}Parser preformatted}
+
+Texinfo code within a format that is not filled. Happens within some
+block commands like @code{@@example}, but also in menu (in menu descriptions,
+menu comments...).
+
+@item rawpreformatted
+@anchor{Texinfo@asis{::}Parser rawpreformatted}
+
+Texinfo code within raw output format block commands such as @code{@@tex}
+or @code{@@html}.
+
+@item table_entry
+@anchor{Texinfo@asis{::}Parser table_entry}
+
+@item table_term
+@anchor{Texinfo@asis{::}Parser table_term}
+
+@item table_definition
+@anchor{Texinfo@asis{::}Parser table_definition}
+
+@item inter_item
+@anchor{Texinfo@asis{::}Parser inter_item}
+
+Those containers appear in @code{@@table}, @code{@@ftable} and @code{@@vtable}.
+A @emph{table_entry} container contains an entire row of the table.
+It contains a @emph{table_term} container, which holds all the @code{@@item}
and
+@code{@@itemx} lines. This is followed by a @emph{table_definition}
container, which
+holds the content that is to go into the second column of the table.
+
+If there is any content before an @code{@@itemx} (normally only comments,
+empty lines or maybe index entries are allowed), it will be in
+a container with type @emph{inter_item} at the same level of @code{@@item}
+and @code{@@itemx}, in a @emph{table_term}.
+
+@end table
+
+@node Texinfo@asis{::}Parser Information available in the @code{info} key
+@subsection Information available in the @code{info} key
+
+@table @asis
+@item arg_line
+@anchor{Texinfo@asis{::}Parser arg_line}
+
+The string correspond to the line after the @@-command
+for @@-commands that have special arguments on their line,
+and for @code{@@macro} line.
+
+@item command_name
+@anchor{Texinfo@asis{::}Parser command_name}
+
+Name of commands that can be defined dynamically.
+The name of index command or definfoenclose defined command (also
+available in @emph{cmdname} for those commands).
+The name of user defined macro, rmacro or linemacro called
+associated with the element holding the arguments of the user defined command
+call.
+
+@item delimiter
+@anchor{Texinfo@asis{::}Parser delimiter 1}
+
+@code{@@verb} delimiter is in @emph{delimiter}.
+
+@item inserted
+@anchor{Texinfo@asis{::}Parser inserted}
+
+Set if the element is not in the Texinfo input code, but is inserted
+as a default for @@-command argument or as a definition command automatically
+inserted category (for example @emph{Function} for @code{@@defun}).
+
+@item spaces_after_argument
+@anchor{Texinfo@asis{::}Parser spaces_after_argument}
+
+A reference to an element containing the spaces after @@-command arguments
+before a comma, a closing brace or at end of line, for some @@-commands and
+bracketed content type with opening brace, and line commands and block command
+lines taking Texinfo as argument and comma delimited arguments. Depending on
+the @@-command, the @emph{spaces_after_argument} is associated with the
@@-command
+element, or with each argument element.
+
+@item spaces_after_cmd_before_arg
+@anchor{Texinfo@asis{::}Parser spaces_after_cmd_before_arg}
+
+For accent commands with spaces following the @@-command, like:
+
+@verbatim
+ @ringaccent A
+ @^ u
+@end verbatim
+
+there is a @emph{spaces_after_cmd_before_arg} key linking to an element
+containing the spaces appearing after the command in @emph{text}.
+
+Space between a brace @@-command name and its opening brace also
+ends up in @emph{spaces_after_cmd_before_arg}. It is not recommended
+to leave space between an @@-command name and its opening brace.
+
+@item spaces_before_argument
+@anchor{Texinfo@asis{::}Parser spaces_before_argument}
+
+A reference to an element containing the spaces following the opening brace of
+some @@-commands with braces and bracketed content type, spaces following
+@@-commands for line commands and block command taking Texinfo as argument, and
+spaces following comma delimited arguments. For context brace commands, line
+commands and block commands, @emph{spaces_before_argument} is associated with
the
+@@-command element, for other brace commands and for spaces after comma, it is
+associated with each argument element.
+
+@end table
+
+@node Texinfo@asis{::}Parser Information available in the @code{extra} key
+@subsection Information available in the @code{extra} key
+@cindex Texinfo tree element extra key
+
+@node Texinfo@asis{::}Parser Extra keys available for more than one @@-command
+@subsubsection Extra keys available for more than one @@-command
+
+@table @asis
+@item element_node
+@anchor{Texinfo@asis{::}Parser element_node}
+
+The node element in the parsed tree containing the element.
+Set for @@-commands elements that have an associated
+index entry and for @code{@@nodedescription}.
+
+@item element_region
+@anchor{Texinfo@asis{::}Parser element_region}
+
+The region command (@code{@@copying}, @code{@@titlepage}) containing the
element,
+if it is in such an environement. Set for @@-commands elements that have an
+associated index entry and for @@anchor.
+
+@item index_entry
+@anchor{Texinfo@asis{::}Parser index_entry}
+
+The index entry information is associated to @@-commands that have an
associated
+index entry. The associated information should not be directly accessed,
+instead @ref{Texinfo@asis{::}Common ($index_entry@comma{} $index_info) =
lookup_index_entry($index_entry_info@comma{} $indices_information),,
@code{Texinfo::Common::lookup_index_entry}}
+should be called on the @code{extra} @emph{index_entry} value:
+
+@verbatim
+ my ($index_entry, $index_info)
+ = Texinfo::Common::lookup_index_entry(
+ $element->{'extra'}->{'index_entry'},
+ $indices_information);
+@end verbatim
+
+The @emph{$indices_information} is the information on a Texinfo manual indices
+obtained from
+@ref{Texinfo@asis{::}Document $indices_information =
$document->indices_information(),,
@code{Texinfo::Document::indices_information}}.
+The index entry information hash returned by
+@code{Texinfo::Common::lookup_index_entry} is described in
+@ref{Texinfo@asis{::}Document index_entries}.
+
+Currently, the @emph{index_entry} value is an array reference
+with an index name as first element and the index entry number in that index
+(1-based) as second element.
+
+@item index_ignore_chars
+@anchor{Texinfo@asis{::}Parser index_ignore_chars}
+
+A string containing the characters flagged as ignored in key sorting in the
+document by setting flags such as @emph{txiindexbackslashignore}. Set, if
+not empty, for @@-commands elements that have an associated index entry.
+
+@item misc_args
+@anchor{Texinfo@asis{::}Parser misc_args}
+
+An array holding strings, the arguments of @@-commands taking simple
+textual arguments as arguments, like @code{@@everyheadingmarks},
+@code{@@frenchspacing}, @code{@@alias}, @code{@@synindex},
@code{@@columnfractions}.
+
+@item text_arg
+@anchor{Texinfo@asis{::}Parser text_arg}
+
+The string correspond to the line after the @@-command for @@-commands
+that have an argument interpreted as simple text, like @code{@@setfilename},
+@code{@@end} or @code{@@documentencoding}.
+
+@end table
+
+@node Texinfo@asis{::}Parser Extra keys specific of certain @@-commands or
containers
+@subsubsection Extra keys specific of certain @@-commands or containers
+
+@table @asis
+@item @code{@@abbr}
+@anchor{Texinfo@asis{::}Parser @code{@@abbr}}
+
+@item @code{@@acronym}
+@anchor{Texinfo@asis{::}Parser @code{@@acronym}}
+
+The first argument normalized is in @emph{normalized}.
+
+@item @code{@@anchor}
+@anchor{Texinfo@asis{::}Parser @code{@@anchor}}
+
+@item @code{@@float}
+@anchor{Texinfo@asis{::}Parser @code{@@float}}
+
+@@-commands that are targets for cross-references have a @emph{normalized} key
for
+the normalized label, built as specified in the Texinfo documentation in the
+@emph{HTML Xref} node. There is also a @emph{node_content} key for an array
holding
+the corresponding content.
+
+@item @code{@@author}
+@anchor{Texinfo@asis{::}Parser @code{@@author}}
+
+If in a @code{@@titlepage}, the titlepage is in @emph{titlepage}, if in
+@code{@@quotation} or @code{@@smallquotation}, the corresponding tree element
+is in @emph{quotation}.
+
+The author tree element is in the @emph{authors} array of the
@code{@@titlepage}
+or the @code{@@quotation} or @code{@@smallquotation} it is associated with.
+
+@item @code{@@click}
+@anchor{Texinfo@asis{::}Parser @code{@@click}}
+
+In @emph{clickstyle} there is the current clickstyle command.
+
+@item @code{def_line}
+@anchor{Texinfo@asis{::}Parser @code{def_line} 1}
+
+@item line definition command
+@anchor{Texinfo@asis{::}Parser line definition command}
+
+@emph{def_command} holds the line definition command name, without x if the
line
+definition command is an x form of a block definition command. For a
+@code{def_line} container, @emph{def_command} holds the command name associated
+with the @code{def_line}. @emph{original_def_cmdname} is the original def
command
+name.
+
+If the element is a definition line command and is an x form of a block
+definition command, it has @emph{not_after_command} set if not appearing
+after the block definition command without x.
+
+The @emph{def_index_element} is a Texinfo tree element corresponding to
+the index entry associated to the definition line, based on the
+name and class. If needed this element is based on translated strings.
+In that case, if @code{@@documentlanguage} is defined where the element
+is located, @emph{documentlanguage} holds the documentlanguage value.
+@emph{def_index_ref_element} is similar, but not translated, and only set if
+there could have been a translation.
+
+The @emph{omit_def_name_space} key value is set and true if the Texinfo
variable
+@code{txidefnamenospace} was set, signaling that the space between function
+definition name and arguments should be omitted.
+
+@item @code{@@definfoenclose} defined commands
+@anchor{Texinfo@asis{::}Parser @code{@@definfoenclose} defined commands}
+
+@emph{begin} holds the string beginning the @code{@@definfoenclose},
+@emph{end} holds the string ending the @code{@@definfoenclose}.
+
+@item @code{@@documentencoding}
+@anchor{Texinfo@asis{::}Parser @code{@@documentencoding}}
+
+The argument, normalized is in @emph{input_encoding_name}.
+
+@item @code{@@enumerate}
+@anchor{Texinfo@asis{::}Parser @code{@@enumerate}}
+
+The @emph{enumerate_specification} @code{extra} key contains the enumerate
argument.
+
+@item @code{@@float}
+@anchor{Texinfo@asis{::}Parser @code{@@float} 1}
+
+@item @code{@@listoffloats}
+@anchor{Texinfo@asis{::}Parser @code{@@listoffloats}}
+
+If @code{@@float} has a first argument, and for @code{@@listoffloats} argument
there
+is a @emph{float_type} key with the normalized float type.
+
+@emph{caption} and @emph{shortcaption} hold the corresponding tree elements
+associated to a @code{@@float}. The @code{@@caption} or @code{@@shortcaption}
have the
+float tree element stored in @emph{float}.
+
+@item index entry @@-command
+@anchor{Texinfo@asis{::}Parser index entry @@-command}
+
+@item @code{@@subentry}
+@anchor{Texinfo@asis{::}Parser @code{@@subentry}}
+
+If an index entry @@-command, such as @code{@@cindex}, or a @code{@@subentry}
contains
+a @code{@@sortas} command, @emph{sortas} holds the @code{@@sortas} command
content
+formatted as plain text.
+
+@emph{subentry} links to the next level @code{@@subentry} element.
@emph{subentry_parent}
+links to the previous level element.
+
+Index entry @@-command (but not @code{@@subentry}) can also have @emph{seentry}
+and @emph{seealso} keys that link to the corresponding @@-commands elements.
+
+@item @code{@@inlinefmt}
+@anchor{Texinfo@asis{::}Parser @code{@@inlinefmt}}
+
+@item @code{@@inlineraw}
+@anchor{Texinfo@asis{::}Parser @code{@@inlineraw}}
+
+@item @code{@@inlinefmtifelse}
+@anchor{Texinfo@asis{::}Parser @code{@@inlinefmtifelse}}
+
+@item @code{@@inlineifclear}
+@anchor{Texinfo@asis{::}Parser @code{@@inlineifclear}}
+
+@item @code{@@inlineifset}
+@anchor{Texinfo@asis{::}Parser @code{@@inlineifset}}
+
+The first argument is in @emph{format}. If an argument has been determined
+as being expanded by the Parser, the index of this argument is in
+@emph{expand_index}. Index numbering begins at 0, but the first argument is
+always the format or flag name, so, if set, it should be 1 or 2 for
+@code{@@inlinefmtifelse}, and 1 for other commands.
+
+@item @code{@@item} in @code{@@enumerate} or @code{@@itemize}
+@anchor{Texinfo@asis{::}Parser @code{@@item} in @code{@@enumerate} or
@code{@@itemize}}
+
+The @emph{item_number} @code{extra} key holds the number of this item.
+
+@item @code{@@item} and @code{@@tab} in @code{@@multitable}
+@anchor{Texinfo@asis{::}Parser @code{@@item} and @code{@@tab} in
@code{@@multitable}}
+
+The @emph{cell_number} index key holds the index of the column of
+the cell.
+
+@item @code{@@itemize}
+@anchor{Texinfo@asis{::}Parser @code{@@itemize}}
+
+@item @code{@@table}
+@anchor{Texinfo@asis{::}Parser @code{@@table}}
+
+@item @code{@@vtable}
+@anchor{Texinfo@asis{::}Parser @code{@@vtable}}
+
+@item @code{@@ftable}
+@anchor{Texinfo@asis{::}Parser @code{@@ftable}}
+
+The @emph{command_as_argument} @code{extra} key points to the @@-command
+as argument on the @@-command line.
+
+If the command in argument for @code{@@table}, @code{@@vtable} or
@code{@@ftable}
+is @code{@@kbd} and the context and @code{@@kbdinputstyle} is such that
@code{@@kbd}
+should be formatted as code, the @emph{command_as_argument_kbd_code}
+@code{extra} key is set to 1.
+
+@item @code{@@kbd}
+@anchor{Texinfo@asis{::}Parser @code{@@kbd}}
+
+@emph{code} is set depending on the context and @code{@@kbdinputstyle}.
+
+@item @code{@@macro}
+@anchor{Texinfo@asis{::}Parser @code{@@macro}}
+
+@emph{invalid_syntax} is set if there was an error on the @code{@@macro}
+line. @code{info} key hash @emph{arg_line} holds the line after
@code{@@macro}.
+
+@item @code{menu_entry_node}
+@anchor{Texinfo@asis{::}Parser @code{menu_entry_node} 1}
+
+Extra keys with information about the node entry label same as those
+appearing in the @code{@@node} @emph{line_arg} explicit directions arguments
+@code{extra} hash labels information.
+
+@item @code{@@multitable}
+@anchor{Texinfo@asis{::}Parser @code{@@multitable}}
+
+The key @emph{max_columns} holds the maximal number of columns. If there is a
+@code{@@columnfractions} as argument, then the @emph{columnfractions} key is
associated
+with the element for the @@columnfractions command.
+
+@item @code{@@node}
+@anchor{Texinfo@asis{::}Parser @code{@@node}}
+
+Explicit directions labels information is in the @emph{line_arg}
+arguments @code{extra} node direction @code{@@node} arguments. They consist
+in a hash with the @emph{node_content} key for an array holding the
+corresponding content, a @emph{manual_content} key if there is an
+associated external manual name, and a @emph{normalized} key for the
+normalized label, built as specified in the @emph{HTML Xref}
+Texinfo documentation node.
+
+An @emph{associated_section} key holds the tree element of the
+sectioning command that follows the node. An @emph{node_preceding_part}
+key holds the tree element of the @code{@@part} that precedes the node,
+if there is no sectioning command between the @code{@@part} and the node.
+A @emph{node_description} key holds the first @code{@@nodedescription}
associated
+to the node.
+
+A node containing a menu have a @emph{menus} key which refers to an array of
+references to menu elements occuring in the node.
+
+The first node containing a @code{@@printindex} @@-command has the
@emph{isindex}
+key set.
+
+@item @code{paragraph}
+@anchor{Texinfo@asis{::}Parser @code{paragraph} 1}
+
+The @emph{indent} or @emph{noindent} key value is set if the corresponding
+@@-commands are associated with that paragraph.
+
+@item @code{@@part}
+@anchor{Texinfo@asis{::}Parser @code{@@part}}
+
+The next sectioning command tree element is in @emph{part_associated_section}.
+The following node tree element is in @emph{part_following_node} if there is
+no sectioning command between the @code{@@part} and the node.
+
+@item @code{@@ref}
+@anchor{Texinfo@asis{::}Parser @code{@@ref}}
+
+@item @code{@@xref}
+@anchor{Texinfo@asis{::}Parser @code{@@xref}}
+
+@item @code{@@pxref}
+@anchor{Texinfo@asis{::}Parser @code{@@pxref}}
+
+@item @code{@@inforef}
+@anchor{Texinfo@asis{::}Parser @code{@@inforef}}
+
+The node argument @emph{brace_arg} holds information on the label, like the one
+appearing in the @code{@@node} @emph{line_arg} explicit directions arguments
@code{extra}
+hash labels information.
+
+@item @code{row}
+@anchor{Texinfo@asis{::}Parser @code{row} 1}
+
+The @emph{row_number} index key holds the index of the row in
+the @code{@@multitable}.
+
+@item sectioning command
+@anchor{Texinfo@asis{::}Parser sectioning command}
+
+The node preceding the command is in @emph{associated_node}.
+The part preceding the command is in @emph{associated_part}.
+If the level of the document was modified by @code{@@raisections}
+or @code{@@lowersections}, the differential level is in @emph{level_modifier}.
+
+@item @code{untranslated_def_line_arg}
+@anchor{Texinfo@asis{::}Parser @code{untranslated_def_line_arg} 1}
+
+@emph{documentlanguage} holds the @code{@@documentlanguage} value.
+If there is a translation context, it should be in @emph{translation_context}.
+
+@end table
+
+@node Texinfo@asis{::}Parser SEE ALSO
+@section Texinfo::Parser SEE ALSO
+
+@url{http://www.gnu.org/software/texinfo/manual/texinfo/, Texinfo manual}.
+
+@node Texinfo@asis{::}Parser AUTHOR
+@section Texinfo::Parser AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Parser COPYRIGHT AND LICENSE
+@section Texinfo::Parser COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Report.texi
b/doc/tp_api/api_includes/Texinfo-Report.texi
new file mode 100644
index 0000000000..547c0cf9f0
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Report.texi
@@ -0,0 +1,179 @@
+@node Texinfo@asis{::}Report
+@chapter Texinfo::Report
+
+@node Texinfo@asis{::}Report NAME
+@section Texinfo::Report NAME
+
+Texinfo::Report - Error storing for Texinfo modules
+
+@node Texinfo@asis{::}Report SYNOPSIS
+@section Texinfo::Report SYNOPSIS
+
+@verbatim
+ use Texinfo::Report;
+
+ my $registrar = Texinfo::Report::new();
+
+ if ($warning_happened) {
+ $registrar->line_warn($converter, sprintf(__("\@%s is wrongly used"),
+ $current->{'cmdname'}), $current->{'source_info'});
+ }
+
+ my ($errors, $errors_count) = $registrar->errors();
+ foreach my $error_message (@$errors) {
+ warn $error_message->{'error_line'};
+ }
+
+ $registrar->clear();
+@end verbatim
+
+@node Texinfo@asis{::}Report NOTES
+@section Texinfo::Report NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Report DESCRIPTION
+@section Texinfo::Report DESCRIPTION
+
+The @code{Texinfo::Report} module helps with error handling. Errors
+and warnings can be setup, stored and retrieved later on.
+This module is used by the Texinfo modules @ref{Texinfo@asis{::}Parser NAME,,
Texinfo::Parser} and
+@ref{Texinfo@asis{::}Convert@asis{::}Converter NAME,,
Texinfo::Convert::Converter}.
+
+@node Texinfo@asis{::}Report METHODS
+@section Texinfo::Report METHODS
+
+No method is exported in the default case.
+
+The @code{new} method initializes a @code{Texinfo::Report} object.
+The errors collected are available through the @code{errors} method, the other
+methods allow registering errors and warnings.
+
+@table @asis
+@item my $registrar = Texinfo::Report::new()
+@anchor{Texinfo@asis{::}Report my $registrar =
Texinfo@asis{::}Report@asis{::}new()}
+@cindex @code{Texinfo::Report::new}
+
+Return an initialized @code{Texinfo::Report} object.
+
+@item ($error_warnings_list, $error_count) = errors($registrar)
+@anchor{Texinfo@asis{::}Report ($error_warnings_list@comma{} $error_count) =
errors($registrar)}
+@cindex @code{errors}
+
+This function returns as @emph{$error_count} the count of errors since
+calling @code{new}. The @emph{$error_warnings_list} is an array of hash
references
+one for each error, warning or error line continuation. Each of these has
+the following keys:
+
+@table @asis
+@item continuation
+@anchor{Texinfo@asis{::}Report continuation}
+
+If set, the line is a continuation line of a message.
+
+@item error_line
+@anchor{Texinfo@asis{::}Report error_line}
+
+The text of the error formatted with the macro name, as needed.
+
+@item file_name
+@anchor{Texinfo@asis{::}Report file_name}
+
+The file name where the error or warning occurs.
+
+@item line_nr
+@anchor{Texinfo@asis{::}Report line_nr}
+
+The line number of the error or warning.
+
+@item macro
+@anchor{Texinfo@asis{::}Report macro}
+
+The user macro name that is expanded at the location of
+the error or warning.
+
+@item text
+@anchor{Texinfo@asis{::}Report text}
+
+The text of the error.
+
+@item type
+@anchor{Texinfo@asis{::}Report type}
+
+May be @code{warning}, or @code{error}.
+
+@end table
+
+@item $registrar->clear ()
+@anchor{Texinfo@asis{::}Report $registrar->clear ()}
+@cindex @code{clear}
+
+Clear the previously registered messages.
+
+@item $registrar->add_formatted_message ($msg)
+@anchor{Texinfo@asis{::}Report $registrar->add_formatted_message ($msg)}
+@cindex @code{add_formatted_message}
+
+Register the @emph{$msg} hash reference corresponding to an error, warning or
error line
+continuation. The @emph{$msg} hash reference should correspond to the
structure returned
+by @code{errors}.
+
+@item $registrar->line_warn($text, $error_location_info, $continuation,
$debug, $silent)
+@anchor{Texinfo@asis{::}Report $registrar->line_warn($text@comma{}
$error_location_info@comma{} $continuation@comma{} $debug@comma{} $silent)}
+
+@item $registrar->line_error($text, $error_location_info, $continuation,
$debug, $silent)
+@anchor{Texinfo@asis{::}Report $registrar->line_error($text@comma{}
$error_location_info@comma{} $continuation@comma{} $debug@comma{} $silent)}
+@cindex @code{line_warn}
+@cindex @code{line_error}
+
+Register a warning or an error. The @emph{$text} is the text of the
+error or warning. The mandatory @emph{$error_location_info} holds the
information
+on the error or warning location. The @emph{$error_location_info} reference on
+hash may be obtained from Texinfo elements @emph{source_info} keys. It may
also
+be setup to point to a file name, using the @code{file_name} key and to a line
+number, using the @code{line_nr} key. The @code{file_name} key value should
be a
+binary string.
+
+The @emph{$continuation} optional arguments, if true, conveys that
+the line is a continuation line of a message.
+
+The @emph{$debug} optional integer arguments sets the debug level.
+
+The @emph{$silent} optional arguments, if true, suppresses the output of
+a message that is output immediatly if debugging is set.
+
+The @emph{source_info} key of Texinfo tree elements is described
+in more details in @ref{Texinfo@asis{::}Parser source_info}.
+
+@item $registrar->document_warn($text, $program_name, $continuation)
+@anchor{Texinfo@asis{::}Report $registrar->document_warn($text@comma{}
$program_name@comma{} $continuation)}
+
+@item $registrar->document_error($text, $program_name, $continuation)
+@anchor{Texinfo@asis{::}Report $registrar->document_error($text@comma{}
$program_name@comma{} $continuation)}
+@cindex @code{document_warn}
+@cindex @code{document_error}
+
+Register a document-wide error or warning. @emph{$text} is the error or
+warning message. The @emph{$program_name} is prepended to the
+message, if defined. The @emph{$continuation} optional arguments, if true,
conveys
+that the line is a continuation line of a message.
+
+@end table
+
+@node Texinfo@asis{::}Report AUTHOR
+@section Texinfo::Report AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Report COPYRIGHT AND LICENSE
+@section Texinfo::Report COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Structuring.texi
b/doc/tp_api/api_includes/Texinfo-Structuring.texi
new file mode 100644
index 0000000000..116873b412
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Structuring.texi
@@ -0,0 +1,265 @@
+@node Texinfo@asis{::}Structuring
+@chapter Texinfo::Structuring
+
+@node Texinfo@asis{::}Structuring NAME
+@section Texinfo::Structuring NAME
+
+Texinfo::Structuring - information on Texinfo::Document document structure
+
+@node Texinfo@asis{::}Structuring SYNOPSIS
+@section Texinfo::Structuring SYNOPSIS
+
+@verbatim
+ use Texinfo::Structuring qw(sectioning_structure nodes_tree number_floats
+ associate_internal_references);
+
+ # $document is a parsed Texinfo::Document document.
+ # When customization variables information is needed, it is obtained
+ # from the $document by calling the get_conf() method.
+ my $sections_list = sectioning_structure($document);
+ my $nodes_list = nodes_tree($document);
+ set_menus_node_directions($document);
+ complete_node_tree_with_menus($document);
+ check_nodes_are_referenced($document);
+ associate_internal_references($document);
+ number_floats($document->floats_information());
+@end verbatim
+
+@node Texinfo@asis{::}Structuring NOTES
+@section Texinfo::Structuring NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Structuring DESCRIPTION
+@section Texinfo::Structuring DESCRIPTION
+
+@code{Texinfo::Structuring} allows to collect information on a Texinfo
+document structure. Thanks to @code{sectioning_structure} the hierarchy of
+sectioning commands is determined. The directions implied by menus are
+determined with @code{set_menus_node_directions}. The node tree is analysed
+with @code{nodes_tree}. Nodes directions are completed with menu directions
+with @code{complete_node_tree_with_menus}. Floats get their standard
+numbering with @code{number_floats} and internal references are matched up
+with nodes, floats or anchors with @code{associate_internal_references}.
+
+@node Texinfo@asis{::}Structuring METHODS
+@section Texinfo::Structuring METHODS
+
+No method is exported in the default case.
+
+Most methods use the @ref{Texinfo@asis{::}Report NAME,, Texinfo::Report}
registrar from a parsed document
+for error reporting. Most also require Texinfo customization variables
+information, which means an object implementing the @code{get_conf} method, in
+general a parsed document with registered customization, or, sometime,
+a converter (@ref{Texinfo@asis{::}Convert@asis{::}Converter Getting and
setting customization
+variables}). Other common data needed such as target elements associated to
+identifiers or refs are obtained from a parsed document, see
+@ref{Texinfo@asis{::}Document NAME,, Texinfo::Document}.
+
+@table @asis
+@item associate_internal_references($document)
+@anchor{Texinfo@asis{::}Structuring associate_internal_references($document)}
+@cindex @code{associate_internal_references}
+
+Verify that internal references (@code{@@ref} and similar without fourth of
+fifth argument and menu entries) have an associated node, anchor or float.
+Set the @emph{normalized} key in the @code{extra} hash of
@code{menu_entry_node} container
+for menu entries and in the first argument @code{extra} hash for internal
+references @code{@@ref} and similar @@-commands.
+
+@item check_nodes_are_referenced($document)
+@anchor{Texinfo@asis{::}Structuring check_nodes_are_referenced($document)}
+@cindex @code{check_nodes_are_referenced}
+
+Check that all the nodes are referenced (in menu, @@*ref or node direction).
+
+Should be called after @code{complete_node_tree_with_menus} in order to
+have the autogenerated menus available.
+
+@item complete_node_tree_with_menus($document)
+@anchor{Texinfo@asis{::}Structuring complete_node_tree_with_menus($document)}
+@cindex @code{complete_node_tree_with_menus}
+
+Complete nodes directions with menu directions. Check consistency
+of menus, sectionning and nodes direction structures.
+
+@item @@children_nodes = get_node_node_childs_from_sectioning($node)
+@anchor{Texinfo@asis{::}Structuring @@children_nodes =
get_node_node_childs_from_sectioning($node)}
+@cindex @code{get_node_node_childs_from_sectioning}
+
+@emph{$node} is a node tree element. Find the node @emph{$node} children based
+on the sectioning structure. For the node associated with @code{@@top}
+sectioning command, the sections associated with parts are considered.
+
+@item new_block_command($element, $command_name)
+@anchor{Texinfo@asis{::}Structuring new_block_command($element@comma{}
$command_name)}
+@cindex @code{new_block_command}
+
+Complete @emph{$element} by adding the @emph{$command_name}, the command line
+argument and @code{@@end} to turn the element to a proper block command.
+
+@item $new_menu = new_complete_node_menu($node, $customization_information,
$use_sections)
+@anchor{Texinfo@asis{::}Structuring $new_menu =
new_complete_node_menu($node@comma{} $customization_information@comma{}
$use_sections)}
+@cindex @code{new_complete_node_menu}
+
+Returns a @code{@@menu} Texinfo tree element for node @emph{$node}, pointing
to the
+children of the node obtained with the sectioning structure. If
+@emph{$use_sections} is set, use section names for the menu entry names.
+@emph{$customization_information}, if defined, should hold information needed
for
+translations. Translations are only needed when generating the top node menu.
+
+@item $detailmenu = new_detailmenu($customization_information, $registrar,
$identifier_target, $menus)
+@anchor{Texinfo@asis{::}Structuring $detailmenu =
new_detailmenu($customization_information@comma{} $registrar@comma{}
$identifier_target@comma{} $menus)}
+@cindex @code{new_detailmenu}
+
+Returns a detailmenu tree element formatted as a master node.
+@emph{$menus} is an array reference containing the regular menus of the Top
node.
+@emph{$customization_information} should hold information needed for
translations
+and error reporting.
+
+The @emph{$registrar} argument can be set to a @ref{Texinfo@asis{::}Report
NAME,, Texinfo::Report} object.
+If the @emph{$registrar} argument is not set,
@emph{$customization_information} is
+assumed to be a converter, and error reporting uses converters error
+messages reporting functions (@ref{Texinfo@asis{::}Convert@asis{::}Converter
Registering error
+and warning messages}).
+
+@item $entry = new_node_menu_entry($node, $use_sections)
+@anchor{Texinfo@asis{::}Structuring $entry = new_node_menu_entry($node@comma{}
$use_sections)}
+@cindex @code{new_node_menu_entry}
+
+Returns the Texinfo tree corresponding to a single menu entry pointing to
+@emph{$node}. If @emph{$use_sections} is set, use the section name for the
menu
+entry name. Returns @code{undef} if the node argument is missing.
+
+@item $nodes_list = nodes_tree($document)
+@anchor{Texinfo@asis{::}Structuring $nodes_list = nodes_tree($document)}
+@cindex @code{nodes_tree}
+
+Goes through nodes in @emph{$document} tree and set directions. Returns the
+list of nodes.
+
+This functions sets, in the @code{extra} node element hash:
+
+@table @asis
+@item node_directions
+@anchor{Texinfo@asis{::}Structuring node_directions}
+
+Hash reference with @emph{up}, @emph{next} and @emph{prev} keys associated to
+elements corresponding to node line directions.
+
+@end table
+
+@item number_floats($float_information)
+@anchor{Texinfo@asis{::}Structuring number_floats($float_information)}
+@cindex @code{number_floats}
+
+Number the floats as described in the Texinfo manual. Sets
+the @emph{float_number} key in the @code{extra} hash of the float
+tree elements.
+
+@item $command_name = section_level_adjusted_command_name($element)
+@anchor{Texinfo@asis{::}Structuring $command_name =
section_level_adjusted_command_name($element)}
+@cindex @code{section_level_adjusted_command_name}
+
+Return the sectioning command name corresponding to the sectioning
+element @emph{$element}, adjusted in order to take into account raised
+and lowered sections, when needed.
+
+@item $sections_list = sectioning_structure($document)
+@anchor{Texinfo@asis{::}Structuring $sections_list =
sectioning_structure($document)}
+@cindex @code{sectioning_structure}
+
+This function goes through the parsed document tree and gather information
+on the document structure for sectioning commands. It returns a reference
+on the sections elements list.
+
+It sets section elements @code{extra} hash values:
+
+@table @asis
+@item section_level
+@anchor{Texinfo@asis{::}Structuring section_level}
+
+The level in the sectioning tree hierarchy. 0 is for @code{@@top} or
+@code{@@part}, 1 for @code{@@chapter}, @code{@@appendix}... This level is
corrected
+by @code{@@raisesections} and @code{@@lowersections}.
+
+@item section_number
+@anchor{Texinfo@asis{::}Structuring section_number}
+
+The sectioning element number.
+
+@item section_childs
+@anchor{Texinfo@asis{::}Structuring section_childs}
+
+An array holding sectioning elements children of the element.
+
+@item section_directions
+@anchor{Texinfo@asis{::}Structuring section_directions}
+
+Hash reference with @emph{up}, @emph{next} and @emph{prev} keys associated to
+elements corresponding to sectioning structure directions.
+
+@item toplevel_directions
+@anchor{Texinfo@asis{::}Structuring toplevel_directions}
+
+Hash reference with @emph{up}, @emph{next} and @emph{prev} keys associated to
+elements corresponding to toplevel sectioning structure directions,
+for elements like @code{@@top}, @code{@@chapter}, @code{@@appendix}, not
taking into
+account @code{@@part} elements.
+
+@end table
+
+An element is created and used as the root of the sectioning commands tree.
+This element is associated to the @code{extra} @emph{sectioning_root} key of
the first
+section element of the sections list. It is also at the top of the tree when
+following the @emph{up} @emph{section_directions}.
+
+@item set_menus_node_directions($document);
+@anchor{Texinfo@asis{::}Structuring set_menus_node_directions($document);}
+@cindex @code{set_menus_node_directions}
+
+Goes through menu and set directions.
+
+This functions sets, in the @code{extra} node element hash reference:
+
+@table @asis
+@item menu_directions
+@anchor{Texinfo@asis{::}Structuring menu_directions}
+
+Hash reference with @emph{up}, @emph{next} and @emph{prev} keys associated to
+elements corresponding to menu directions.
+
+@end table
+
+@item warn_non_empty_parts($document)
+@anchor{Texinfo@asis{::}Structuring warn_non_empty_parts($document)}
+@cindex @code{warn_non_empty_parts}
+
+Register a warning in for each @code{@@part} in global commands information of
+@emph{$document} that is not empty.
+
+@end table
+
+@node Texinfo@asis{::}Structuring SEE ALSO
+@section Texinfo::Structuring SEE ALSO
+
+@url{http://www.gnu.org/s/texinfo/manual/texinfo/, Texinfo manual},
+@ref{Texinfo@asis{::}Document NAME,, Texinfo::Document}.
+
+@node Texinfo@asis{::}Structuring AUTHOR
+@section Texinfo::Structuring AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Structuring COPYRIGHT AND LICENSE
+@section Texinfo::Structuring COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Transformations.texi
b/doc/tp_api/api_includes/Texinfo-Transformations.texi
new file mode 100644
index 0000000000..c9a3a8615f
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Transformations.texi
@@ -0,0 +1,158 @@
+@node Texinfo@asis{::}Transformations
+@chapter Texinfo::Transformations
+
+@node Texinfo@asis{::}Transformations NAME
+@section Texinfo::Transformations NAME
+
+Texinfo::Transformations - transformations of Texinfo tree
+
+@node Texinfo@asis{::}Transformations NOTES
+@section Texinfo::Transformations NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Transformations DESCRIPTION
+@section Texinfo::Transformations DESCRIPTION
+
+Includes miscellaneous methods such as as
+@code{insert_nodes_for_sectioning_commands} that adds nodes for sectioning
commands
+without nodes and @code{complete_tree_nodes_menus} and
+@code{complete_tree_nodes_missing_menu} that completes the node menus based on
the
+sectioning tree.
+
+Methods for copying and modifying the Texinfo tree used for default
+conversion to output formats are in @ref{Texinfo@asis{::}ManipulateTree NAME,,
Texinfo::ManipulateTree}.
+
+@node Texinfo@asis{::}Transformations METHODS
+@section Texinfo::Transformations METHODS
+
+No method is exported in the default case.
+
+@table @asis
+@item complete_tree_nodes_menus($tree, $add_section_names_in_entries)
+@anchor{Texinfo@asis{::}Transformations
complete_tree_nodes_menus($tree@comma{} $add_section_names_in_entries)}
+@cindex @code{complete_tree_nodes_menus}
+
+Add menu entries or whole menus for nodes associated with sections,
+based on the sectioning tree. If the optional
+@code{$add_section_names_in_entries} argument is set, a menu entry
+name is added using the section name. This function should be
+called after @ref{Texinfo@asis{::}Structuring $sections_list =
sectioning_structure($document),, sectioning_structure}.
+
+@item complete_tree_nodes_missing_menu($document,
$use_section_names_in_entries)
+@anchor{Texinfo@asis{::}Transformations
complete_tree_nodes_missing_menu($document@comma{}
$use_section_names_in_entries)}
+@cindex @code{complete_tree_nodes_missing_menu}
+
+Add whole menus for nodes associated with sections and without menu,
+based on the @emph{$document} sectioning tree.
+If the optional @emph{$add_section_names_in_entries} argument is set, a menu
entry
+name is added using the section name. This function should be
+called after @ref{Texinfo@asis{::}Structuring $sections_list =
sectioning_structure($document),, sectioning_structure}.
+
+@item fill_gaps_in_sectioning($tree, $commands_heading_tree)
+@anchor{Texinfo@asis{::}Transformations fill_gaps_in_sectioning($tree@comma{}
$commands_heading_tree)}
+@cindex @code{fill_gaps_in_sectioning}
+
+This function adds empty @code{@@unnumbered} and similar commands in a tree
+to fill gaps in sectioning. This may be used, for example, when converting
+from a format that can handle gaps in sectioning. @emph{$tree} is the tree
+root, which is modified by adding the new sectioning commands.
+
+In the default case, the added sectioning commands headings are empty. It is
+possible to use instead the @emph{$commands_heading_tree} Texinfo tree element.
+
+If the sectioning commands are lowered or raised (with @code{@@raisesections},
+@code{@@lowersection}) the tree may be modified with @code{@@raisesections} or
+@code{@@lowersection} added to some tree elements.
+
+@item insert_nodes_for_sectioning_commands($document)
+@anchor{Texinfo@asis{::}Transformations
insert_nodes_for_sectioning_commands($document)}
+@cindex @code{insert_nodes_for_sectioning_commands}
+
+Insert nodes for sectioning commands without node in @code{$document}
+tree.
+
+@item menu_to_simple_menu($menu)
+@anchor{Texinfo@asis{::}Transformations menu_to_simple_menu($menu)}
+
+@item set_menus_to_simple_menu($nodes_list)
+@anchor{Texinfo@asis{::}Transformations set_menus_to_simple_menu($nodes_list)}
+@cindex @code{menu_to_simple_menu}
+@cindex @code{set_menus_to_simple_menu}
+
+@code{menu_to_simple_menu} transforms the tree of a menu tree element.
+@code{set_menus_to_simple_menu} calls @code{menu_to_simple_menu} for all the
+menus of the nodes in @code{$nodes_list}.
+
+A simple menu has no @emph{menu_comment}, @emph{menu_entry} or
@emph{menu_entry_description}
+container anymore, their content are merged directly in the menu in
+@emph{preformatted} container.
+
+Note that this kind of tree is not supported by other codes, so this
+transformation should be avoided unless one knows exactly what to expect.
+
+@item protect_hashchar_at_line_beginning($tree, $registrar,
$customization_information)
+@anchor{Texinfo@asis{::}Transformations
protect_hashchar_at_line_beginning($tree@comma{} $registrar@comma{}
$customization_information)}
+@cindex @code{protect_hashchar_at_line_beginning}
+
+Protect hash (#) character at the beginning of line such that they would not be
+considered as lines to be processed by the CPP processor. The
@emph{$registrar}
+and @emph{$customization_information} arguments are optional. If defined, the
+@emph{$registrar} argument should be a @ref{Texinfo@asis{::}Report NAME,,
Texinfo::Report} object in which the
+errors and warnings encountered while parsing are registered. If defined,
+@emph{$customization_information} should give access to customization through
+@code{get_conf}. If both @emph{$registrar} and
@emph{$customization_information} are
+defined they are used for error reporting in case an hash character could not
+be protected because it appeared in a raw formatted environment (@code{@@tex},
+@code{@@html}...).
+
+@item $modified_tree = reference_to_arg_in_tree($tree, $document)
+@anchor{Texinfo@asis{::}Transformations $modified_tree =
reference_to_arg_in_tree($tree@comma{} $document)}
+@cindex @code{reference_to_arg_in_tree}
+
+Modify @emph{$tree} by converting reference @@-commands to simple text using
one of
+the arguments. This transformation can be used, for example, to remove
+reference @@-command from constructed node names trees, as node names cannot
+contain reference @@-command while there could be some in the tree used in
input
+for the node name tree. The @emph{$document} argument is optional. If given,
+the converted reference @@-command is removed from the @emph{$document}
internal
+references list.
+
+A @emph{$modified_tree} is not systematically returned, if the @emph{$tree} in
argument
+is not replaced, undef may also be returned.
+
+@item regenerate_master_menu($document, $use_sections)
+@anchor{Texinfo@asis{::}Transformations
regenerate_master_menu($document@comma{} $use_sections)}
+@cindex @code{regenerate_master_menu}
+
+Regenerate the @emph{$document} Top node master menu, replacing the first
+detailmenu in Top node menus or appending at the end of the Top node menu.
+
+@emph{$use_sections} is an optional argument. If set, sections associated with
+nodes are used as labels in the generated master menu.
+
+@end table
+
+@node Texinfo@asis{::}Transformations SEE ALSO
+@section Texinfo::Transformations SEE ALSO
+
+@url{http://www.gnu.org/s/texinfo/manual/texinfo/, Texinfo manual},
+@ref{Texinfo@asis{::}Parser NAME,, Texinfo::Parser},
@ref{Texinfo@asis{::}ManipulateTree NAME,, Texinfo::ManipulateTree}.
+
+@node Texinfo@asis{::}Transformations AUTHOR
+@section Texinfo::Transformations AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Transformations COPYRIGHT AND LICENSE
+@section Texinfo::Transformations COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/api_includes/Texinfo-Translations.texi
b/doc/tp_api/api_includes/Texinfo-Translations.texi
new file mode 100644
index 0000000000..c511f47779
--- /dev/null
+++ b/doc/tp_api/api_includes/Texinfo-Translations.texi
@@ -0,0 +1,170 @@
+@node Texinfo@asis{::}Translations
+@chapter Texinfo::Translations
+
+@node Texinfo@asis{::}Translations NAME
+@section Texinfo::Translations NAME
+
+Texinfo::Translations - Translations of output documents strings for Texinfo
modules
+
+@node Texinfo@asis{::}Translations SYNOPSIS
+@section Texinfo::Translations SYNOPSIS
+
+@verbatim
+ @ISA = qw(Texinfo::Translations);
+
+ Texinfo::Translations::configure('LocaleData');
+
+ my $tree_translated
+ = Texinfo::Translations::gdt('See {reference} in @cite{{book}}',
+ $converter->get_conf('documentlanguage'),
+ {'reference' => $tree_reference,
+ 'book' => {'text' => $book_name}});
+@end verbatim
+
+@node Texinfo@asis{::}Translations NOTES
+@section Texinfo::Translations NOTES
+
+The Texinfo Perl module main purpose is to be used in @code{texi2any} to
convert
+Texinfo to other formats. There is no promise of API stability.
+
+@node Texinfo@asis{::}Translations DESCRIPTION
+@section Texinfo::Translations DESCRIPTION
+
+The @code{Texinfo::Translations} module helps with translations
+in output documents.
+
+Translation of error messages is not described here, some
+elements are in @ref{Texinfo@asis{::}Common $translated_string = __($msgid),,
Texinfo::Common @code{__} and @code{__p}}.
+
+@node Texinfo@asis{::}Translations METHODS
+@section Texinfo::Translations METHODS
+
+No method is exported.
+
+The @code{configure} method sets the translation files base directory. If not
+called, system defaults are used.
+
+@table @asis
+@item configure($localesdir, $strings_textdomain)
+@anchor{Texinfo@asis{::}Translations configure($localesdir@comma{}
$strings_textdomain)}
+
+@emph{$localesdir} is the directory where translation files are found. The
+directory structure and files format should follow the
@url{https://www.gnu.org/software/gettext/manual/html_node/Locating-Catalogs.html,
conventions expected
+for gettext based
+internationalization}.
+The @emph{$strings_textdomain} is optional, if set, it determines the
translation
+domain.
+
+@end table
+
+The @code{gdt} and @code{pgdt} methods are used to translate strings to be
output in
+converted documents, and return a Texinfo tree. The @code{gdt_string} is
similar
+but returns a simple string, for already converted strings.
+
+@table @asis
+@item $tree = gdt($string, $lang, $replaced_substrings, $translation_context,
$debug_level, $object, $translate_string_method)
+@anchor{Texinfo@asis{::}Translations $tree = gdt($string@comma{} $lang@comma{}
$replaced_substrings@comma{} $translation_context@comma{} $debug_level@comma{}
$object@comma{} $translate_string_method)}
+
+@item $string = gdt_string($string, $lang, $replaced_substrings,
$translation_context, $object, $translate_string_method)
+@anchor{Texinfo@asis{::}Translations $string = gdt_string($string@comma{}
$lang@comma{} $replaced_substrings@comma{} $translation_context@comma{}
$object@comma{} $translate_string_method)}
+
+@cindex @code{gdt}
+@cindex @code{gdt_string}
+
+
+The @emph{$string} is a string to be translated. With @code{gdt}
+the function returns a Texinfo tree, as the string is interpreted
+as Texinfo code after translation. With @code{gdt_string} a string
+is returned.
+
+@emph{$lang} is the language used for the translation.
+
+@emph{$replaced_substrings} is an optional hash reference specifying
+some substitution to be done after the translation. The key of the
+@emph{$replaced_substrings} hash reference identifies what is to be
substituted.
+In the string to be translated word in brace matching keys of
+@emph{$replaced_substrings} are replaced.
+For @code{gdt}, the value is a Texinfo tree that is substituted in the
+resulting texinfo tree. For @code{gdt_string}, the value is a string that
+is replaced in the resulting string.
+
+@emph{$debug_level} is an optional debugging level supplied to @code{gdt},
similar to
+the @code{DEBUG} customization variable. If set, the debug level minus one is
+passed to the Texinfo string parser called in @code{gdt}.
+
+The @emph{$translation_context} is optional. If not @code{undef} this is a
translation
+context string for @emph{$string}. It is the first argument of @code{pgettext}
+in the C API of Gettext.
+
+For example, in the following call, the string
+@code{See @{reference@} in @@cite@{@{book@}@}} is translated, then
+parsed as a Texinfo string, with @emph{@{reference@}} substituted by
+@emph{$tree_reference} in the resulting tree, and @emph{@{book@}}
+replaced by the associated texinfo tree text element:
+
+@verbatim
+ $tree = gdt('See {reference} in @cite{{book}}', "ca",
+ {'reference' => $tree_reference,
+ 'book' => {'text' => $book_name}});
+@end verbatim
+
+By default, @code{gdt} and @code{gdt_string} call @code{translate_string} to
use a
+gettext-like infrastructure to retrieve the translated strings, using the
+@emph{texinfo_document} domain. You can change the method used to retrieve the
+translated strings by providing a @emph{$translate_string_method} argument.
If not
+undef it should be a reference on a function that is called instead of
+@code{translate_string}. The @emph{$object} is passed as first argument of the
+@emph{$translate_string_method}, the other arguments are the same as
+@ref{Texinfo@asis{::}Translations $translated_string =
translate_string($string@comma{} $lang@comma{} $translation_context),,
@code{translate_string}}
+arguments.
+
+@item $tree = pgdt($translation_context, $string, $lang, $replaced_substrings,
$debug_level)
+@anchor{Texinfo@asis{::}Translations $tree = pgdt($translation_context@comma{}
$string@comma{} $lang@comma{} $replaced_substrings@comma{} $debug_level)}
+@cindex @code{pgdt}
+
+Same to @code{gdt} except that the @emph{$translation_context} is not optional.
+Calls @code{gdt}. This function is useful to mark strings with a
+translation context for translation. This function is similar to pgettext
+in the Gettext C API.
+
+@end table
+
+By default, in @code{gdt}, @code{gdt_string} and @code{pgdt} a string is
translated with
+@code{translate_string}.
+
+@table @asis
+@item $translated_string = translate_string($string, $lang,
$translation_context)
+@anchor{Texinfo@asis{::}Translations $translated_string =
translate_string($string@comma{} $lang@comma{} $translation_context)}
+@cindex @code{translate_string}
+
+The @emph{$string} is a string to be translated. @emph{$lang} is the language
used for
+the translation. The @emph{$translation_context} is optional. If not
@code{undef}
+this is a translation context string for @emph{$string}. It is the first
argument
+of @code{pgettext} in the C API of Gettext.
+
+@code{translate_string} uses a gettext-like infrastructure to retrieve the
+translated strings, using the @emph{texinfo_document} domain.
+
+@end table
+
+@node Texinfo@asis{::}Translations SEE ALSO
+@section Texinfo::Translations SEE ALSO
+
+@url{https://www.gnu.org/software/gettext/manual/, GNU gettext utilities
manual}.
+
+@node Texinfo@asis{::}Translations AUTHOR
+@section Texinfo::Translations AUTHOR
+
+Patrice Dumas, <pertusus@@free.fr>
+
+@node Texinfo@asis{::}Translations COPYRIGHT AND LICENSE
+@section Texinfo::Translations COPYRIGHT AND LICENSE
+
+Copyright 2010- Free Software Foundation, Inc. See the source file for
+all copyright years.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
diff --git a/doc/tp_api/texi2any_internals.texi
b/doc/tp_api/texi2any_internals.texi
new file mode 100644
index 0000000000..16a142811f
--- /dev/null
+++ b/doc/tp_api/texi2any_internals.texi
@@ -0,0 +1,384 @@
+\input texinfo
+
+@c this is needed by old automake versions < 1.6.2, that are still used
+@c in some platforms in 2024
+@setfilename texi2any_internals.info
+
+@settitle Texinfo modules documentation
+
+@dircategory Texinfo documentation system
+@direntry
+* texi2any modules: (texi2any_internals).
+ Texinfo Perl modules used in texi2any
+@end direntry
+
+@shorttitlepage Texinfo modules documentation
+@headings on
+
+@contents
+
+@node Top
+@top Texinfo modules documentation
+
+@menu
+* Texinfo@asis{::}Commands::
+* Texinfo@asis{::}Common::
+* Texinfo@asis{::}Parser::
+* Texinfo@asis{::}Document::
+* Texinfo@asis{::}ManipulateTree::
+* Texinfo@asis{::}Structuring::
+* Texinfo@asis{::}Report::
+* Texinfo@asis{::}Translations::
+* Texinfo@asis{::}Transformations::
+* Texinfo@asis{::}Indices::
+* Texinfo@asis{::}OutputUnits::
+* Texinfo@asis{::}Convert@asis{::}Texinfo::
+* Texinfo@asis{::}Convert@asis{::}Utils::
+* Texinfo@asis{::}Convert@asis{::}Unicode::
+* Texinfo@asis{::}Convert@asis{::}NodeNameNormalization::
+* Texinfo@asis{::}Convert@asis{::}Text::
+* Texinfo@asis{::}Convert@asis{::}Converter::
+* Texinfo@asis{::}Convert@asis{::}Info::
+* Texinfo@asis{::}Convert@asis{::}HTML::
+* Texinfo@asis{::}Convert@asis{::}DocBook::
+* Texinfo@asis{::}Convert@asis{::}TexinfoMarkup::
+* Texinfo@asis{::}Convert@asis{::}TexinfoXML::
+* Texinfo@asis{::}Convert@asis{::}Plaintext::
+
+@detailmenu
+ --- The Detailed Node Listing ---
+
+Texinfo::Commands
+
+* Texinfo@asis{::}Commands NAME::
+* Texinfo@asis{::}Commands SYNOPSIS::
+* Texinfo@asis{::}Commands NOTES::
+* Texinfo@asis{::}Commands DESCRIPTION::
+* Texinfo@asis{::}Commands @@-COMMAND INFORMATION::
+* Texinfo@asis{::}Commands @@-COMMAND CLASSES::
+* Texinfo@asis{::}Commands SEE ALSO::
+* Texinfo@asis{::}Commands AUTHOR::
+* Texinfo@asis{::}Commands COPYRIGHT AND LICENSE::
+
+Texinfo::Common
+
+* Texinfo@asis{::}Common NAME::
+* Texinfo@asis{::}Common SYNOPSIS::
+* Texinfo@asis{::}Common NOTES::
+* Texinfo@asis{::}Common DESCRIPTION::
+* Texinfo@asis{::}Common MISC INFORMATION::
+* Texinfo@asis{::}Common @@-COMMAND INFORMATION::
+* Texinfo@asis{::}Common METHODS::
+* Texinfo@asis{::}Common SEE ALSO::
+* Texinfo@asis{::}Common AUTHOR::
+* Texinfo@asis{::}Common COPYRIGHT AND LICENSE::
+
+Texinfo::Parser
+
+* Texinfo@asis{::}Parser NAME::
+* Texinfo@asis{::}Parser SYNOPSIS::
+* Texinfo@asis{::}Parser NOTES::
+* Texinfo@asis{::}Parser DESCRIPTION::
+* Texinfo@asis{::}Parser METHODS::
+* Texinfo@asis{::}Parser TEXINFO TREE::
+* Texinfo@asis{::}Parser SEE ALSO::
+* Texinfo@asis{::}Parser AUTHOR::
+* Texinfo@asis{::}Parser COPYRIGHT AND LICENSE::
+
+Texinfo::Parser METHODS
+
+* Texinfo@asis{::}Parser Initialization::
+* Texinfo@asis{::}Parser Parsing Texinfo text::
+
+TEXINFO TREE
+
+* Texinfo@asis{::}Parser Element keys::
+* Texinfo@asis{::}Parser Element types::
+* Texinfo@asis{::}Parser Information available in the @code{info} key::
+* Texinfo@asis{::}Parser Information available in the @code{extra} key::
+
+Element types
+
+* Texinfo@asis{::}Parser Types for command elements::
+* Texinfo@asis{::}Parser Types for text elements::
+* Texinfo@asis{::}Parser Tree container elements::
+* Texinfo@asis{::}Parser Types of container elements::
+
+Information available in the @code{extra} key
+
+* Texinfo@asis{::}Parser Extra keys available for more than one @@-command::
+* Texinfo@asis{::}Parser Extra keys specific of certain @@-commands or
containers::
+
+Texinfo::Document
+
+* Texinfo@asis{::}Document NAME::
+* Texinfo@asis{::}Document SYNOPSIS::
+* Texinfo@asis{::}Document NOTES::
+* Texinfo@asis{::}Document DESCRIPTION::
+* Texinfo@asis{::}Document METHODS::
+* Texinfo@asis{::}Document SEE ALSO::
+* Texinfo@asis{::}Document AUTHOR::
+* Texinfo@asis{::}Document COPYRIGHT AND LICENSE::
+
+Texinfo::Document METHODS
+
+* Texinfo@asis{::}Document Getting document information::
+* Texinfo@asis{::}Document Merging and sorting indices::
+* Texinfo@asis{::}Document Getting errors and error registering object::
+* Texinfo@asis{::}Document Getting customization options values registered in
document::
+* Texinfo@asis{::}Document Registering document and information in document::
+* Texinfo@asis{::}Document Methods for Perl and C code interactions::
+
+Texinfo::ManipulateTree
+
+* Texinfo@asis{::}ManipulateTree NAME::
+* Texinfo@asis{::}ManipulateTree SYNOPSIS::
+* Texinfo@asis{::}ManipulateTree NOTES::
+* Texinfo@asis{::}ManipulateTree DESCRIPTION::
+* Texinfo@asis{::}ManipulateTree METHODS::
+* Texinfo@asis{::}ManipulateTree SEE ALSO::
+* Texinfo@asis{::}ManipulateTree AUTHOR::
+* Texinfo@asis{::}ManipulateTree COPYRIGHT AND LICENSE::
+
+Texinfo::Structuring
+
+* Texinfo@asis{::}Structuring NAME::
+* Texinfo@asis{::}Structuring SYNOPSIS::
+* Texinfo@asis{::}Structuring NOTES::
+* Texinfo@asis{::}Structuring DESCRIPTION::
+* Texinfo@asis{::}Structuring METHODS::
+* Texinfo@asis{::}Structuring SEE ALSO::
+* Texinfo@asis{::}Structuring AUTHOR::
+* Texinfo@asis{::}Structuring COPYRIGHT AND LICENSE::
+
+Texinfo::Report
+
+* Texinfo@asis{::}Report NAME::
+* Texinfo@asis{::}Report SYNOPSIS::
+* Texinfo@asis{::}Report NOTES::
+* Texinfo@asis{::}Report DESCRIPTION::
+* Texinfo@asis{::}Report METHODS::
+* Texinfo@asis{::}Report AUTHOR::
+* Texinfo@asis{::}Report COPYRIGHT AND LICENSE::
+
+Texinfo::Translations
+
+* Texinfo@asis{::}Translations NAME::
+* Texinfo@asis{::}Translations SYNOPSIS::
+* Texinfo@asis{::}Translations NOTES::
+* Texinfo@asis{::}Translations DESCRIPTION::
+* Texinfo@asis{::}Translations METHODS::
+* Texinfo@asis{::}Translations SEE ALSO::
+* Texinfo@asis{::}Translations AUTHOR::
+* Texinfo@asis{::}Translations COPYRIGHT AND LICENSE::
+
+Texinfo::Transformations
+
+* Texinfo@asis{::}Transformations NAME::
+* Texinfo@asis{::}Transformations NOTES::
+* Texinfo@asis{::}Transformations DESCRIPTION::
+* Texinfo@asis{::}Transformations METHODS::
+* Texinfo@asis{::}Transformations SEE ALSO::
+* Texinfo@asis{::}Transformations AUTHOR::
+* Texinfo@asis{::}Transformations COPYRIGHT AND LICENSE::
+
+Texinfo::Indices
+
+* Texinfo@asis{::}Indices NAME::
+* Texinfo@asis{::}Indices SYNOPSIS::
+* Texinfo@asis{::}Indices NOTES::
+* Texinfo@asis{::}Indices DESCRIPTION::
+* Texinfo@asis{::}Indices METHODS::
+* Texinfo@asis{::}Indices SEE ALSO::
+* Texinfo@asis{::}Indices AUTHOR::
+* Texinfo@asis{::}Indices COPYRIGHT AND LICENSE::
+
+Texinfo::OutputUnits
+
+* Texinfo@asis{::}OutputUnits NAME::
+* Texinfo@asis{::}OutputUnits SYNOPSIS::
+* Texinfo@asis{::}OutputUnits NOTES::
+* Texinfo@asis{::}OutputUnits DESCRIPTION::
+* Texinfo@asis{::}OutputUnits METHODS::
+* Texinfo@asis{::}OutputUnits SEE ALSO::
+* Texinfo@asis{::}OutputUnits AUTHOR::
+* Texinfo@asis{::}OutputUnits COPYRIGHT AND LICENSE::
+
+Texinfo::OutputUnits METHODS
+
+* Texinfo@asis{::}OutputUnits Output units creation::
+* Texinfo@asis{::}OutputUnits Grouping output units in pages::
+* Texinfo@asis{::}OutputUnits Setting output units directions::
+
+Texinfo::Convert::Texinfo
+
+* Texinfo@asis{::}Convert@asis{::}Texinfo NAME::
+* Texinfo@asis{::}Convert@asis{::}Texinfo SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}Texinfo NOTES::
+* Texinfo@asis{::}Convert@asis{::}Texinfo DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}Texinfo METHODS::
+* Texinfo@asis{::}Convert@asis{::}Texinfo AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}Texinfo COPYRIGHT AND LICENSE::
+
+Texinfo::Convert::Utils
+
+* Texinfo@asis{::}Convert@asis{::}Utils NAME::
+* Texinfo@asis{::}Convert@asis{::}Utils SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}Utils NOTES::
+* Texinfo@asis{::}Convert@asis{::}Utils DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}Utils METHODS::
+* Texinfo@asis{::}Convert@asis{::}Utils SEE ALSO::
+* Texinfo@asis{::}Convert@asis{::}Utils AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}Utils COPYRIGHT AND LICENSE::
+
+Texinfo::Convert::Unicode
+
+* Texinfo@asis{::}Convert@asis{::}Unicode NAME::
+* Texinfo@asis{::}Convert@asis{::}Unicode SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}Unicode NOTES::
+* Texinfo@asis{::}Convert@asis{::}Unicode DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}Unicode METHODS::
+* Texinfo@asis{::}Convert@asis{::}Unicode AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}Unicode COPYRIGHT AND LICENSE::
+
+Texinfo::Convert::NodeNameNormalization
+
+* Texinfo@asis{::}Convert@asis{::}NodeNameNormalization NAME::
+* Texinfo@asis{::}Convert@asis{::}NodeNameNormalization SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}NodeNameNormalization NOTES::
+* Texinfo@asis{::}Convert@asis{::}NodeNameNormalization DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}NodeNameNormalization METHODS::
+* Texinfo@asis{::}Convert@asis{::}NodeNameNormalization AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}NodeNameNormalization COPYRIGHT AND LICENSE::
+
+Texinfo::Convert::Text
+
+* Texinfo@asis{::}Convert@asis{::}Text NAME::
+* Texinfo@asis{::}Convert@asis{::}Text SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}Text NOTES::
+* Texinfo@asis{::}Convert@asis{::}Text DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}Text METHODS::
+* Texinfo@asis{::}Convert@asis{::}Text AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}Text COPYRIGHT AND LICENSE::
+
+Texinfo::Convert::Converter
+
+* Texinfo@asis{::}Convert@asis{::}Converter NAME::
+* Texinfo@asis{::}Convert@asis{::}Converter SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}Converter NOTES::
+* Texinfo@asis{::}Convert@asis{::}Converter DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}Converter METHODS::
+* Texinfo@asis{::}Convert@asis{::}Converter SEE ALSO::
+* Texinfo@asis{::}Convert@asis{::}Converter AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}Converter COPYRIGHT AND LICENSE::
+
+Texinfo::Convert::Converter METHODS
+
+* Texinfo@asis{::}Convert@asis{::}Converter Converter Initialization::
+* Texinfo@asis{::}Convert@asis{::}Converter Conversion::
+* Texinfo@asis{::}Convert@asis{::}Converter Getting and setting customization
variables::
+* Texinfo@asis{::}Convert@asis{::}Converter Registering error and warning
messages::
+* Texinfo@asis{::}Convert@asis{::}Converter Translations in output documents::
+* Texinfo@asis{::}Convert@asis{::}Converter Index sorting::
+* Texinfo@asis{::}Convert@asis{::}Converter Conversion to XML::
+* Texinfo@asis{::}Convert@asis{::}Converter Helper methods::
+
+Texinfo::Convert::Info
+
+* Texinfo@asis{::}Convert@asis{::}Info NAME::
+* Texinfo@asis{::}Convert@asis{::}Info SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}Info NOTES::
+* Texinfo@asis{::}Convert@asis{::}Info DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}Info METHODS::
+* Texinfo@asis{::}Convert@asis{::}Info AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}Info COPYRIGHT AND LICENSE::
+
+Texinfo::Convert::HTML
+
+* Texinfo@asis{::}Convert@asis{::}HTML NAME::
+* Texinfo@asis{::}Convert@asis{::}HTML SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}HTML NOTES::
+* Texinfo@asis{::}Convert@asis{::}HTML DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}HTML METHODS::
+* Texinfo@asis{::}Convert@asis{::}HTML AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}HTML COPYRIGHT AND LICENSE::
+
+Texinfo::Convert::DocBook
+
+* Texinfo@asis{::}Convert@asis{::}DocBook NAME::
+* Texinfo@asis{::}Convert@asis{::}DocBook SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}DocBook NOTES::
+* Texinfo@asis{::}Convert@asis{::}DocBook DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}DocBook METHODS::
+* Texinfo@asis{::}Convert@asis{::}DocBook AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}DocBook COPYRIGHT AND LICENSE::
+
+Texinfo::Convert::TexinfoMarkup
+
+* Texinfo@asis{::}Convert@asis{::}TexinfoMarkup NAME::
+* Texinfo@asis{::}Convert@asis{::}TexinfoMarkup SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}TexinfoMarkup NOTES::
+* Texinfo@asis{::}Convert@asis{::}TexinfoMarkup DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}TexinfoMarkup METHODS::
+* Texinfo@asis{::}Convert@asis{::}TexinfoMarkup AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}TexinfoMarkup SEE ALSO::
+* Texinfo@asis{::}Convert@asis{::}TexinfoMarkup COPYRIGHT AND LICENSE::
+
+Texinfo::Convert::TexinfoMarkup METHODS
+
+* Texinfo@asis{::}Convert@asis{::}TexinfoMarkup Markup formatting methods
defined by subclasses::
+* Texinfo@asis{::}Convert@asis{::}TexinfoMarkup Formatting state information::
+
+Texinfo::Convert::TexinfoXML
+
+* Texinfo@asis{::}Convert@asis{::}TexinfoXML NAME::
+* Texinfo@asis{::}Convert@asis{::}TexinfoXML SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}TexinfoXML NOTES::
+* Texinfo@asis{::}Convert@asis{::}TexinfoXML DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}TexinfoXML METHODS::
+* Texinfo@asis{::}Convert@asis{::}TexinfoXML AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}TexinfoXML COPYRIGHT AND LICENSE::
+
+Texinfo::Convert::Plaintext
+
+* Texinfo@asis{::}Convert@asis{::}Plaintext NAME::
+* Texinfo@asis{::}Convert@asis{::}Plaintext SYNOPSIS::
+* Texinfo@asis{::}Convert@asis{::}Plaintext NOTES::
+* Texinfo@asis{::}Convert@asis{::}Plaintext DESCRIPTION::
+* Texinfo@asis{::}Convert@asis{::}Plaintext METHODS::
+* Texinfo@asis{::}Convert@asis{::}Plaintext AUTHOR::
+* Texinfo@asis{::}Convert@asis{::}Plaintext COPYRIGHT AND LICENSE::
+@end detailmenu
+@end menu
+
+@include api_includes/Texinfo-Commands.texi
+@include api_includes/Texinfo-Common.texi
+@include api_includes/Texinfo-Parser.texi
+@include api_includes/Texinfo-Document.texi
+@include api_includes/Texinfo-ManipulateTree.texi
+@include api_includes/Texinfo-Structuring.texi
+@include api_includes/Texinfo-Report.texi
+@include api_includes/Texinfo-Translations.texi
+@include api_includes/Texinfo-Transformations.texi
+@include api_includes/Texinfo-Indices.texi
+@include api_includes/Texinfo-OutputUnits.texi
+@include api_includes/Texinfo-Convert-Texinfo.texi
+@include api_includes/Texinfo-Convert-Utils.texi
+@include api_includes/Texinfo-Convert-Unicode.texi
+@include api_includes/Texinfo-Convert-NodeNameNormalization.texi
+@include api_includes/Texinfo-Convert-Text.texi
+@include api_includes/Texinfo-Convert-Converter.texi
+@include api_includes/Texinfo-Convert-Info.texi
+@include api_includes/Texinfo-Convert-HTML.texi
+@include api_includes/Texinfo-Convert-DocBook.texi
+@include api_includes/Texinfo-Convert-TexinfoMarkup.texi
+@include api_includes/Texinfo-Convert-TexinfoXML.texi
+@include api_includes/Texinfo-Convert-Plaintext.texi
+
+
+@node Index
+@appendix Index
+
+@printindex cp
+
+@bye