From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73641: 30.0.90; Math in EWW/shr Date: Thu, 10 Oct 2024 10:43:53 +0300 Message-ID: <8634l42yiu.fsf@gnu.org> References: <87ttdqmywv.fsf@gmail.com> <8634lawp14.fsf@gnu.org> <87bjzsa28z.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18029"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73641@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 10 09:45:13 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1synrF-0004Xf-BF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Oct 2024 09:45:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1synqx-0004cr-U3; Thu, 10 Oct 2024 03:44:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1synqw-0004cd-1d for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 03:44:54 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1synqt-0001FG-SC for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 03:44:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=gVNNlNoOYhM2GjxtP+rsjY+5HazLgP+HgS9YO4+cKYM=; b=Yw0YtC2BwsbjQlhEHMbP3R09KnL7ijBeYTkF+RhfsFe7qQiMXwSbBlLhIiP6Fs+hG9xNQ0yeHV4mYKzZjWLaEA8f9UGgbBkJibieybSBzktvKDZ3gR2d7yTrJkqp1iGlnSGzVCpKyOj6T7j4NRZtXdJgFhgoUm0G5XPgqOcN4rKxWdj9ha6OlP60Q2xNjHqpeX1GjFg40dRaA7rxt5qlQpKitiKk23BiLGkO7WfUWWskcWrW7gPHV3rhz2UJfd1IhWAAYvDw1FfvZmChu30V3xHu5BKzQrAtgW+PTocZ1I9qJsmhHWFHusoMqUHNhqQGrXiRvi1SdRLyoY/oy3U4Lg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1synr4-0000VG-Hi for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 03:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Oct 2024 07:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73641 X-GNU-PR-Package: emacs Original-Received: via spool by 73641-submit@debbugs.gnu.org id=B73641.17285462531859 (code B ref 73641); Thu, 10 Oct 2024 07:45:02 +0000 Original-Received: (at 73641) by debbugs.gnu.org; 10 Oct 2024 07:44:13 +0000 Original-Received: from localhost ([127.0.0.1]:58565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1synqG-0000Tu-Ts for submit@debbugs.gnu.org; Thu, 10 Oct 2024 03:44:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1synqF-0000Te-2A for 73641@debbugs.gnu.org; Thu, 10 Oct 2024 03:44:11 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1synpy-0001A0-MD; Thu, 10 Oct 2024 03:43:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=gVNNlNoOYhM2GjxtP+rsjY+5HazLgP+HgS9YO4+cKYM=; b=l8yrcO5PORte B1bMJmpLKGrtreuv61uKOBwPWdXKEZ/4QPirLgaajXvz6Qit7Q4LX95LFV4RJaACkpgERiObGmEId TkDG4jf75yDQbNbKsmDpf+nvqgS11q+aX5urqzpog8RT+ZGum3osEfwy5G3DEAxg1S4POkqBwPwpB x8TCy16F7mIJVklY6wWWNSnEnq4/xFNihoLDRHWfdltnB2LIaOCBGcyJNOt5tCyOFUgdlqAfHdppN SeVoiQd2JO4K1M0hzo1aIIIvodeZxo3u4mlGjhIsdQJTD7mtTOmi24CIc6fzviFN7EzhMCIxp+iHI tIanXSOANY8CJvmgi+MIPw==; In-Reply-To: <87bjzsa28z.fsf@gmail.com> (message from Augusto Stoffel on Thu, 10 Oct 2024 08:41:32 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293256 Archived-At: > From: Augusto Stoffel > Cc: 73641@debbugs.gnu.org > Date: Thu, 10 Oct 2024 08:41:32 +0200 > > On Sat, 5 Oct 2024 at 18:24, Eli Zaretskii wrote: > > >> From: Augusto Stoffel > >> Date: Sat, 05 Oct 2024 16:01:36 +0200 > >> > >> It is possible for the element to include a SVG rendition of the > >> formula. We could consider displaying that if available (not sure how > >> common it is, though). Also, we might consider including infrastructure > >> to render MathML, but this would require external programs (there is no > >> reason to reinvent MathJax). I've done that in one of my packages, see > >> this commit for the relevant code: > >> > >> https://github.com/astoff/devdocs.el/commit/04a8793072f1fc7c23f115e2c7ee83ce669b6fa4 > >> > >> (Actually, I added a version of the above to two of my packages already, > >> so I think it's pretty clear Emacs should have some general > >> math-rendering infrastructure.) > > > > I agree that it would be good for Emacs to support math rendering, but > > we need to find the best way of doing that, and then look for a > > library or a program that implements that. Maybe the first step would > > be to conduct a survey of available methods and tools. > > Sure, but my suggestion above for a "baseline" implementation of the > math tag in shr makes sense anyway IMO. Should I prepare a patch? 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? > 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. The (distant) second best is a tool that generates an image. Thanks.