Texinfo tree elements that are not text container nor directly associated with
an @-command can have information set on their formatting. The first piece of
information is whether their contents should be considered in code context (see Init File Expansion Contexts: Normal, Preformatted, Code, String, Math). The other piece of information is the type of
preformatted environment they are, analogous with the @-command names of
@example
or @display
2.
The function used is texinfo_register_type_format_info
:
$type is the type of the container. If $code_type is set, the container
contents are assumed to be in code context. See Init File Expansion Contexts: Normal, Preformatted, Code, String, Math. If $pre_class_type is set, the HTML <pre>
elements
class attribute are based on $pre_class_type, if there are such HTML
elements output for preformatted content of $type containers.
For example, to set content appearing in-between node links in @menu
,
which is in the menu_comment
container type
to be formatted in a code context, with preformatted type ‘menu-between’, use:
texinfo_register_type_format_info('menu_comment', 1, 'menu-between');
See (texi2any_internals)Texinfo::Parser Types of container elements, for a description of container types.
Note that setting the type of preformatted environment does not make sure that there are preformatted containers used for the formatting of their contents instead of paragraph containers, since this is determined in the very first step of parsing the Texinfo code, which cannot be customized.