next up previous contents index
Next: .mozyrc File Up: Help Database Files Previous: Help Database Files   Contents   Index

Anchor Text

Clickable references in the HTML text have the usual form:

<a href="something">highlighted text</a>
Here, ``something'' can be a help database keyword or an ordinary URL.

One can use named anchors in help keywords. This means that the `#' symbol is holy, and should not be used in help keywords. The named anchors can appear in the !!HTML part of the help database entries in the usual HTML way, e.g.

!!KEYWORD
somekeyword
...
!!HTML
    ...
    <a name="refname">some text</a>

Then, referencing forms like ``!help somekeyword#refname'' and <a href="somekeyword#refname">blather</a> will bring up the ``somekeyword'' topic, but with ``some text'' at the top of the help window, rather than the start of the document.

There is an additional capability: `$' expansion. If the first character of an anchor URL is `$', it is processed specially. The leading word is replaced with other text, either an internal path, or an environment variable. The internally recognized tokens are:

$HELP replaced by first component of the help path
$EXAMPLES replaced by path to examples
$DOCS replaced by path to docs
$SCRIPTS replaced by path to scripts

Otherwise, if it matches a variable in the environment, it is replaced by the environment variable value. If no match, it is left alone.

The paths are derived from the first component of the Help path. If the HelpPath variable is ``/usr/local/lib/xictools/xic/help /blather/help'', then the substitution paths are /usr/local/lib/xictools/xic/examples'', etc.

If the first character of an anchor URL is `~', the path is tilde expanded. This is done after `$' substitution. Tildes denote a user's home directory: ``~/mydir'' might expand to ``/users/you/mydir'', and ``~joe/joesdir'' might expand to ``/users/joe/joesdir'', etc.

In WRspice, one can source files from anchor text in the HTML viewer, if the anchor text consists of a file name with a ``.cir'' extension. Thus, if one has a circuit file named ``mycircuit.cir'', and the HTML text in the help window contains a reference like

<a html="mycircuit.cir">click here</a>
then clicking on the ``click here'' tag will source mycircuit.cir into WRspice. Similarly, anchor references to files with a ``.raw'' extension will be loaded into WRspice (as a rawfile, i.e., a plot data file) when the anchor is clicked.


next up previous contents index
Next: .mozyrc File Up: Help Database Files Previous: Help Database Files   Contents   Index
Stephen R. Whiteley 2006-10-23