From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uL30A9WjqGFZCAEAgWs5BA (envelope-from ) for ; Thu, 02 Dec 2021 11:45:41 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QMNNO9SjqGGePAAA1q6Kng (envelope-from ) for ; Thu, 02 Dec 2021 10:45:40 +0000 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 69FBD26D6 for ; Thu, 2 Dec 2021 11:45:40 +0100 (CET) Received: from localhost ([::1]:50384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msjat-0006tq-HS for larch@yhetil.org; Thu, 02 Dec 2021 05:45:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msjaJ-0006sB-PW for guix-patches@gnu.org; Thu, 02 Dec 2021 05:45:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35228) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msjaI-0006Xp-Sb for guix-patches@gnu.org; Thu, 02 Dec 2021 05:45:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1msjaI-0003N3-E0 for guix-patches@gnu.org; Thu, 02 Dec 2021 05:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52241] [PATCH] gnu: Add js-mathjax-3. Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Dec 2021 10:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52241@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163844189412918 (code B ref -1); Thu, 02 Dec 2021 10:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Dec 2021 10:44:54 +0000 Received: from localhost ([127.0.0.1]:46774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msja9-0003MH-OM for submit@debbugs.gnu.org; Thu, 02 Dec 2021 05:44:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:51840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msja8-0003M8-2e for submit@debbugs.gnu.org; Thu, 02 Dec 2021 05:44:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msja7-0006i9-QS for guix-patches@gnu.org; Thu, 02 Dec 2021 05:44:51 -0500 Received: from mout-p-201.mailbox.org ([80.241.56.171]:16044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1msja3-0006W0-Ox for guix-patches@gnu.org; Thu, 02 Dec 2021 05:44:51 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4J4Xdm5mRbzQkM3 for ; Thu, 2 Dec 2021 11:44:44 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1638441882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2f77oDTMN14eUTfTU1yALbxewdzjaeCam2fioT2YWhw=; b=rAtqSCMQTPHKvJhSu295yxEKBQ1Hb/qNjvs3IZmNlRxUicJGRB0qUiboeN1KPJry6VlPQ0 S4dW7b7cEq88+Duu5oAm/dd7Wqjo9ZhR2JE1O1q/bbU3vWOoaDxRRfHlITdOV15XMM8Nei 74D3m1la2joQL0Ky0Zw37Y6aOOGTY3C8t+fmpo7AiB7GQtxBXxBGLJGwxQAjEAL7f18BdE w1kA/Onv0JgEaNTivdjY8f/ovGQaUFDXoaTul9tP3vjDqEOnpwHtMskbBEg30Gubi6kEGy mDtkSEYLfS3vsZ9q34LWokMbRejLH0Lm54uNUGcK6Sa5bYpwfgjNfyjPoSTbJw== Date: Thu, 2 Dec 2021 11:44:37 +0100 From: Lars-Dominik Braun Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="FFvDGqvvjn9ASCrA" Content-Disposition: inline Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=80.241.56.171; envelope-from=lars@6xq.net; helo=mout-p-201.mailbox.org 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" 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=1638441940; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=2f77oDTMN14eUTfTU1yALbxewdzjaeCam2fioT2YWhw=; b=VrJnkCKzhhS15o8E3tBKNX2e6jpef/AtE9vVffvHIckaAC2OYQj2to8tg3uIHb7QfwTERA h5FD4y9Y/7J3K2CgHVBA0cLsL8ggUalUKD3wkz1sWcs81fAfj7xSI3ELrcK9Gm6fq0SJOx qByHS5OUhQXC8d7hQTQ+jxM/3+/FJie00G3BNkkCVgNoBzA8h62FZcSKgpXXcX5tqERtwQ N+L3t955bcM7xPsb94Sj56NBGKpr3YHO/jp0wHrlsZcIgeB3F5NI5d2O1j7NWG8ujSlB8Y z9UjFxBg6uAFXPN90/baElpEyCBKhljqjdFlw2mFeQyxdOn77jBkNdAYdD6NFA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638441940; a=rsa-sha256; cv=none; b=XYmOq5bdP3mYrp50AzSgh5i2t7cR7TKk/agLNCzLZPje+xfcav2Rs4mp14dwGQbUvlHNRN dXzNgwsSDvdI7ebPGcQ5kgulx1kiiVSQnc7qsYGTCpUotcBhoOC5F5Yc0P3/VkSpgaJo5O q/Dzt/akvzja6E7kmQ02v+V1IPIaGOgvjOwvamd+GGHagXgsfllj3+tfrKAcnd5ARST/66 PpQ//+SQSIjk4ku2ML5+jflRQvJqOcAQnhxDhvBbNsTrPg/ooaQF3juUi4h5Ol5EnBp4+x SixlWz0ZM8TX4zX/PVO+aHf4FQ6qMgzrMq37J6FZS+aGDsIzI3TkLCMb+M3flQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=rAtqSCMQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.22 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=rAtqSCMQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 69FBD26D6 X-Spam-Score: -2.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: f+enAoUTrpYk --FFvDGqvvjn9ASCrA Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi all, attached is my stab at building MathJax@3 from source. The main problem doing so is that we cannot build any of its build-time dependencies (TypeScript compile, webpack, babel, …) and some of its runtime-dependencies (speech-rule-engine) from source right now. Fortunately esbuild can interpret TypeScript and transpile it to ES6-compatible JavaScript usable by modern browsers, so we don’t need any of the build-time dependencies. Removing speech-rule-engine disables all accessibility features, but that’s a price we have to pay 🤷 Rendering standard formulas seems to work flawlessly in CHTML mode. But module loading (for example for chemical formulas inside \ce{}) seems to be broken. Although the modules are built and loaded by the browser MathJax does not render the LaTeX environment correctly. I’m guessing this affects all modules that are not built-in, so I suggest using *-full builds for now, which have all modules built-in and consequently don’t have this problem. I hope the code has enough documentation for others to understand what I’m doing and why. Cheers, Lars --FFvDGqvvjn9ASCrA Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-Add-js-mathjax-3.patch" Content-Transfer-Encoding: 8bit >From 4f3a1cde0a5a059ea28d8a460e5fbb0ec26da5c2 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 2 Dec 2021 11:32:54 +0100 Subject: [PATCH] gnu: Add js-mathjax-3. * gnu/packages/javascript.scm (js-mathjax-3): New variable. * gnu/packages/patches/mathjax-disable-webpack.patch, gnu/packages/patches/mathjax-no-a11y.patch: New patches. * gnu/local.mk (dist_patch_DATA): Register them. --- gnu/local.mk | 2 + gnu/packages/javascript.scm | 120 ++++++++ .../patches/mathjax-disable-webpack.patch | 23 ++ gnu/packages/patches/mathjax-no-a11y.patch | 286 ++++++++++++++++++ 4 files changed, 431 insertions(+) create mode 100644 gnu/packages/patches/mathjax-disable-webpack.patch create mode 100644 gnu/packages/patches/mathjax-no-a11y.patch diff --git a/gnu/local.mk b/gnu/local.mk index a5c0486c94..d5d40b8a43 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1452,6 +1452,8 @@ dist_patch_DATA = \ %D%/packages/patches/mariadb-CVE-2021-27928.patch \ %D%/packages/patches/mars-install.patch \ %D%/packages/patches/mars-sfml-2.3.patch \ + %D%/packages/patches/mathjax-disable-webpack.patch \ + %D%/packages/patches/mathjax-no-a11y.patch \ %D%/packages/patches/maxima-defsystem-mkdir.patch \ %D%/packages/patches/maven-enforcer-api-fix-old-dependencies.patch \ %D%/packages/patches/maven-generate-component-xml.patch \ diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index 6d4efe2c92..6bcf453bd6 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -26,6 +26,7 @@ (define-module (gnu packages javascript) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages compression) + #:use-module (gnu packages node) #:use-module (gnu packages readline) #:use-module (gnu packages uglifyjs) #:use-module (gnu packages web) @@ -188,6 +189,125 @@ (define-public js-mathjax write web documents that include mathematics and be confident that readers will be able to view it naturally and easily."))) +(define-public js-mathjax-3 + (package + (name "js-mathjax") + (version "3.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mathjax/MathJax-src") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "05lm6nw7rzpcc5yz7xsjxi4id9369vvnrksx82nglxrqrpws97wx")) + (patches (search-patches "mathjax-disable-webpack.patch" + "mathjax-no-a11y.patch")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'prepare-sources + (lambda* (#:key inputs #:allow-other-keys) + ;; All a11y components depend on speech-rule-engine, which cannot be + ;; built from source. Since this only affects accessibility, remove them. + (delete-file-recursively "ts/a11y") + (delete-file-recursively "components/src/a11y") + (delete-file-recursively "components/src/sre") + (delete-file-recursively "components/src/node-main") + + ;; Copy sources of dependencies, so we can create symlinks. + (mkdir-p "node_modules") + (with-directory-excursion "node_modules" + (for-each + (lambda (p) + (copy-recursively (assoc-ref inputs (string-append "node-" p)) p)) + '("mj-context-menu" "mhchemparser"))) + + ;; Make sure esbuild can find imports. This way we don’t have to rewrite files. + (symlink "ts" "js") + (symlink "ts" "node_modules/mj-context-menu/js"))) + (delete 'configure) + (replace 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((esbuild (string-append (assoc-ref inputs "esbuild") + "/bin/esbuild")) + (node (string-append (assoc-ref inputs "node") + "/bin/node")) + (target (string-append (assoc-ref outputs "out") + "/share/javascript/mathjax/es5"))) + ;; Preprocess files and generate lib/ subdirs. + (invoke node "components/bin/makeAll") + ;; Build components. + (apply + invoke + esbuild + "--bundle" + "--minify" + ;; esbuild cannot transpile some features to ES5, so use ES6 instead. + "--target=es6" + (string-append "--outdir=" target) + "--sourcemap" + "--outbase=components/src" + "--define:__dirname=\"/\"" + ;; In the browser the global object is window, see + ;; https://developer.mozilla.org/en-US/docs/Glossary/Global_object + "--define:global=window" + ;; Find all component entry points, which have the same name as their + ;; parent directory. + (filter + (lambda (f) + (string=? + (basename (dirname f)) + (string-drop-right (basename f) 3))) + (find-files "components/src" "\\.js$"))) + ;; Move all .js files into their parent directory, where MathJax + ;; expects them. + (for-each + (lambda (f) + (rename-file f (string-append (dirname (dirname f)) "/" (basename f)))) + (find-files target "\\.js(\\.map)?$")) + ;; Copy font files. + (copy-recursively + "ts/output/chtml/fonts/tex-woff-v2" + (string-append target "/output/chtml/fonts/woff-v2"))))) + (delete 'check) + (delete 'install)))) + (native-inputs + `(("esbuild" ,esbuild) + ("node" ,node-lts) + ("node-mj-context-menu" + ,(let ((name "context-menu") + (version "0.6.1")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zorkow/context-menu.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1q063l6477z285j6h5wvccp6iswvlp0jmb96sgk32sh0lf7nhknh"))))) + ("node-mhchemparser" + ,(let ((name "mhchemparser") + ;; Version 4.1.1. There are no tags. + (version "b1bd0670df7e9bbd5a724ac642aa2664d6e500b3")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mhchem/mhchemParser.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1g72kbxzf9f2igidpma3jwk28ln4bp3qhwspmhnm79baf3701dgv"))))))) + (home-page "https://www.mathjax.org/") + (synopsis (package-synopsis js-mathjax)) + (description (package-description js-mathjax)) + (license license:asl2.0))) + (define-public js-commander (package (name "js-commander") diff --git a/gnu/packages/patches/mathjax-disable-webpack.patch b/gnu/packages/patches/mathjax-disable-webpack.patch new file mode 100644 index 0000000000..7e3d705c15 --- /dev/null +++ b/gnu/packages/patches/mathjax-disable-webpack.patch @@ -0,0 +1,23 @@ +commit 0cfd5b23aed8767f2bcf9583c1feaf4c9a64703a +Author: Lars-Dominik Braun +Date: Wed Dec 1 14:27:33 2021 +0100 + + guix: Disable webpack + + Guix uses esbuild to “link” the files. We only need the build step. + +diff --git a/components/bin/makeAll b/components/bin/makeAll +index 3e7a8914..5dae9b9b 100755 +--- a/components/bin/makeAll ++++ b/components/bin/makeAll +@@ -61,8 +61,8 @@ function processList(dirs) { + for (const dir of dirs) { + const fulldir = path.resolve(dir); + processDir(fulldir, buildLib); +- processDir(fulldir, webpackLib); +- processDir(fulldir, copyLib); ++ //processDir(fulldir, webpackLib); ++ //processDir(fulldir, copyLib); + } + } + diff --git a/gnu/packages/patches/mathjax-no-a11y.patch b/gnu/packages/patches/mathjax-no-a11y.patch new file mode 100644 index 0000000000..40fb514b5a --- /dev/null +++ b/gnu/packages/patches/mathjax-no-a11y.patch @@ -0,0 +1,286 @@ +commit 9bb6f1e11264fb075bfa70fa3684f10a32414594 +Author: Lars-Dominik Braun +Date: Wed Dec 1 14:28:06 2021 +0100 + + guix: Remove accessibility. + + We cannot build speech-rule-engine from source and thus all dependents + must be removed. This affects all a11y modules and menu items, which + may try to load components. + +diff --git a/components/src/dependencies.js b/components/src/dependencies.js +index f9be6f93..822f8fb6 100644 +--- a/components/src/dependencies.js ++++ b/components/src/dependencies.js +@@ -16,9 +16,6 @@ + */ + + export const dependencies = { +- 'a11y/semantic-enrich': ['input/mml', '[sre]'], +- 'a11y/complexity': ['a11y/semantic-enrich'], +- 'a11y/explorer': ['a11y/semantic-enrich', 'ui/menu'], + '[mml]/mml3': ['input/mml'], + '[tex]/all-packages': ['input/tex-base'], + '[tex]/action': ['input/tex-base', '[tex]/newcommand'], +@@ -58,7 +55,6 @@ export const dependencies = { + export const paths = { + tex: '[mathjax]/input/tex/extensions', + mml: '[mathjax]/input/mml/extensions', +- sre: '[mathjax]/sre/' + (typeof window === 'undefined' ? 'sre-node' : 'sre_browser') + }; + + const allPackages = [ +diff --git a/components/src/mml-chtml/mml-chtml.js b/components/src/mml-chtml/mml-chtml.js +index c0bd18ee..a283a1ab 100644 +--- a/components/src/mml-chtml/mml-chtml.js ++++ b/components/src/mml-chtml/mml-chtml.js +@@ -5,5 +5,4 @@ import '../input/mml/mml.js'; + import '../output/chtml/chtml.js'; + import '../output/chtml/fonts/tex/tex.js'; + import '../ui/menu/menu.js'; +-import '../a11y/assistive-mml/assistive-mml.js'; + import '../startup/startup.js'; +diff --git a/components/src/mml-chtml/preload.js b/components/src/mml-chtml/preload.js +index e3f202f7..3699570e 100644 +--- a/components/src/mml-chtml/preload.js ++++ b/components/src/mml-chtml/preload.js +@@ -5,5 +5,5 @@ Loader.preLoad( + 'core', + 'input/mml', + 'output/chtml', 'output/chtml/fonts/tex.js', +- 'ui/menu', 'a11y/assistive-mml' ++ 'ui/menu' + ); +diff --git a/components/src/mml-svg/mml-svg.js b/components/src/mml-svg/mml-svg.js +index 172b2433..23b66e69 100644 +--- a/components/src/mml-svg/mml-svg.js ++++ b/components/src/mml-svg/mml-svg.js +@@ -5,5 +5,4 @@ import '../input/mml/mml.js'; + import '../output/svg/svg.js'; + import '../output/svg/fonts/tex/tex.js'; + import '../ui/menu/menu.js'; +-import '../a11y/assistive-mml/assistive-mml.js'; + import '../startup/startup.js'; +diff --git a/components/src/mml-svg/preload.js b/components/src/mml-svg/preload.js +index 3cb47d42..89f6b9f9 100644 +--- a/components/src/mml-svg/preload.js ++++ b/components/src/mml-svg/preload.js +@@ -5,5 +5,5 @@ Loader.preLoad( + 'core', + 'input/mml', + 'output/svg', 'output/svg/fonts/tex.js', +- 'ui/menu', 'a11y/assistive-mml' ++ 'ui/menu' + ); +diff --git a/components/src/source.js b/components/src/source.js +index ba6d6835..02ecf18d 100644 +--- a/components/src/source.js ++++ b/components/src/source.js +@@ -62,12 +62,6 @@ export const source = { + 'output/chtml/fonts/tex': `${src}/output/chtml/fonts/tex/tex.js`, + 'output/svg': `${src}/output/svg/svg.js`, + 'output/svg/fonts/tex': `${src}/output/svg/fonts/tex/tex.js`, +- 'a11y/assistive-mml': `${src}/a11y/assistive-mml/assistive-mml.js`, +- 'a11y/semantic-enrich': `${src}/a11y/semantic-enrich/semantic-enrich.js`, +- 'a11y/complexity': `${src}/a11y/complexity/complexity.js`, +- 'a11y/explorer': `${src}/a11y/explorer/explorer.js`, +- '[sre]': (typeof window === 'undefined' ? `${src}/../../js/a11y/sre-node.js` : +- `${src}/../../node_modules/speech-rule-engine/lib/sre_browser.js`), + 'ui/lazy': `${src}/ui/lazy/lazy.js`, + 'ui/menu': `${src}/ui/menu/menu.js`, + 'ui/safe': `${src}/ui/safe/safe.js`, +diff --git a/components/src/tex-chtml-full/preload.js b/components/src/tex-chtml-full/preload.js +index 76c81c92..0eb3a8e2 100644 +--- a/components/src/tex-chtml-full/preload.js ++++ b/components/src/tex-chtml-full/preload.js +@@ -5,5 +5,5 @@ Loader.preLoad( + 'core', + 'input/tex-full', + 'output/chtml', 'output/chtml/fonts/tex.js', +- 'ui/menu', 'a11y/assistive-mml' ++ 'ui/menu' + ); +diff --git a/components/src/tex-chtml-full/tex-chtml-full.js b/components/src/tex-chtml-full/tex-chtml-full.js +index 12291be9..c3f59e6b 100644 +--- a/components/src/tex-chtml-full/tex-chtml-full.js ++++ b/components/src/tex-chtml-full/tex-chtml-full.js +@@ -5,5 +5,4 @@ import '../input/tex-full/tex-full.js'; + import '../output/chtml/chtml.js'; + import '../output/chtml/fonts/tex/tex.js'; + import '../ui/menu/menu.js'; +-import '../a11y/assistive-mml/assistive-mml.js'; + import '../startup/startup.js'; +diff --git a/components/src/tex-chtml/preload.js b/components/src/tex-chtml/preload.js +index 89f110c5..5dae092f 100644 +--- a/components/src/tex-chtml/preload.js ++++ b/components/src/tex-chtml/preload.js +@@ -5,5 +5,5 @@ Loader.preLoad( + 'core', + 'input/tex', + 'output/chtml', 'output/chtml/fonts/tex.js', +- 'ui/menu', 'a11y/assistive-mml' ++ 'ui/menu' + ); +diff --git a/components/src/tex-chtml/tex-chtml.js b/components/src/tex-chtml/tex-chtml.js +index 8d98865e..4d100a48 100644 +--- a/components/src/tex-chtml/tex-chtml.js ++++ b/components/src/tex-chtml/tex-chtml.js +@@ -5,5 +5,4 @@ import '../input/tex/tex.js'; + import '../output/chtml/chtml.js'; + import '../output/chtml/fonts/tex/tex.js'; + import '../ui/menu/menu.js'; +-import '../a11y/assistive-mml/assistive-mml.js'; + import '../startup/startup.js'; +diff --git a/components/src/tex-mml-chtml/preload.js b/components/src/tex-mml-chtml/preload.js +index 7adb6a3b..3945370f 100644 +--- a/components/src/tex-mml-chtml/preload.js ++++ b/components/src/tex-mml-chtml/preload.js +@@ -5,5 +5,5 @@ Loader.preLoad( + 'core', + 'input/tex', 'input/mml', + 'output/chtml', 'output/chtml/fonts/tex.js', +- 'ui/menu', 'a11y/assistive-mml' ++ 'ui/menu' + ); +diff --git a/components/src/tex-mml-chtml/tex-mml-chtml.js b/components/src/tex-mml-chtml/tex-mml-chtml.js +index 4167bd59..0b068dc6 100644 +--- a/components/src/tex-mml-chtml/tex-mml-chtml.js ++++ b/components/src/tex-mml-chtml/tex-mml-chtml.js +@@ -6,5 +6,4 @@ import '../input/mml/mml.js'; + import '../output/chtml/chtml.js'; + import '../output/chtml/fonts/tex/tex.js'; + import '../ui/menu/menu.js'; +-import '../a11y/assistive-mml/assistive-mml.js'; + import '../startup/startup.js'; +diff --git a/components/src/tex-mml-svg/preload.js b/components/src/tex-mml-svg/preload.js +index 69d6a2c5..bad39af1 100644 +--- a/components/src/tex-mml-svg/preload.js ++++ b/components/src/tex-mml-svg/preload.js +@@ -5,5 +5,5 @@ Loader.preLoad( + 'core', + 'input/tex', 'input/mml', + 'output/svg', 'output/svg/fonts/tex.js', +- 'ui/menu', 'a11y/assistive-mml' ++ 'ui/menu' + ); +diff --git a/components/src/tex-mml-svg/tex-mml-svg.js b/components/src/tex-mml-svg/tex-mml-svg.js +index acff78dd..3ca4e6cf 100644 +--- a/components/src/tex-mml-svg/tex-mml-svg.js ++++ b/components/src/tex-mml-svg/tex-mml-svg.js +@@ -6,5 +6,4 @@ import '../input/mml/mml.js'; + import '../output/svg/svg.js'; + import '../output/svg/fonts/tex/tex.js'; + import '../ui/menu/menu.js'; +-import '../a11y/assistive-mml/assistive-mml.js'; + import '../startup/startup.js'; +diff --git a/components/src/tex-svg-full/preload.js b/components/src/tex-svg-full/preload.js +index d4165cf8..8871781a 100644 +--- a/components/src/tex-svg-full/preload.js ++++ b/components/src/tex-svg-full/preload.js +@@ -5,5 +5,5 @@ Loader.preLoad( + 'core', + 'input/tex-full', + 'output/svg', 'output/svg/fonts/tex.js', +- 'ui/menu', 'a11y/assistive-mml' ++ 'ui/menu' + ); +diff --git a/components/src/tex-svg-full/tex-svg-full.js b/components/src/tex-svg-full/tex-svg-full.js +index 55ce32f2..09c7e65c 100644 +--- a/components/src/tex-svg-full/tex-svg-full.js ++++ b/components/src/tex-svg-full/tex-svg-full.js +@@ -5,5 +5,4 @@ import '../input/tex-full/tex-full.js'; + import '../output/svg/svg.js'; + import '../output/svg/fonts/tex/tex.js'; + import '../ui/menu/menu.js'; +-import '../a11y/assistive-mml/assistive-mml.js'; + import '../startup/startup.js'; +diff --git a/components/src/tex-svg/preload.js b/components/src/tex-svg/preload.js +index 284ce317..3eb02665 100644 +--- a/components/src/tex-svg/preload.js ++++ b/components/src/tex-svg/preload.js +@@ -5,5 +5,5 @@ Loader.preLoad( + 'core', + 'input/tex', + 'output/svg', 'output/svg/fonts/tex.js', +- 'ui/menu', 'a11y/assistive-mml' ++ 'ui/menu' + ); +diff --git a/components/src/tex-svg/tex-svg.js b/components/src/tex-svg/tex-svg.js +index f4ce644e..5d8caa5c 100644 +--- a/components/src/tex-svg/tex-svg.js ++++ b/components/src/tex-svg/tex-svg.js +@@ -5,5 +5,4 @@ import '../input/tex/tex.js'; + import '../output/svg/svg.js'; + import '../output/svg/fonts/tex/tex.js'; + import '../ui/menu/menu.js'; +-import '../a11y/assistive-mml/assistive-mml.js'; + import '../startup/startup.js'; +diff --git a/ts/ui/menu/Menu.ts b/ts/ui/menu/Menu.ts +index 7553aafc..ca0b9780 100644 +--- a/ts/ui/menu/Menu.ts ++++ b/ts/ui/menu/Menu.ts +@@ -135,7 +135,7 @@ export class Menu { + autocollapse: false, + collapsible: false, + inTabOrder: true, +- assistiveMml: true, ++ assistiveMml: false, + explorer: false + }, + jax: { +@@ -475,7 +475,7 @@ export class Menu { + this.command('Reset', 'Reset to defaults', () => this.resetDefaults()) + ]), + this.submenu('Accessibility', 'Accessibility', [ +- this.checkbox('Activate', 'Activate', 'explorer'), ++ this.checkbox('Activate', 'Activate', 'explorer', {disabled: true}), + this.submenu('Speech', 'Speech', [ + this.checkbox('Speech', 'Speech Output', 'speech'), + this.checkbox('Subtitles', 'Speech Subtitles', 'subtitles'), +@@ -534,11 +534,11 @@ export class Menu { + this.checkbox('Prefix', 'Prefix', 'infoPrefix') + ], true), + this.rule(), +- this.checkbox('Collapsible', 'Collapsible Math', 'collapsible'), ++ this.checkbox('Collapsible', 'Collapsible Math', 'collapsible', {disabled: true}), + this.checkbox('AutoCollapse', 'Auto Collapse', 'autocollapse', {disabled: true}), + this.rule(), + this.checkbox('InTabOrder', 'Include in Tab Order', 'inTabOrder'), +- this.checkbox('AssistiveMml', 'Include Hidden MathML', 'assistiveMml') ++ this.checkbox('AssistiveMml', 'Include Hidden MathML', 'assistiveMml', {disabled: true}) + ]), + this.submenu('Language', 'Language'), + this.rule(), +@@ -722,6 +722,7 @@ export class Menu { + * @param {boolean} mml True to output hidden Mathml, false to not + */ + protected setAssistiveMml(mml: boolean) { ++ mml = false; + this.document.options.enableAssistiveMml = mml; + if (!mml || (MathJax._.a11y && MathJax._.a11y['assistive-mml'])) { + this.rerender(); +@@ -734,6 +735,7 @@ export class Menu { + * @param {boolean} explore True to enable the explorer, false to not + */ + protected setExplorer(explore: boolean) { ++ explore = false; + this.enableExplorerItems(explore); + this.document.options.enableExplorer = explore; + if (!explore || (MathJax._.a11y && MathJax._.a11y.explorer)) { +@@ -747,6 +749,7 @@ export class Menu { + * @param {boolean} collapse True to enable collapsible math, false to not + */ + protected setCollapsible(collapse: boolean) { ++ collapse = false; + this.document.options.enableComplexity = collapse; + if (!collapse || (MathJax._.a11y && MathJax._.a11y.complexity)) { + this.rerender(STATE.COMPILED); +@@ -845,6 +848,8 @@ export class Menu { + * @param {string} component The name of the a11y component to load + */ + public loadA11y(component: string) { ++ console.log ('ignoring load for', component); ++ return; + const noEnrich = !STATE.ENRICHED; + this.loadComponent('a11y/' + component, () => { + const startup = MathJax.startup; -- 2.32.0 --FFvDGqvvjn9ASCrA--