# Extensible logical structure:

• To: w3c-math-erb@w3.org
• Subject: Extensible logical structure:
• From: "T. V. Raman" <raman@adobe.com>
• Date: Tue, 21 May 1996 14:02:55 -0700
• From raman@mv.us.adobe.com Tue May 21 17: 03:00 1996
• X-Fax: 1(415) 962-6063
• X-Phone: 1 (415) 962-3945

For details on how the notion of an extensible logical structure was built
into AsTeR's parser for handling the TeX family of markup,
see the following sections in my thesis
http://www.cs.cornell.edu/Info/People/raman/current/phd-thesis/html/node20.html#SECTION00212000000000000000

We could use some of the same ideas in implementing the extensible portion of
the html math markup.

The details are in the above ref but in summary, AsTeR used operator
precedence to parse math notation, and everytime you defined a new LaTeX
macro, you supplied the system with certain important bits of information;
e.g. whether the newly defined macro construct represented an operand or an
operator, the precedence if an operator etc. Using this information, it became
possible to treat the newly dfined construct as a first-class citizen in the
class of notation that AsTeR already knew to recognize.

The reason I keep  harping on the need to get the extensibility notions correct
and bootstrap the rest of the system off  such an extensibility model is
that when I implemented AsTeR I initially made the mistake of trying to
implement  parsers for each of the predefined TeX math macros --after the
extensibility mechanism was designed and built --which I had to if I wanted a
useful system-- I actually went back and reimplemented all of the builtin
operators using the extension mechanism. The resulting solution was a lot more
elegant and maintainable than the initial implementation.

In fact the above actually makes sense --after all even (La)TeX implements things
like \over and \frac  using
lower level primitive operators that one never sees --as a consequence, a user
defined construct e.g. \legendre and a system provided construct e.g. \frac
look conceptually equivalent to an author.
Implementing all of AsTeR's recognition on top of the extensibility model
allowed AsTeR to gain a similar advantage when it came to rendering the
structure --rendering a teX builtin construct like \over was no different and
no more complex than rendering the \legendre.

Thanks,
--Raman

--

Best Regards,
____________________________________________________________________________
--raman

Adobe Systems                 Tel: 1 (415) 962 3945   (B-1 115)
Advanced Technology Group     Fax: 1 (415) 962 6063
(E 1-160) 1585 Charleston Road       Email: raman@adobe.com
Mountain View, CA 94039 -7900  raman@cs.cornell.edu
http://www-atg/People/Raman.html (Internal To Adobe)
http://www.cs.cornell.edu/Info/People/raman/raman.html  (Cornell)

Disclaimer: The opinions expressed are my own and in no way should be taken
as representative of my employer, Adobe Systems Inc.
____________________________________________________________________________



Follow-Ups: