Prev Next

Example Cross References And Multiple Children in One File

cref
cref_example.omh
cref_children.omh
Execute Example
Example In This Web Site

cref
The cross reference command cref is used to link to another destination in the same web site. If the requested destination does not exist, a warning is printed on stdout .

cref_example.omh
Use the editor of your choice to create the file cref_example.omh in the xam directory with the following contents:
 
     $begin cref_example$$
     $spell
     	cref
     	omh
     	getstarted
     	omhelp
     	OMhelp
     $$
     
     $section Cross Reference Examples With One Argument$$
     
     $head Cross Reference Tag$$
     The first argument to a cref command is the text
     that the user sees for the link.
     This is also the default value for the cross reference tag of the
     section that we are linking to.
     Each section starts with a begin command
     that contains its cross reference tag as an argument.
     The cross reference tag for this section is $code cref_example$$.
     
     $head Examples$$
     $cref cref_child_1$$, $cref cref_child_2$$.
     
     $head cref_children.omh$$
     $verbatim%omh/getstarted/cref_children.omh%
     	5%BEGIN_CREF_CHILDREN%END_CREF_CHILDREN%0
     %$$
     
     $contents%
     	omh/getstarted/cref_children.omh
     %$$
     
     $end
You can also just copy cref_example.omh from the omh/getstarted directory .

cref_children.omh
Copy omh/getstarted/cref_children.omh from the omh/getstarted Directory to the xam directory . In the copy of cref_example.omh, change omh/getstarted/cref_children.omh to cref_children.omh.

Execute Example
Once you have copied the files mentioned above, you can execute omhelp with example_name equal to cref_example.

Example In This Web Site
You can view the result of making cref_example.omh part of the OMhelp help web site by selecting cref_example .
Input File: omh/getstarted/start_cref.omh