12.1.2 Command Tree Element Opening Functions

User defined functions called when an @-command element is first encountered are registered with texinfo_register_command_opening. In general the possibility to call code at the @-command opening is not used much, as the HTML formatting is in general done when the content appearing in the comand is formatted. In the default conversion functions, this function is used for @quotation, to register prependended text to be output with the following inline container, usually a paragraph. This is described in detail with the inline containers formatting (see Inline Text Containers Paragraph and Preformatted Formatting).

Function: texinfo_register_command_opening ($command_name, \&handler)

$command_name is an @-command name, with the leading @. \&handler is the user defined function reference.

The call of the user defined functions is:

Function Reference: $text command_open ($converter, $command_name, \%element)

$converter is a converter object. $command_name is the @-command name without the @. \%element is the Texinfo element.

The $text returned is prepended to the formatting of the @-command.

It is possible to have access to the default opening function reference. The function used is:

Function: \&default_command_open = $converter->default_command_open ($command_name)

$command_name is the @-command name without the @. Returns the default opening function reference for $command_name, or ‘undef’ if there is none.