PackageDescription: StyleDescriptions

Style Descriptions

Last published: January 2, 2009 by 'thawker1'

Defines 4 Classes
Extends 12 Classes

StyleDescriptions is a basic but fairly comprehensive implementation of styles. A style description (or style) is a named and categorized set of emphases applied selectively to text by a highlighter. The style description editor provides a convenient way to edit these through the settings browser. The name of the style is treated as an emphasis name, similar to #bold or #color, but no arguments are required (like #color) since the style contains all appropriate values. The style description implementation only handles six basic capabilities: bold, italic, underline, jagged edge [underline], strike-out, and font/foreground color. This is not the full list of capabilities added by the ExtraEmphases packages, so some work needs to be done to expand this. See the comment for StyleDescriptionEditor for ideas.

There are a couple of things lacking. (1) Style sheets, or collections of styles, are managed as a whole. No conceptual subsets are supported to group styles into logical sets that are manipulated together. It's currently all or nothing. (2) Emphases are still tracked by name. There's nothing inherently wrong with that, since they need to be tracked somehow. Byte styles are applied like emphases, and maybe that's how they should. What is missing is tying them together, so that a style has knowledge of all possible emphases and any of them can be set for any style.