next up previous contents index
Next: Indicating Differences Between Up: Special Features Previous: Cross References Shown

Customizing the Navigation Panel

    The navigation panel is the strip containing ``buttons'' and text that appears at the top and perhaps at the bottom of each generated page and provides hypertext links to other sections of a document. Some of the options and variables that control whether and where it should appear have already been mentioned.

A simple mechanism for appending customized buttons to the navigation panel is provided by the command htmladdtonavigation. This takes one argument which LaTeX2HTML appends to the navigation panel. For example,

\htmladdtonavigation
   {\htmladdnormallink
      {\htmladdimg{http://server/mybutton.gif}}
      {http://server/link}}
will add an active button mybutton.gif pointing to the specified location.

Apart from these facilities it is also possible to specify completely what appears in the navigation panel and in what order. As each section is processed, LaTeX2HTML assigns relevant information to a number of global variables. These variables are used by the subroutine navigation_panel where the navigation panel is constructed as a string consisting of these variables and some formatting information.

This subroutine can be redefined in a system or a user configuration file ( LATEX2HTMLDIR/latex2html.config and HOME/.latex2html-init respectively). Any combination of text, HTML tags, and the variables mentioned below is acceptable.

The control panel variables are:

Iconic links (buttons)

Textual links (section titles)

If the corresponding section exists each iconic button will contain an active link to that section. If the corresponding section does not exist, the button will be inactive. If the section corresponding to a textual link does not exist then the link will be empty.

The number of words that appears in each textual link is controlled by the variable WORDS_IN_NAVIGATION_PANEL_TITLES which may also be changed in the configuration files.

Below is an example of a navigation panel (the ``.'' is the Perl string concatenation operator and ``#'' signifies a comment).

sub navigation_panel {

    #  Start with a horizontal rule (3-d dividing line)
    "<HR> ".			
    
    # Now add few buttons with a space between them
    "$NEXT $UP $PREVIOUS $CONTENTS $INDEX $CUSTOM_BUTTONS" .
	    
    "<BR>\n" .		# Line break
	
    # If ``next'' section exists, add its title to the navigation panel
    ($NEXT_TITLE ? "<B> Next:</B> $NEXT_TITLE\n" : undef) .
    # Similarly with the ``up'' title ...
    ($UP_TITLE ? "<B>Up:</B> $UP_TITLE\n" : undef) . 
 
    # ... and the ``previous'' title
    ($PREVIOUS_TITLE ? "<B> Previous:</B> $PREVIOUS_TITLE\n" : undef) .
   
    #  Horizontal rule (3-d dividing line) and new paragraph  
    "<HR> <P>\n"		
}


next up previous contents index
Next: Indicating Differences Between Up: Special Features Previous: Cross References Shown



Gary M Wysin
Fri Aug 25 20:57:35 CDT 1995