[LVerbatim148]
AsTeR would say
cap a kronecker cap bIn this case, this canonical rendering is quite acceptable.
In general, how AsTeR renders such user-defined structures
is fully customizable. The first step is to extend the
recognizer to handle the new construct, in this case,
\kronecker
. s:macro-objects explains the
principles on which such extensions are based. Here, we give
the reader a brief example of how this mechanism is used in
practice.
The recognizer is extended by calling Lisp macro define-text-object as follows:
[LVerbatim157]
This extends the recognizer; instances of macro
\kronecker
are represented by object
kronecker. The user can now define any number of
renderings for instances of object kronecker.
AFL (see c:afl), our language for audio formatting, is used to define rendering rules (see c:rules_and_styles). Here is one such rendering rule for object kronecker:
[LVerbatim165]
AsTeR would now speak $A \kronecker B$
as
kronecker product of cap a and cab b.Notice that the order in which the elements of [tex2html_wrap5250] are spoken is independent of the order in which they appear on paper. AsTeR derives its power from representing document content as objects and by allowing multiple user-defined rendering rules for individual object types. These rules can cause any number of audio events (ranging from speaking a simple phrase, to playing a digitized sound). Once the recognizer has been extended by an appropriate call to define-text-object, user-defined macros in La)TeX can be handled just as well as any standard La)TeX construct.
To give an example of this, the logo that appears on the
first page of this chapter is produced by La)TeX macro
\asterlogo
. After extending the recognizer with an
appropriate call to define-text-object, we can define
an audio rendering rule that produces a bark when rendering
instances of this macro.