next up previous contents index
Next: Special Features Up: Hypertext Extensions to LaTeX Previous: Hypertext Links in Bibliographic

Customizing the Navigation Panels

    The navigation panels are 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 panels 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
change_begin
subroutines top_navigation_panel and bottom_navigation_panel, where the navigation panel is constructed as a string consisting of these variables and some formatting information.

These subroutines 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.


change_end

The control panel variables are:

Iconic links (buttons)

*PREVIOUS
Points to the previous section
*UP
Points up to the "parent" section
*NEXT
Points to the next section
*NEXT_GROUP
Points to the next "group" section
*PREVIOUS_GROUP
Points to the previous "group" section
*CONTENTS
Points to the contents page if there is one
*INDEX
Points to the index page if there is one

Textual links (section titles)

*PREVIOUS_TITLE
Points to the previous section
*UP_TITLE
Points up to the "parent" section
*NEXT_TITLE
Points to the next section
*NEXT_GROUP_TITLE
Points to the next "group" section
*PREVIOUS_GROUP_TITLE
Points to the previous "group" section

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 top_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: Special Features Up: Hypertext Extensions to LaTeX Previous: Hypertext Links in Bibliographic

Leon Kos
Tue Mar 19 09:29:01 MET 1996