6.7 Conversion General Information

Some general information is available from the converter.

To determine if an output format such as ‘html’ or ‘tex’ is expanded (see Conditional Commands in Texinfo), use is_format_expanded:

Function: $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:

Function: $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).

current_filename

The file name of the current document unit being converted.

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_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.

floats

Information on floats. Gathered from the Texinfo parsing result. See Texinfo::Parser::floats_information.

global_commands

Global commands information. Gathered from the Texinfo parsing result. See Texinfo::Parser::global_commands_information.

index_entries

Information on indices taking into account merged indices. See Texinfo::Structuring::merge_indices.

index_entries_by_letter

Index entries sorted by letter. See Texinfo::Structuring::sort_indices.

indices_information

Information about defined indices, merged indices and index entries. See Texinfo::Parser::indices_information.

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

  1. licence name
  2. license URL
  3. file name or source of file
labels

Association of identifiers to label elements. Gathered from the Texinfo parsing result. See Texinfo::Parser::labels_information.

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 ‘&nbsp;’, but also a non breaking space character or the corresponding numeric entity based on ENABLE_ENCODING and USE_NUMERIC_ENTITY customization variables values.

paragraph_symbol

Paragraph symbol, can be ‘&para;’, but also the corresponding numeric entity or encoded character based on ENABLE_ENCODING and USE_NUMERIC_ENTITY customization variables values.

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 @.

structuring

Information on the document structure. Gathered before the conversion. Two hash keys correspond to interesting information, sectioning_root which points to the top level sectioning command tree element, and sections_list which holds the list of the sectioning commands in the document.

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 Simple Customization of CSS Rules and Imports for an explanation on getting information on CSS.