> ...
>>> is it possible to convince MathJax to render LaTeX syntax that is written in
>>> HTML buttons and in HTML images? For example
>>>
>>> <input type="button" value="$x+y$" />
>>> <img src="...." alt="$x+y$" />
>> ...
>> Part of the yoga of html (and, more generally, all sgml and xml
>> languages) is that attribute values cannot contain markup.
>>
>> So, absent a major shaking of the foundation, the answer is NO.
>>
>
> But javascript shakes that foundation. I think it's fairly safe to
> assume any page using mathjax has access to javascript so any
> attribute value can be extracted at will and stuck in some div
> somewhere and rendered. The div could be styled like a button and
> react to the same events as the original button.
The design of markup organizes the way it is processed. Chaotic
markup leads to chaotic processing.
I suppose mathjax could do something like this, but are you saying it should?
That is, are you saying it should search for paired '$' chars inside
quoted attribute value strings ...
Notwithstanding the fact that for the particular example some
conventional markup might accomplish the purpose intended, perhaps
markup reminiscent of
style="color: rgb(555,777,999);"
like
<input type="button" value="mathjax($x+y$)" />
would be tolerable markup, not that I'm suggesting it.
-- Bill