From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iGEnIb8kQWMSxQAAbAwnHQ (envelope-from ) for ; Sat, 08 Oct 2022 09:20:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gMxMIL8kQWNBWgEAG6o9tA (envelope-from ) for ; Sat, 08 Oct 2022 09:20:31 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2802529558 for ; Sat, 8 Oct 2022 09:20:31 +0200 (CEST) Received: from localhost ([::1]:45860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oh48L-0005ar-9o for larch@yhetil.org; Sat, 08 Oct 2022 03:20:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oh47R-0005aR-KY for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 03:19:33 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:51176) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oh47O-0001yu-Ba for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 03:19:33 -0400 Received: by mail-pj1-x102c.google.com with SMTP id h12so336731pjk.0 for ; Sat, 08 Oct 2022 00:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=5Ig0jfYNBouVF211DpJfusn3o2TK7dV2pX5BaGaXzMY=; b=RVvEqQ+tbJ0zUN78wIze40BGB3JuqKIINx4ZLRqRgdFep6fjwRyj6ky0/OVFnYbNaK dzg3nHefK+VgMD/LC7Jf/HHJlRci1xS5x1kYHhLoWQmENCJN6UEXX/ahAPMLl0xi5CQN LrKhp15sbKnVVPXfKPJPT4+08oRDpckv9SLs+dQYktzLr5APOclHTxVyBxt25ylPBH+f wXgYfiNjoOjgxv9K/6T0V95rBo5/y3cWxpwCfF+sc66bisMS+u4dnqzYB4Je6UVKQIRq 0H+QhJmFTzFhOV287gvBy4SVDWXJmg44oihwHh7slAwR4n5qoDUf5SbwXj1IyZoHYmGS twWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version: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=5Ig0jfYNBouVF211DpJfusn3o2TK7dV2pX5BaGaXzMY=; b=w4yDu25Uv6F9dOTBDMZJdSsBOG9HHGSiaC+w2t3o48eazNKcM+f+WJdPJuKsU4Txc+ OXP0i5y0vBW7ZJOHy54XbuyTYXjUJVzoAii+Cy+WXVJniMdmV/Tos+SEydyiOF//jSC6 9L8YSsPoC+n+PtVFMdetzRjiCH8ZGUc+4nnJBQEEusEuVbAmjZ3W2fY+6YknvXaGzDQG lphqYtmDIZ/2DHmxqeS+lNv9ibj022emPhFQ6RMDHlmVT23NixZrNc2jAmlhySu8Ev63 tHeL47DLZqizwbRrFFgHWwGou66zvi2hjcJQARbVV5Ou6NwBZeT8ivuitXQ6cftySiaB 5g/g== X-Gm-Message-State: ACrzQf2Ip0wwgRWiI73EXC47c1/F/MqBeCxsDgM+4EinWrxTulmzTBOv ekn+cbUUf2IHgRtn9Id62qg= X-Google-Smtp-Source: AMsMyM4oeUxIhlDIZDh0I/FrqAjUd+p39Z9qf0PvFHojGPXJa0GjDcpFYpb4VGDcL1+oqN/egUK6Wg== X-Received: by 2002:a17:902:d2c4:b0:178:32c4:6648 with SMTP id n4-20020a170902d2c400b0017832c46648mr8893979plc.88.1665213567391; Sat, 08 Oct 2022 00:19:27 -0700 (PDT) Received: from localhost ([1.83.155.53]) by smtp.gmail.com with ESMTPSA id i29-20020aa796fd000000b005624ce0beb5sm2796475pfq.43.2022.10.08.00.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Oct 2022 00:19:26 -0700 (PDT) From: Ihor Radchenko To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Cc: emacs-orgmode@gnu.org Subject: Re: Update Org to MathJax 3 In-Reply-To: References: Date: Sat, 08 Oct 2022 15:20:17 +0800 Message-ID: <87h70ekci6.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102c.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665213631; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=5Ig0jfYNBouVF211DpJfusn3o2TK7dV2pX5BaGaXzMY=; b=A5s8ljGoxG86YDZS9JpajG7br96h1u6DSU7e/jeIF96bjZv5Bccd9VoY2SshaOojrdv4t0 +Mgvopoq967BZ4Gvn305syKls/5teQ9XC81umfuCGl8HDSSP1Na6W8kpP893Bq/FcXDMHD p/d2FI5TACwcjjwOBbJMKw00mxiL5S4Pg8NyR73o+oWRdeK1I6w2YlU1RqN4+6I8q2zPx5 bx0snxvig4z96HyF1xfO1sBLq54f27CYfUS7ZwzcIgwCx7qnbzHjESpJzTb3R3doeMfXGH lEQiWf2Ae8rq6wxmQsDKu/gDf+i/9nwBf+1Y6njvcY+1h+LJxYnzwhCgSgqcxw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665213631; a=rsa-sha256; cv=none; b=mzCMC5HQ5QLm9aEObG1gEF+062LFT4b5WwKyjt4NyJ0Px0pwyuCq2OXJ/AZv2ezPwXt3AU I/NBCjGsU3h10jJiCmz0w9p8NohIVbXl115ilopdGWwknONqZW5yBaShBkRzh2E6KokTtK PvK3GhmJo0fKaD1bRFbIljNqbk0Z7ZTxmBQgMd3QB59D4rJwvijYP6cNTlU5mBf42dTDCk c0tnFiGXryqcwfdBPQUTigRs1FY2JOct49GqPQbcofbhiNI1vfoC5lBJZMGK1lgAfG3Jhf spE94nvb7qBP/S3Wxc2RikF1dMgySHDjnnTOEPQ0YMCXCDAokjrUHw/b8UZonA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=RVvEqQ+t; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.38 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=RVvEqQ+t; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2802529558 X-Spam-Score: -3.38 X-Migadu-Scanner: scn1.migadu.com X-TUID: Hih/v8gVjN5C Rudolf Adamkovi=C4=8D writes: > Hello smart people! > > With all the talk about Emacs 29, I figured we should update Org Mode to > use MathJax 3, to catch up with the rest of the world. > > From the documentation (for MathJax 3.0 released in 2019): > >> Version 3.0 of MathJax is a complete rewrite of MathJax from the >> ground up, and its usage and configuration is significantly different >> from that of MathJax version 2. > > In practice, MathJax 3.2 renders mathematics faster and better, plus it > significantly improves LaTeX support. For instance, one can typeset > calculus with the built-in (!) 'physics' package, like in LaTeX. > > More information on the recent progress (made in 2019-2021): > > https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html > https://docs.mathjax.org/en/latest/upgrading/whats-new-3.1.html > https://docs.mathjax.org/en/latest/upgrading/whats-new-3.2.html Thanks a lot for this patch! > See the attached [working, but WIP] patch. > > My question for you: > > How do we change the 'org-html-mathjax-options'? > > - 'scale' has now the value in [0, 1] and not in [0, 100] > - 'scale' should exist as a number and not string > - 'font' did not make it to MathJax 3 [*] > - 'linebreaks' did not make it to MathJax 3 [*] > - 'autonumber' has the values in lowercase now > - 'autonumber' became 'tags' in MathJax terminology > > [*] coming in MathJax 4, currently in alpha > > How does Org mode approach these kind of breaking changes? The general rule is "do not break working Org files" or backwards compatibility in other words. See https://bzg.fr/en/the-software-maintainers-pledge/ In particular, it means that the existing #+HTML_MATHJAX options should not be broken when a user uses default value of org-html-mathjax-options and org-html-mathjax-template. WRT this patch, we can employ two different approaches: 1. Keep old Mathjax as default, but add MathJax 3 to customization options and parse the other options depending on the MathJax version in the :path. 2. Change the defaults to MathJax 3. Then, we will also need to make sure that incompatible option syntax in historic Org files does not break the export. The option (1) is easy. We just need to choose two different sets of options in custom interface for org-html-mathjax-options and org-html-mathjax-template. The in-buffer options will then be parsed depending on the :path. The option (2) will make Org export nicer by default, but more tricky to implement. In (2), all the aspects of (1) should still be retained. But in addition, you will also need to detect option values incompatible with MathJax 3 during export. If there is mismatch between the option format and the MathJax version, (a) try to convert the options, which should be possible e.g. for scale and autonumber. (b) if conversion is not possible (say, the options contain font setting), throw a warning and fallback to compatible MathJax version. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at