Re: Super and Subscripts

Fisher Mark (FisherM@is3.indy.tce.com)
Wed, 18 Jan 95 07:03:55 EST

Bert Bos writes in <199501161549.AA136081381@freya.let.rug.nl>:
>Reply-To: bert@let.rug.nl
>Ideal would be a syntax that is easy to format, yet still allowed
>unambigous translation for input to an equation solver. It may require
>that the author insert `invisible parentheses' like <BOX></BOX> to
>make the meaning clear. Wasn't Phil Hallam-Baker working on such a
>system?

The `invisible parentheses' idea is similar to what UNIX's EQN
preprocessor does with '{}'. For example, the equation would be
something like this in EQN:

.EQ
E ~=~ { c sup 2 } m
.EN
where we use '{}' to force the superscript 2 to belong to 'c'.

Offhand, I would think that less ambiguity would be caused by a rule
like 'superscripts should be applied to the immediately preceding
`regular` atom' rather than 'superscripts should be applied after all
items within a subexpression have been found' (which I think is the
other logical alternative).

Something relatively hairy (compared to E=mc^2 :)), like the roots
from a quadratic equation:
r , r -b +- sqrt(b^2 - 4ac)
1 2 = ---------------------
2a
would require some kind of grouping mechanism:
<math>
r<sub>1</sub>,r<sub>2</sub> =
<divide_over>
<numerator>-b +- <sqrt>b<sup>2</sup> - 4ac</sqrt></numerator>
<denominator>2a</denominator>
</divide_over>
</math>
just to keep it all straight (IMHO). Apologies if I have tag names
wrong; I don't have the math proposal handy.
======================================================================
Mark Fisher Thomson Consumer Electronics
fisherm@indy.tce.com Indianapolis, IN

"Just as you should not underestimate the bandwidth of a station wagon
traveling 65 mph filled with 8mm tapes, you should not overestimate
the bandwidth of FTP by mail."