<snip>
>
>
> Here's a new proposal for a wording of spec text:
>
> The 'math' role represents a mathematical expression. If the element is
> an HTML "img" element, then the "alt" attribute's value represents the
> expression; otherwise the element's textContent DOM attribute
> represents the expression. [HTML] [DOMCORE] The expression must be in
> a
> format that would be valid TeX if '$' was prepended and appended to the
> expression. User agents must first act as if they truncated the
> expression at the first '$' character, if there is one, and then
> prepend and append '$' characters to the expression, and then parse the
> result as TeX. [TEX]
>
For the reasons discussed in earlier email, '$...$' could mean anything in
TeX. It doesn't have to be math mode, although it almost always is. Saying
something is valid TeX sadly says next to nothing because TeX is so
flexible, almost anything can be valid TeX. Also, you don't want to say
"TeX without macros" since TeX itself uses macros to bootstrap up from core
functionality.
I think you need to pick something TeX-like as what is legal *if* you really
want to restrict the input to "common TeX". For example, blahtex, which is
*not* TeX defines a fixed set of commands that mimic common TeX math
commands. Others have chosen similar, but not identical sets of commands,
so picking one variant will make some people happy, and others unhappy.
Note: one common thing that trips up non-TeX savvy users (and some who are)
is that TeX does not have a standard lexical analyzer, so that in common TeX
usage "a^-1" is really "a^- 1" (the "1" is not in the superscript). Some
of the TeX-like packages used for easy input on the web choose a more
conventional lexer so that "a^-1" would put "-1" in the superscript. It is
one of the decisions to be made when picking some TeX-like input syntax.
Neil Soiffer