Contents Previous Next Down_up_0 Down

Setting Relative Navigation Links For A Section

Syntax
$navigate%type 1%label 1... %type n%label n%$$

Purpose
OMhelp automatically creates navigation links, relative to each section (at the top of each section). The $navigate command determines which navigation links are included, the order of the links, and label for each of the links.

Type
The navigation links have the types listed in the table below.
Type Link to
Content The table of contents section for entire document
Prev The previous section in read order
Next The next section in read order
Top The section at the top of tree (corresponds to root_file )
Up The group of section above this one in tree
Sibling The group of sections with same parent as this one in tree
Down The group of sections directly below this one in tree
Down_up_i The sections directly below the section i levels up in the documentation tree.
where i is a number between 0 and 9.
Across The group of sections that cross reference entire document
Current The group of headings and subheadings for this section
Note that the type Down_up_1 is the same as Sibling and Down_up_0 is the same as Down (but Down_up_2 is not the same as Up).

Example
Suppose that the tree corresponding to a document is
                      A
            B              N    R     W
        C       F         OPQ  STUV  XYZ
       DE     G   J
             HI  KLM
The corresponding read order is  A,  B, ...,  Z. For this example, if the current section is  F
current section  F
The previous section  E
The next section  G
The section above  B
The section two levels up  A
The group above this one  B,  A
The group of siblings  C,  F
The group directly below  G,  J

label
The value label 1 is the label that the user will see for the navigation links corresponding to type 1 . The value label 2 is the label that the user will see for the navigation links corresponding to type 2 and so on. The labels cannot begin with the special character _ with the following special exception:

_up_
i
where i is a number between 0 and 9. In this special case, the cross reference tag for the section i levels up from the current section is used for the label.


Note that the size of the label corresponding to _up_i will change from section to section. Hence the position of subsequent labels in the navigation command will change. Because the user will often repeatedly select Prev or Next, it is desirable to have their positions the same for all sections. This requires placing them before any labels that will change size between sections.

No Such Section
If Down_up_i is the specified type, and there is no section i levels up, neither the label nor its links will be present on the current section. If _up_i is specified label, and there is not section i levels up, neither the label nor its links will be present on the current section.

Default
The default value for the navigation command is
 
     $navigate%
          Prev%Prev%
          Next%Next%
          Across%Index%
          Up%Up%
          Down_up_4%_up_4%
          Down_up_3%_up_3%
          Down_up_2%_up_2%
          Down_up_1%_up_1%
          Down_up_0%_up_0%
          Current%Headings
     %$$

Example
The navigation links for this section were specified with the following command:
 
     $navigate%
          Content%Contents%
          Prev%Previous%
          Next%Next%
          Up%Up%
          Down_up_2%Down_up_2%
          Down_up_1%Down_up_1%
          Down_up_0%Down_up_0%
          Sibling%Sibling%
          Down%Down%
          Across%Across%
          Current%Current
     %$$

Root Section
In the special case where a $navigate command appears in the root section section, and does not appear in the current section, the value specified in the root section is used for the current section; i.e., it replaces the default command above.
Input File: navigate.omh