Prev Next cref

General Cross Reference Within a Web Site

Syntax
$cref%text%$$
$cref%text%tag%$$
$cref%text%tag%heading%$$
$cref%text%tag%heading%subheading%$$

See Also
start_cref

Purpose
This command is used to specify a general cross reference link to another location with in the web site being generated by OMhelp. It's argument
     %
text%tag%heading%subheading%
is a delimiter sequence and % can be any character that is not a letter. Leading and trailing white space in text , tag , heading , and subheading is ignored. Thus is useful when the argument list the cref is long and is clearer when put on multiple input lines.

text
The value of text specifies the text that the user selects for the link.

tag
The value of tag specifies the destination cross reference tag for the link. If tag is not present, the value of text is used for the cross reference tag.

heading
The value of heading specifies the destination heading for the link (within the section specified by tag ). If this heading is not present, the link is to the corresponding entire section specified by tag .

subheading
The value of subheading specifies the destination subheading for the link (within the section specified by tag and the heading specified by heading ).

Example
For the following input
 
     $cref/head/$$
text is equal to head, tag is not present, heading is not present, and subheading is not present. The users sees the text head, this links to the section with cross reference tag equal to head, and the link is to the beginning of the section (not a heading within the section). You can see the effect of this by following the link: head .

tag
For the following input
 
     $cref/OMhelp Headings/head/$$
text is equal to OMhelp Headings, tag is equal to head, heading is not present, and subheading is not present. You can see the effect by selecting the following link: OMhelp Headings .

heading
For the following input
 
     $cref/example heading/head/Example Heading/$$
text is equal to example heading, tag is equal to head, heading is equal to Example Heading, and subheading is not present. You can see the effect by selecting the following link: example heading .

subheading
The command below makes use of the fact that leading and trailing white space is ignored. For the following input
 
     $cref/
          the Topic example subheading/
          head/
          Example Subheading/
          Topic
     /$$
text is equal to the Topic example subheading, tag is equal to head, heading is equal to Example Subheading, and subheading is equal to Topic. You can see the effect by selecting the following link: the Topic example subheading

Reference
It is possible that there is no section with the specified cross reference tag and heading. A list of such cross reference tags is printed on stdout when omhelp is run. In this case, no linkage is attempted and the linking text is displayed in red.

White space characters in the heading and subheading are just delimiters between tokens when searching for the matching link. Thus you can split long headings and subheadings into multiple lines.
Input File: cref.omh