[Next] [Up] [Previous]
Next: Cross-references and bookmarks Up: Rendering the current Previous: Rendering the current

Relative renderings

In the above paragraphs, we described the various browser actions that render the current selection. The current selection can be rendered either as if it occurs by itself or as it would be if it were rendered along with the rest of the document. The former is straightforward; we need only execute generic function read-aloud on the current selection. The latter presents an interesting problem.

Specifying that the current selection should be rendered relative to its position in the entire document is analogous to picking a word from the electronic encoding of a book and asking the question:

On what page in the book does this word appear?
In general, answering such a question would involve completely rendering the book. Analogously, rendering the current selection relative to its position in the document can be computationally intensive. We avoid this complexity by recording a pointer to the AFL state that is current when a document object is rendered. On the surface, this seems like it would require a lot of storage. In reality, this approach is both feasible and efficient, because the same AFL states are used to render a large number of the objects appearing in a document.

Recording of AFL states used to render specific objects is made possible by adding an extra slot named afl-state to object document. Initially, the value of this slot is nil, but when an object is rendered for the first time, a pointer to the AFL state that is current when the rendering commences is recorded in this slot. Relative renderings are produced by function read-current-relatively shown below. Notice the use of the AFL block in setting up a lexical scope for the duration of the rendering. Locally setting the AFL state to that recorded in slot afl-state of the object being rendered is sufficient to achieve the desired relative rendering.

[LVerbatim1890]

Relative renderings are most useful when listening to tables and matrices. As described in the chapter on rendering rules (see s:document_content), these are rendered using stereo effects, with the spatial location of the sound indicating the position of elements in the table. When moving through the elements of a table, hearing each element at the right spatial coordinate is useful in keeping track of the location of the current selection. Thus, the user can move the current selection to the rightmost column and then move down this column, hearing each element spoken on the right speaker. As another example of using relative renderings, consider traversing the right-hand side of Faa de Bruno's formula shown in eq:faa-de-bruno. Moving to the subscript of the summation with _ and then executing read-current-relatively results in the constraint being rendered in the ``subscript voice'' -this cues the location of the current selection.



[Next] [Up] [Previous]
Next: Cross-references and bookmarks Up: Rendering the current Previous: Rendering the current



TV Raman
Thu Mar 9 20:10:41 EST 1995