Prev Next path

Setting Input File Search Paths

Syntax
$path%directory%extension%$$

See Also
contents , root section

Warning
The OMhelp documentation uses the path command so that file names in the omh/getstarted directory can be both relative to both the omh directory and the getstarted directory. This is an advanced usage. In general, it is suggested one use file names relative to the root section instead of using the path command.

directory, extension
The text
     %
directory%extension%
is a delimiter sequence

Purpose
This command adds directory to the set of directories that OMhelp searches for files with file extension equal to extension .

Relative Paths
If directory is not a complete path specification , the path specification is relative to the directory where the file containing the root section is located.

Ignored
This command is ignored unless it appears in the root section . This enables one to use one OMhelp web site as a sub-tree of a larger OMhelp web site. (All of the getting started examples are used twice in this way.) Each of these web sites may have its starting file in a different directory and therefore require different path commands.

Example
The following input
 
     $path/c:\src/.cpp/$$
     $path/c:\omwin\function/.mat/$$
adds the directory c:\src to the search path for input files that have the extension .cpp, and the directory c:\omwin\function to the search path for input files that have the extension .mat. The directories are searched in the order that they are specified by the path command. Note that input files are specified by the contents, childtable, and children commands.

Reference
The path command is special in that it persists for other sections and hence it sets the environment for the OMhelp.

Both the forward slash / or the back slash \ can be used as a directory separator character. For example, the path commands above are equivalent to
 
     $path%c:/src%.cpp%$$
     $path%c:/omwin/function%.mat%$$

Input File: path.omh