1.5 Producing Different Audio Views

AS TE R can render a given object in more than one way. The listener can switch among any of several predefined renderings for a given object to produce different views, or add to these by defining new rendering rules.

Activating a rendering rule is the simplest way of changing how a given object is rendered. Statement

(activate-rule <object-name> <rule-name>)

activates rule <rule-name> for object <object-name>. Thus, executing (activate-rule ’paragraph ’summarize)

activates rule summarize for object paragraph.

Suppose we wish to skip all instances of verbatim text in a LATEX document. We could define and activate the following quiet rendering rule for object verbatim:

  (def-reading-rule (verbatim quiet) nil)

Later, to hear the verbatim text in a document, the previously activated rule quiet can be deactivated by executing

  (deactivate-rule 'verbatim)

Notice that at any given time, only one rendering rule is active for any object. Hence, we need only specify the object name when deactivating a rendering rule.

Activating a new rule is a convenient way of changing how instances of a specific object are rendered. Rendering styles enable the user to make more global changes to the renderings. Activating style style-1 by executing

  (activate-style 'style-1)

activates rendering rule style-1 for all objects for which this rendering rule is defined. All other objects continue to be rendered as before. This is also true when a sequence of rendering styles is successively activated. Thus, activating rendering styles is a convenient way of progressively customizing the rendering of a complex document.

The effect of activating a style can be undone at any time by executing

(deactivate-style <style-name>)

AS TE R provides the following rendering styles:

When AS TE R is initialized, the following styles are active, with the leftmost style being the most recently activated style.

  (use-special-pattern descriptive simple default)

Defining a new rendering style is equivalent to defining a collection of rendering rules having the same name. Note that a rendering style need not provide rules for all objects in the document logical structure. As explained earlier, activating a style only affects the renderings of those objects for which the style provides a rule.