# Configuring Annotation Icons

## User-definable icons by Annotation type (aka "dynamic icons")

As of Release 6.2, the icon used to mark the location of an annotation within an annotated document may be changed by the user.

In release 6.2 the icon that denotes an annotation is chosen as a property of the annotation type. By including an RDF property of each annotation type you wish to use, you select the icon associated with annotations of that type.

The sample configuration that is shipped with release 6.2 associates the following icons:

| Advice
| Change
| Comment
| Example
| Explanation
| Question
| SeeAlso

The property name for adding annotation icons is http://www.w3.org/2001/10/typeIcon#usesIcon. For instance, to specify an icon named file:///home/question-icon.jpg for annotations that have type http://www.w3.org/2000/10/annotationType#Question you would enter the following RDF/XML into a file that Amaya reads at startup is:

    <rdf:RDF
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns:i = "http://www.w3.org/2001/10/typeIcon#">
    <rdf:Description rdf:about="http://www.w3.org/2000/10/annotationType#Question">
      <i:usesIcon rdf:resource="file:///home/question-icon.jpg" />
    </rdf:Description>
    </rdf:RDF>

The simplest way to get such RDF loaded into Amaya at startup is to include the file in the config/annot.schemas file in the Amaya program directory. In order to preserve this file so that it will not be overwritten when you install a new version of Amaya, you should copy the config/annot.schemas file into your personal Amaya home directory; ~/.amaya/annot.schemas (on Unix systems) or /winnt/profiles/<username>/amaya/annot.schemas (on Microsoft Windows systems). You may list as many RDF files as you want in annot.schemas. See the comments in the file included in the Amaya kit for more details.

Release 6.2 includes a sample file named "typeIcon.rdf" that declares unique icons for each annotation type declared in the http://www.w3.org/2000/10/annotationType# namespace. To experiment with user-defined icons, it may be easiest to copy this typeIcon.rdf into another directory and modify it. Copy annot.schemas to your Amaya home directory and change the line near the end to point to your revised icon definition file.

To revert to the previous behavior prior to release 6.2, edit the config/annot.schemas in the Amaya installation directory and add a comment character ("#") at the beginning of the line near the end that refers to typeIcon.rdf:

    #user-defined icons
    #http://www.w3.org/2001/10/typeIcon# $THOTDIR/config/typeIcon.rdf

Amaya supports JPEG, PNG, and GIF bitmap graphics formats for icon images. In release 6.2 the icon URI may only be a file: URI; that is, the icon must appear in a local or mounted directory to Amaya. Two special forms of non-file: URIs are supported. If the file path name starts with "$THOTDIR" or "$APP_HOME" then the corresponding Amaya installation directory or personal Amaya home directory is substituted into the pathname.