As described in Chapter 2, no semantic interpretation is attached to mathematical content
at the recognition step. AS TE R can be enhanced to recognize specialized notation
and produce context-sensitive renderings (e.g., speak x^{2} as “x squared”). Some
context-specific processing is needed to produce such renderings, and this section
outlines the kind of information that is available: the weight of an object and special
patterns.

Measure weight quantifies the complexity of math expressions. The weight function is defined as follows:

- The weight of a leaf node with attributes is 1 plus the sum of the weights of its attributes. Attributes are themselves math objects, and their weight is computed recursively.
- The weight function on non-leaf nodes is defined recursively:

Recognizing special patterns makes renderings sound more natural. Consider how
experienced readers speak math expressions. Even though is spoken as “the fraction a
plus b divided by c”, is spoken as “one half a”. In addition, mathematical notation is
inherently ambiguous, with the same notational construct being overloaded to mean different
things in different contexts. Thus, the −1’s in x^{−1} and sin^{−1}x have different meanings.
The recognizer treats both occurrences of the −1 as a visual attribute of the object
being superscripted. The decision to treat the −1 appearing as a superscript to the
function as denoting the function inverse is made by rendering rules based on special
patterns.

Since such interpretation is context sensitive, the quasi-prefix
representation is enhanced —before an object is rendered, special-pattern (a
memoized^{7}
function) is called to identify special patterns. A user can specify additional patterns by
providing method definitions on function special-pattern for specific object types. These
special patterns can then be turned on by calling
(turn-on-special-pattern <object-name>).

The user can provide rendering rules named <pattern> for object <object>, which get invoked when the particular special pattern is seen. Individual special patterns can be turned off by executing statement (turn-off-special-pattern <object-name>).

All special patterns can be turned off by deactivating style use-special-patterns.

Special patterns built into AS TE R include:

- 2 as the superscript is interpreted as squaring, 3 as cubing etc.
- T as the superscript of a valid matrix expression denotes transpose.
- −1 as the superscript of a function name denotes function inverse.
- D
_{x}^{n}denotes a derivative.