next up previous contents index
Next: Property Specifications 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/share/xictools/xic/help /blather/help'', then the substitution paths are /usr/local/share/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/yourhome/mydir'', and ``~joe/joesdir'' might expand to ``/users/joe/joesdir'', etc.

In Xic, one can open Xic input files from anchor text in the HTML viewer. The type of file is recognized by the suffix. These are:

CGX .cgx (.gz may follow)
GDSII .gds, .str, .strm, .stream (.gz may follow)
OASIS .oas
CIF .cif
Xic .xic

Native Xic files are only recognized if they have a .xic extension. In the case where an Xic file has no extension, or another extension, it will have to be copied or linked to provide the .xic extension before it can be accessed through anchor text. The anchor text is given in the normal way, e.g.

Click <a href="http://somewhere/lib/cell.gds">here</a> to view the design.
Click <a href="/usr/joe/library/joecell.gds">here</a> to view Joe's cell.

In addition, if a reference has a .scr suffix, it is taken to be a script file, and is executed. Thus, one can execute Xic scripts by clicking on an anchor. The referenced script is expected to be found somewhere in the script path, or be defined in the technology file.

For example, the HTML text in a file to be viewed with the help system might contain the line

Click <a href="myscript.scr">here</a> to execute myscript.
The script myscript.scr must exist somewhere in the script path, or be defined in the technology file. When the user clicks on ``here'', this script will be executed.

In WRspice, a similar capability exists. 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: Property Specifications Up: Help Database Files Previous: Help Database Files   Contents   Index
Stephen R. Whiteley 2012-04-01