Some general information is available from the converter. This information should not change during conversion.
To determine if an output format such as ‘html’ or ‘tex’
is expanded (see Conditional Commands in Texinfo), use
is_format_expanded
:
$is_format_expanded =
$converter->is_format_expanded ($format)
¶Return true if format $format is expanded, according to command-line and init file information.
The main method to get information from the converter is get_info
:
$info =
$converter->get_info ($item)
¶Return information on $item.
The available information is about:
copying_comment
Text appearing in @copying
with all the Texinfo commands
put into comments (see @copying
in Texinfo).
destination_directory
Destination directory for the output files. It is common to use that string in directory or file paths with functions requiring binary strings. In that case the character string needs to be encoded. See Encoding File Path Strings.
document
The Texinfo::Document
parsed Texinfo document being converted.
Some information relevant for conversion is available from the document
using function accessors:
floats_information
Information on floats. See Texinfo::Document::floats_information.
global_commands_information
Global commands information. See Texinfo::Document::global_commands_information.
global_information
Diverse information. See Texinfo::Document::global_information.
indices_information
Information about defined indices, merged indices and index entries. See Texinfo::Document::indices_information.
sections_list
List of the sectioning commands in the document.
See (texi2any_internals)Texinfo::Document Getting document information on information available from the document.
document_name
Base name of the document. It is common to use that string in in directory or file paths with functions requiring binary strings. In that case the character string needs to be encoded. See Encoding File Path Strings.
documentdescription_string
@documentdescription
argument converted in a string context
(see @documentdescription
in Texinfo). See Init File Expansion Contexts: Normal, Preformatted, Code, String, Math.
expanded_formats
Information on output formats such as ‘html’ or ‘tex’ expansion (see Conditional Commands in Texinfo). An hash reference with format names as key and a true value as value if the format is expanded, according to command-line and init file information.
expanded_formats
information should be consistent with
is_format_expanded
call result (see is_format_expanded
).
jslicenses
An hash reference with categories of javascript used in the document as keys. The corresponding values are also hashes with file names as keys and with array references as values. The array references contain information on each of the file licences, with content
line_break_element
HTML line break element, based on ‘<br>’, also taking into account
USE_XML_SYNTAX
customization variable value.
non_breaking_space
Non breaking space, can be ‘ ’, but also a non breaking
space character or the corresponding numeric entity based on
OUTPUT_CHARACTERS
and USE_NUMERIC_ENTITY
customization variables
values. See Substituting Non Breaking Space.
paragraph_symbol
Paragraph symbol, can be ‘¶’, but also the corresponding numeric entity
or encoded character based on OUTPUT_CHARACTERS
and
USE_NUMERIC_ENTITY
customization variables values.
See HTML Features Customization in Texinfo.
title_string
title_tree
simpletitle_tree
simpletitle_command_name
Some information is deduced from the title commands:
simpletitle reflects @settitle
vs.
@shorttitlepage
, and title is constructed by trying
all the title-related commands, including @top
and
@titlefont
, in the top element.
title_tree
is a Texinfo tree corresponding to the title,
title_string
is the result of the conversion in a string context
(see Init File Expansion Contexts: Normal, Preformatted, Code, String, Math). simpletitle_tree
is
a Texinfo tree corresponding to the simpletitle, and simpletitle_command_name
is the @-command name used for the simpletitle, without the leading @.
title_titlepage
The formatted title, possibly based on @titlepage
, or on
simpletitle_tree
and similar information, depending on SHOW_TITLE
and USE_TITLEPAGE_FOR_TITLE
customization variables in the default case
(see HTML Output Structure Customization in Texinfo).
See Customization of CSS Rules, Imports and Selectors for an explanation on getting information on CSS.