From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#73641: 30.0.90; Math in EWW/shr Date: Thu, 10 Oct 2024 08:41:32 +0200 Message-ID: <87bjzsa28z.fsf@gmail.com> References: <87ttdqmywv.fsf@gmail.com> <8634lawp14.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13698"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73641@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 10 08:43:04 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 1symt5-0003P2-AP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Oct 2024 08:43:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1symsu-0006tC-VT; Thu, 10 Oct 2024 02:42:53 -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 1symst-0006sw-Ot for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 02:42:51 -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 1symst-000334-GZ for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 02:42:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=Zhm3pd6rlubrptWnrsK57geWDDd0+2rFpE8JYzOQf4U=; b=u90YOg7r5xk7sA00gtN9fQzi3yDkC8FJXF2QxHjq32rXK9f9k5YbICBHre3G6EjlyBEoMvlcwOomZGte5cPC+gvFYAl4dfRlOHvy0a9wNroPAZZz/arDlA1U6q8j4bnDpvt3TcisnsT1qoiP+JeY0bwtchEjVxwSJBIwPXsfp7CqSopRPTt4vKhvtRaoMEw7QLv2cQElLZxXVXrFML4rX04sJSaHA2vuJS0ma/YT8xFF3F7jOPTdjDEkHHalqhAEtXVh6PJ5u2uEd4+l9S8ZKZrlonMd/f2ms555ojGDLwb1Z46iFfNVVDijBRgdVQiR7c2kkjnQeY7YPdrK/zCY+w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1symt4-0005n6-8h for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 02:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Oct 2024 06:43: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.172854257422245 (code B ref 73641); Thu, 10 Oct 2024 06:43:02 +0000 Original-Received: (at 73641) by debbugs.gnu.org; 10 Oct 2024 06:42:54 +0000 Original-Received: from localhost ([127.0.0.1]:58466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1symsv-0005mj-Sx for submit@debbugs.gnu.org; Thu, 10 Oct 2024 02:42:54 -0400 Original-Received: from mail-ej1-f44.google.com ([209.85.218.44]:44171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1symsu-0005mV-EZ for 73641@debbugs.gnu.org; Thu, 10 Oct 2024 02:42:53 -0400 Original-Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a7aa086b077so78914566b.0 for <73641@debbugs.gnu.org>; Wed, 09 Oct 2024 23:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728542495; x=1729147295; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Zhm3pd6rlubrptWnrsK57geWDDd0+2rFpE8JYzOQf4U=; b=FQbFrhf7jBFX6hpRWVopPu/SYuSNDRDeKPh6PLlDynUodNYo8LRcR8A2IIqXiVVTlJ 0Pw5xNW+n434w0MCH77yAbuezHkKsvfnAe4qZkSCgpgtHzuQe7L1DUo5ypgXPn/QxiGg 6ySSs4FvMrUx4CWrx+drVTt/wZtrbIklrJiOqZ2IjfhpcaAWcXLWtSo0KDjQECWFJEp8 ecE0HOqTdIg3gLDhfS4UEtISA699+vIeX5Pw/3zZZLGqT+kZnuUHzMMgAkZMw3FgVX6Z ZhWnL89AT9p+qGiFUPN01gc62AWR2hdTpR1dPLi8sKDTsV93p5kDD0q6lPo7l9HnfjgO 5DDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728542495; x=1729147295; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Zhm3pd6rlubrptWnrsK57geWDDd0+2rFpE8JYzOQf4U=; b=CEu3ETvhvESRG53CLBDODrhLCvWuhBHJ3awY79taUU+MzTCU6xmXIAzacxXu83n/SQ q614z/v/BytAa0ncFumi57dxWzP0A0KtEYo1vVOKZeg96PFmEYXi0LP2lfcuNrznyBc8 PYrO5Gdyrjjxttx1NCKz+kBtOFgIGfpTDxVrbkx0VnsFVtHPMGIYXPJdMtDoJyveCK2q MzLvIGO4pbVmnHkB+2kimX57bwhdrK8VCHYhAr9FZYdSpi5MtYukxJomgddJI/aPSPZa tXXZ88fffkyhETmgj/Dkpt2f9sH8zDQJ3+Y/pH5x4y5PMqQgqBH005BmVIkq6gLeLeoH vVbA== X-Gm-Message-State: AOJu0YwSGiPc1i8uoQSbFC3VFEiuPr3wB2ZoB4mhxvRBnjmRLkK5sRiJ y/XTgsvI9aQ6HRHDxyyWMWUJO2oHa5aE/AmYaIkNfer1GyQBsSgbQ+tAjQ== X-Google-Smtp-Source: AGHT+IGJHj3qi5630Wqvm+4vwNRkXgwrT+OAHkyvWEflsI6nU297cXMftWeem2IUMl5bESfnCoyjvw== X-Received: by 2002:a17:906:7309:b0:a99:4dc1:b931 with SMTP id a640c23a62f3a-a999e8f728cmr238423066b.64.1728542494769; Wed, 09 Oct 2024 23:41:34 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8a87:ff00::d6f6]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80c0217sm41013566b.110.2024.10.09.23.41.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 23:41:33 -0700 (PDT) In-Reply-To: <8634lawp14.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 05 Oct 2024 18:24:55 +0300") 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:293251 Archived-At: 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? 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.