5.4 Simple Navigation Panel Customization

The navigation panel is the line of links (and labels) that typically appears at the top of each node, so that users can easily get to the next node, the table of contents, and so on. It can be customized extensively.

You can set the ICONS customization variable to use icons for the navigation panel. Setting ICONS is necessary but not sufficient to get icons for direction buttons since no button image is specified in the default case. The ACTIVE_ICONS and PASSIVE_ICONS customization variables need to be set in addition:

ACTIVE_ICONS
PASSIVE_ICONS

Hash references with output unit directions as key (see Directions) and button image icons as values. ACTIVE_ICONS is used for directions actually linking to an output unit, and PASSIVE_ICONS are used if there is no output unit to link to. The button images are interpreted as URLs.

Several arrays and hashes enable even more precise control over the navigation panel buttons and their display. They can be set as customization variables with texinfo_set_from_init_file. See Setting Main Program String Variables.

The following customization variables arrays determine the buttons present in the various navigation panels:

SECTION_BUTTONS

Specifies the navigation panel buttons present at the beginning of sectioning elements in the case of section navigation being enabled or if split at nodes. Specifies the navigation panel buttons present at the page header if split at section and there is no section navigation.

SECTION_FOOTER_BUTTONS
CHAPTER_FOOTER_BUTTONS
NODE_FOOTER_BUTTONS

These arrays specify the navigation panel buttons present in the page footer when the output is split at sections, chapters or nodes, respectively.

CHAPTER_BUTTONS

Specifies the buttons appearing at the page header if split at chapters and there is no section navigation.

MISC_BUTTONS

Specifies the buttons appearing at the beginning of special output units and, if the output is split, at the end of such units.

LINKS_BUTTONS

Used for <link> elements if they are output in the HTML <head>.

TOP_BUTTONS
TOP_FOOTER_BUTTONS

Specifies the buttons used in the top output unit (see Output Units). TOP_BUTTONS buttons are used for the header and TOP_FOOTER_BUTTONS are used for the footer.

Each array specifies which buttons are included, and how they are displayed. Each array item is associated with a button of the navigation panel from left to right. The meaning of the array item values is the following:

string with an output unit direction

If icons are not used, the button is a link to the corresponding output unit whose text is the text direction string (see Direction Strings), surrounded by ‘[’ and ‘]’. If the direction is ‘ ’, the ‘[’ and ‘]’ are omitted.

If icons are used, the button is an image whose file is determined by the value associated with the output unit direction in the ACTIVE_ICONS variable hash if the link leads to an output unit, or in the PASSIVE_ICONS variable hash if there is no output unit to link to. If there is a link to the output unit, the icon links to that output unit. The button name and button description are given as HTML attributes to have a textual description of the icon. The corresponding strings correspond to the button direction string for the button name and the description for a more detailed description (see Direction Strings).

function reference

The functions is called with one arguments, the converter object. The function should return two scalars, the button text and a boolean set if a delimiter is desired before the button.

scalar reference

The scalar value is printed.

array reference of length 2

Here, the first array item should be a an output unit direction. The text of the link depends on the second array item.

reference to a text string

A link to the output unit associated with the output unit direction is generated with the corresponding text used for the text link.

reference to a function

The functions is called with three arguments, the converter object, the output unit direction and the source Texinfo tree element (possibly undef). The function should return two scalars, the button text and a boolean set if a delimiter is desired before the button.

No delimiter is printed before the first button. Leading space buttons mixed with directions not found may be omitted of the navigation panel output.

If the customization variable USE_ACCESSKEY is set, the accesskey attribute is used in navigation. The accesskey direction string is then used for the accesskey attributes (see Direction Strings).

Similarly, if the USE_REL_REV customization variable is set, the rel attribute is used in navigation. In that case the rel direction string is used for the rel attribute (see Direction Strings).