From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uBtuCX07QGMMVQEAbAwnHQ (envelope-from ) for ; Fri, 07 Oct 2022 16:45:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iC6BCX07QGPmIgEAauVa8A (envelope-from ) for ; Fri, 07 Oct 2022 16:45:17 +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 BA28C2F52D for ; Fri, 7 Oct 2022 16:45:16 +0200 (CEST) Received: from localhost ([::1]:47780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogobD-00057b-SK for larch@yhetil.org; Fri, 07 Oct 2022 10:45:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ognXE-00042E-Sa for emacs-orgmode@gnu.org; Fri, 07 Oct 2022 09:37:05 -0400 Received: from mr85p00im-ztdg06021201.me.com ([17.58.23.189]:40750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ognXC-0005lo-BM for emacs-orgmode@gnu.org; Fri, 07 Oct 2022 09:37:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1665149819; bh=HFRhnFuGlVthNj2auck30Jt9VTwLlZLjNjCEIKamT+U=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=RL45cy6+3qxeHg9UAzbEuvopxvxoSGlS60QMYCD3dpmrEQ/ossAK6JZsyV5nI3+mc UohyBlKFNG/b8fEBt7TK+a7YkUWwdNWCrPsRG5SRtzTkgjYhXRMi45Mlsoxw/jzieo MWw0XuTMAilAya42M6p0gy65VDV1L9Pl2Oul8DDSgWlC4eRfM9+hxAe8rafMTbCZKX LwpQmSrDpL3LO4l9IgucNESPx7BGXKBNlH1b5bOe787Tm4uP+QH3HNXmo1uQHqKjZb 5H8lb3sfhODzC9l3vkhApA9/GBDlt49T9i3Gihsmvcl9HjWh+JcYF3YFvmZpjCZO4l URvUweJXUZpXA== Received: from Rudolfs-MacBook-Air.local (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-ztdg06021201.me.com (Postfix) with ESMTPSA id AA5E0320D2F for ; Fri, 7 Oct 2022 13:36:58 +0000 (UTC) From: =?utf-8?Q?Rudolf_Adamkovi=C4=8D?= To: emacs-orgmode@gnu.org Subject: Update Org to MathJax 3 Date: Fri, 07 Oct 2022 15:36:54 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Proofpoint-GUID: 3Bgy_HenI-017Tp96nP1xeNspnXpeFO_ X-Proofpoint-ORIG-GUID: 3Bgy_HenI-017Tp96nP1xeNspnXpeFO_ X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.138,18.0.572,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2020-02-14=5F11:2020-02-14=5F02,2020-02-14=5F11,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxscore=0 bulkscore=0 malwarescore=0 spamscore=0 adultscore=0 phishscore=0 mlxlogscore=601 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210070082 Received-SPF: pass client-ip=17.58.23.189; envelope-from=salutis@me.com; helo=mr85p00im-ztdg06021201.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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=1665153916; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=HFRhnFuGlVthNj2auck30Jt9VTwLlZLjNjCEIKamT+U=; b=Y+m53Lob5EWqmdFIBs7R6jun+/vvBCSWf+qAU0r/k+eTC1PitzCqc8qI0yMLBnFINZkZLf MOUiIQVuHvMmolU25RFc25JVYJnqHnhSODRNzQ1XqspcejKKk9YFABaXJQdvQuqUB0sJHa KZiBoo2EKveGXErB4IeKWEyKNqSiStqYB39GUzJI7vQM91QNhf2GwcNiyhoaPeZEnSvPYb LgQOERWSUnXZ6VT69BmZ2BIR1rgBvjHW0m+FdwOFQZtCyfKUJxNf+8ZK/ETYQI/4lMdp6z q6SB/tFpCgJzlvwvp68McunuEiDScdwXQjlO7ZUHGu8tWcSizg6k/LTR7vgotA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665153916; a=rsa-sha256; cv=none; b=gz7ftYJtj+NP80ZsEJUMD1NygWXckfrJPqbZhEaTVBClTqY/Xz724hyfrXx4/RE5bZFuez 1bhpDIGH390Of+V/+Gon1qH20+sPMBSginIl0+gjRRwNhpYUjreaucDF6EfRQCboeIeXve KHwdlFy+q7u4TV5NWDOmGsp+axHVSoFYANSIEHbS6h2UFbDjNg5lpQrTJs7bhDx7PgjkXT 7qgX6/JEKJqwTUUCEEZ86zqb2NXxYR3kf2fhhMx8bFXPRqWRyboRw3hlh/zEasJKpF5BMQ g0Wee+kuByEWozOFCdneZlb12aq/mqA8Gt/37PBl8QOa+PkMps8a0Ye4VP80EQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=me.com header.s=1a1hai header.b=RL45cy6+; dmarc=pass (policy=quarantine) header.from=me.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: -8.17 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=me.com header.s=1a1hai header.b=RL45cy6+; dmarc=pass (policy=quarantine) header.from=me.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: BA28C2F52D X-Spam-Score: -8.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: vUD7YIMkfQmi --=-=-= Content-Type: text/plain 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 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? Rudy --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-ox-html-Use-MathJax-3-instead-of-2.7.patch >From ca2eaf5bcc9ea01e764f6088e37d74ec2be6e426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= Date: Fri, 7 Oct 2022 15:03:48 +0200 Subject: [PATCH] ox-html: Use MathJax 3 instead of 2.7 * lisp/ox-html.el (org-html-mathjax-options): WIP * lisp/ox-html.el (org-html-mathjax-template): WIP --- lisp/ox-html.el | 51 +++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 9b77e4f8d..c6242d4bc 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1166,12 +1166,12 @@ See `format-time-string' for more information on its components." ;;;; Template :: Mathjax (defcustom org-html-mathjax-options - '((path "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML" ) - (scale "100") + '((path "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js") + (scale "1") ;; TODO: 0-1 AND NOT 0-100; NUMBER AND NOT STRING (align "center") - (font "TeX") - (linebreaks "false") - (autonumber "AMS") + (font "TeX") ;; TODO: NOT SUPPORTED + (linebreaks "false") ;; TODO: NOT SUPPORTED + (autonumber "ams") ;; TODO: NOW CALLED TAGS AND IN LOWERCASE (indent "0em") (multlinewidth "85%") (tagindent ".8em") @@ -1244,27 +1244,28 @@ For further information about MathJax options, see the MathJax documentation: (const "right"))))) (defcustom org-html-mathjax-template - " -" + +" "The MathJax template. See also `org-html-mathjax-options'." :group 'org-export-html :type 'string) -- 2.37.3 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 "Mathematics takes us still further from what is human into the region of absolute necessity, to which not only the actual world, but every possible world, must conform." -- Bertrand Russell, 1902 Rudolf Adamkovi=C4=8D [he/him] Studenohorsk=C3=A1 25 84103 Bratislava Slovakia --=-=-=--