Subject: Re: bug#73641: 30.0.90; Math in EWW/shr

From: Augusto Stoffel <[email-masked]>
Date: Thu, 10 Oct 2024 12:49:10 +0200

On Thu, 10 Oct 2024 at 10:43, Eli Zaretskii wrote:

> I don't think I understand what you are proposing.  What is the
> "baseline" implementation for math tags? what will it entail and what
> will it allow/enable?

I refer precisely to the code from the bug's first message, which also
has an example of the result.

>> Now, about your question, I think there aren't too many options:
>> 
>> - Good old TeX: widely available among (and only among) scientific
>>   people, gigantic and bloated and slow, no MathML support, excellent at
>>   rendering TeX, has "shell escape" to worry about.
>> 
>> - LuaTeX: like TeX, but probably can do MathML as well.
>> 
>> - MathJax: needs JavaScript, otherwise can be bundled with Emacs (takes
>>   just 2MB), supports MathML, supports TeX notation but not arbitrary
>>   TeX packages, safe by default.
>
> The basic question is what these produce as output, and how can Emacs
> display what they produce?  The best alternative for Emacs is to have
> a tool that can generate characters, which could then be rendered
> using a suitable font.

MathJax is this tool.  It can render formulas as "HTML with complicated
styling" to resize and move around characters and symbols.  I don't
think Emacs could display such things in general.

>  The (distant) second best is a tool that generates an image.

I think an image with readable text beneath it is quite alright.