12.1 Dynamic Converter Formatting Information

To get the current paragraph and preformatted number, use paragraph_number or preformatted_number:

Function: $number = $converter->paragraph_number ()
Function: $number = $converter->preformatted_number ()

Return the current paragraph or preformatted container number in the current formatting context.

To get the topmost block @-command being converted, use top_block_command:

Function: $command_name = $converter->top_block_command ()

Return the most recent block @-command seen in the current formatting context.

To get the text filling and alignement context, determined by @flushleft or @center, use in_align:

Function: $align_context = $converter->in_align ()

If the alignment context is the default alignement context, return undef. Otherwise, returns the command name of the alignment context.

To determine if the conversion is in a context converted multiple times, use in_multi_expanded:

Function: $multi_expanded_context_information = $converter->in_multi_expanded ()

Return a string representing the multiple expanded context, or undef if not in a multiple expanded context.

To get the location of an image file, use html_image_file_location_name:

Function: ($image_file, $image_basefile, $image_extension, $image_path, $image_path_encoding) = $converter->html_image_file_location_name ($command_name, \%element, \@args)

$command_name, \%element and \@args should be the arguments of an @image @-command formatting (see Command Tree Element Conversion Functions).

The return values gives information on the image file if found, or fallback values. $image_file is the relative image file name. It is the file name used in formatting of the @image command in the default case. $image_basefile is the base file name of the image, without extension, corresponding to the @image @-command first argument. $image_extension is the image file extension (without a leading dot). $image_path is the path to the actual image file, undef if no file was found. $image_path is returned as a binary string, the other strings returned are character strings. $image_path_encoding is the encoding used to encode the image path to a binary string.

See Conversion in Preformatted Context for information on getting preformatted commands and container types nesting information.