To customize special output units formatting, a simple possibility is to change the information associated with the special output units.
The following items common to all the special units may be customized:
class
String for special element HTML class attributes.
direction
Direction corresponding to the special element. See Directions.
heading
Special element heading Texinfo code.
heading_tree
Special element heading Texinfo tree.
order
Index determining the sorting order of special elements.
file_string
File string portion prepended to the special element file names, such as ‘_toc’.
target
A string representing the target of the special element, typically used as id attribute and in href attribute.
The heading string is set with heading
, and should be a Texinfo code
string. heading_tree
cannot be set directly, but can be retrieved.
It is determined from heading
after translation and conversion to
a Texinfo tree.
To set the information, use texinfo_register_special_unit_info
in an init file:
Set $item_type information for the special unit variety
$special_unit_variety to $value. $value may be
‘undef’, or an empty string, but only heading
and
target
should be set to that value as a non-empty value is
needed for the other items for formatting.
To get the list of varieties, use get_special_unit_info_varieties
:
$list =
$converter->get_special_unit_info_varieties ($item_type)
¶$item_type is the type of information to be retrieved as described above. The list of the special units varieties with information for the $item_type is returned.
To retrieve the information for formatting, use special_unit_info
:
$list_or_value =
$converter->special_unit_info ($item_type, $special_unit_variety)
¶$item_type is the type of information to be retrieved as described above. $special_unit_variety is a special unit variety, the corresponding value is returned.
The value returned is translated and converted to a Texinfo tree for ‘heading_tree’.