Iconic Entities in Grail: Customizing the Entity Set

Grail's support for iconic entities is both extensible and customization. This discussion covers both issues, as the mechanism is the same.

Implementation Information

For each iconic entity supported by Grail, a small GIF image is provided in the distribution. These images are located in the icons/ subdirectory of the Grail source directory. Entities are loaded on demand from this directory if no alternate image has been provided.

Within each user's GRAILDIR, the directory icons/ is used to provide alternate images for each icon. Each alternate must be a GIF image file containing the image to be used. The images may be any valid single-image GIF file; transparency is fully supported as with all images used in Grail. For entitity ref, the file GRAILDIR/ref.gif is used as the image source if the file is available. If the file is not provided, the image supplied with Grail is used.

Customizing Images to User Preferences

A user can change the appearance of the icon associated with an image by creating a new icon and placing the GIF file in their GRAILDIR/icons/ directory. The icon can be any size, though we recommend that the icon be approximately as high as the normal text font and that the number of colors be fairly limited.

Extending the Entity Set

The entity set can be extended by each user by adding additional image files to the GRAILDIR/icons/ directory. Extending the set for an entire site can be done by adding new images to the icons/ directory of the Grail source distribution.

SGML general entity references, including those used in HTML, are case sensitive. For platforms with case-sensitive file systems, this should be considered when adding new images.