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>
There is an additional capability: `$' expansion. Words found in anchor text that begin with a dollar sign (`$') character may be replaced by either a path related to the program, the value of a variable saved in the program, or the value of an environment variable. The character that immediately follows the word can not be alphanumeric.
This replacement is handled by a callback to the application, but both Xic (and its derivatives) and WRspice support the following keywords and behavior.
If there is no match to these words, the word, without the dollar sign, is checked against the variable database. If a variable is set with the same name, the string value of the variable replaces the word. If there is no match, but the word without the dollar sign matches tne name of an environment variable, the value of the environment variable will replace the word. If there is no match, there is no substitution. Substitutions are evaluated recursively.
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 ``/home/yourhome/mydir'', and ``~joe/joesdir'' might expand to ``/home/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.