first previous next last contents


To plot tags, Gap uses a file describing the available tag types and their colours. It is possible for users to edit their own local copies of this file to create custom tag types.

The environment variable GTAGDB is used to specify the location of tag type databases. The GTAGDB variable consists of one or more file pathnames separated by colons. The first file read defines a set of tags and colours. Subsequent files read can define additional tags and also override the earlier tag definitions. To achieve this we load each file from the GTAGDB variable in the order of rightmost first to leftmost last. Thus, as is similar to the unix shell PATH variable, the leftmost pathnames have highest precedence for the resultant tag definitions. The default GTAGDB specified in the staden login and profile scripts is:


Hence the `$STADTABL/GTAGDB' file is read in and the `$HOME/GTAGDB' and `GTAGDB' (a file in the current directory) files are merged if present. So to add a new tag type only to the database local to the current directory, create a `GTAGDB' file in the current directory.

The BNF grammar for the tag database is as follows:

<tag_db>       ::= <tag> <tag_db> | <empty>
<tag>          ::= <tag_long_name> ':' <element_list> '\n'
<element_list> ::= <element> | <element> ':' <element_list> | <empty>
<element>      ::= <option_name> '=' <string>
<option_name>  ::= 'id' | 'bg' | 'dt'

Quoting strings is optional for single words, but necessary when writing a string containing spaces. In plain English, this means that to define the compression tag (COMP) to be displayed in red, with no default annotation string we write:

compression: id="COMP": bg=red

Any lines starting with hash (`#') are considered as comments. Lines ending in backslash (`\') are joined with the next line. Hence the above definition can be written in a clearer form using:

# For marking compressions
compression: \
        id="COMP": \

An example including a default annotation string follows:

# For general comments
comment: \
        id="COMM": \
        bg=MediumBlue: \
        dt="default string"

Colour names available are those recognised by the windowing system. These include colours names defined in the `rgb.txt' file (probably `/usr/lib/X11/rgb.txt' or `/usr/openwin/lib/rgb.txt') and the exact colour specifications using the "#rrggbb" notation.

first previous next last contents
This page is maintained by James Bonfield. Last generated on 2 Febuary 1999.