From d0bd67d0d9b417ae9dc2a7416d89a96264b65719 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Mon, 1 Apr 2024 19:35:36 -0400 Subject: [PATCH] Remove the AllPackages file, the all-packages TeX extension and the tex-full component --- components/mjs/dependencies.js | 15 +- components/mjs/input/tex-base/config.json | 1 - components/mjs/input/tex-full/config.json | 16 --- components/mjs/input/tex-full/tex-full.js | 12 -- components/mjs/input/tex/config.json | 1 - .../extensions/all-packages/all-packages.js | 12 -- .../tex/extensions/all-packages/config.json | 20 --- components/mjs/source.js | 1 - ts/input/tex/AllPackages.ts | 130 ------------------ 9 files changed, 1 insertion(+), 207 deletions(-) delete mode 100644 components/mjs/input/tex-full/config.json delete mode 100644 components/mjs/input/tex-full/tex-full.js delete mode 100644 components/mjs/input/tex/extensions/all-packages/all-packages.js delete mode 100644 components/mjs/input/tex/extensions/all-packages/config.json delete mode 100644 ts/input/tex/AllPackages.ts diff --git a/components/mjs/dependencies.js b/components/mjs/dependencies.js index f5f93aabe..e443cdd2a 100644 --- a/components/mjs/dependencies.js +++ b/components/mjs/dependencies.js @@ -21,7 +21,6 @@ export const dependencies = { 'a11y/explorer': ['a11y/semantic-enrich'], '[mml]/mml3': ['input/mml'], '[tex]/action': ['input/tex-base', '[tex]/newcommand'], - '[tex]/all-packages': ['input/tex-base'], '[tex]/ams': ['input/tex-base'], '[tex]/amscd': ['input/tex-base'], '[tex]/autoload': ['input/tex-base', '[tex]/require'], @@ -68,12 +67,6 @@ export const paths = { sre: '[mathjax]/sre/mathmaps' }; -const allPackages = Array.from(Object.keys(dependencies)) - .filter(name => name.substring(0,5) === '[tex]' && - name !== '[tex]/autoload' && - name !== '[tex]/colorv2' && - name !== '[tex]/all-packages'); - export const provides = { 'startup': ['loader'], 'input/tex': [ @@ -84,13 +77,7 @@ export const provides = { '[tex]/require', '[tex]/autoload', '[tex]/configmacros' - ], - 'input/tex-full': [ - 'input/tex-base', - '[tex]/all-packages', - ...allPackages - ], - '[tex]/all-packages': allPackages + ] }; // diff --git a/components/mjs/input/tex-base/config.json b/components/mjs/input/tex-base/config.json index 6b5e45212..e0a52a01a 100644 --- a/components/mjs/input/tex-base/config.json +++ b/components/mjs/input/tex-base/config.json @@ -6,7 +6,6 @@ "input/tex", "input/tex/base" ], - "exclude": ["input/tex/AllPackages.ts"], "excludeSubdirs": true }, "webpack": { diff --git a/components/mjs/input/tex-full/config.json b/components/mjs/input/tex-full/config.json deleted file mode 100644 index 913c1f894..000000000 --- a/components/mjs/input/tex-full/config.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "build": { - "component": "input/tex-full", - "targets": [ - "input/tex.ts", - "input/tex" - ] - }, - "webpack": { - "name": "input/tex-full", - "libs": [ - "components/src/startup/lib", - "components/src/core/lib" - ] - } -} diff --git a/components/mjs/input/tex-full/tex-full.js b/components/mjs/input/tex-full/tex-full.js deleted file mode 100644 index af10939e1..000000000 --- a/components/mjs/input/tex-full/tex-full.js +++ /dev/null @@ -1,12 +0,0 @@ -import './lib/tex-full.js'; -import '../tex/extensions/all-packages/all-packages.js'; -import {registerTeX} from '../tex/register.js'; - -if (MathJax.loader) { - MathJax.loader.preLoad( - 'input/tex-base', - '[tex]/all-packages' - ); -} - -registerTeX(); diff --git a/components/mjs/input/tex/config.json b/components/mjs/input/tex/config.json index fb0896f5b..1d3b01f2e 100644 --- a/components/mjs/input/tex/config.json +++ b/components/mjs/input/tex/config.json @@ -12,7 +12,6 @@ "input/tex/autoload", "input/tex/configmacros" ], - "exclude": ["input/tex/AllPackages.ts"], "excludeSubdirs": true }, "webpack": { diff --git a/components/mjs/input/tex/extensions/all-packages/all-packages.js b/components/mjs/input/tex/extensions/all-packages/all-packages.js deleted file mode 100644 index d25f5d8fc..000000000 --- a/components/mjs/input/tex/extensions/all-packages/all-packages.js +++ /dev/null @@ -1,12 +0,0 @@ -import './lib/all-packages.js'; - -import {AllPackages} from '#js/input/tex/AllPackages.js'; -import '#js/input/tex/autoload/AutoloadConfiguration.js'; -import '#js/input/tex/require/RequireConfiguration.js'; -import {registerTeX} from '../../register.js'; - -if (MathJax.loader) { - MathJax.loader.preLoad('[tex]/autoload', '[tex]/require'); -} - -registerTeX(['require', ...AllPackages], false); diff --git a/components/mjs/input/tex/extensions/all-packages/config.json b/components/mjs/input/tex/extensions/all-packages/config.json deleted file mode 100644 index c26461ab7..000000000 --- a/components/mjs/input/tex/extensions/all-packages/config.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "build": { - "id": "[tex]/all-packages", - "component": "input/tex/extensions/all-packages", - "targets": [ - "input/tex/AllPackages.ts", - "input/tex/autoload", - "input/tex/require" - ] - } - , - "webpack": { - "name": "input/tex/extensions/all-packages", - "libs": [ - "components/src/input/tex-base/lib", - "components/src/startup/lib", - "components/src/core/lib" - ] - } -} diff --git a/components/mjs/source.js b/components/mjs/source.js index acd8341cd..80ab2fa71 100644 --- a/components/mjs/source.js +++ b/components/mjs/source.js @@ -24,7 +24,6 @@ export const source = { 'input/tex-base': `${src}/input/tex-base/tex-base.js`, 'input/tex-full': `${src}/input/tex-full/tex-full.js`, '[tex]/action': `${src}/input/tex/extensions/action/action.js`, - '[tex]/all-packages': `${src}/input/tex/extensions/all-packages/all-packages.js`, '[tex]/ams': `${src}/input/tex/extensions/ams/ams.js`, '[tex]/amscd': `${src}/input/tex/extensions/amscd/amscd.js`, '[tex]/autoload': `${src}/input/tex/extensions/autoload/autoload.js`, diff --git a/ts/input/tex/AllPackages.ts b/ts/input/tex/AllPackages.ts deleted file mode 100644 index ae4c86000..000000000 --- a/ts/input/tex/AllPackages.ts +++ /dev/null @@ -1,130 +0,0 @@ -/************************************************************* - * - * Copyright (c) 2018-2024 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview Loads all the TeX extensions - * - * @author dpvc@mathjax.org (Davide Cervone) - */ - -import './base/BaseConfiguration.js'; -import './action/ActionConfiguration.js'; -import './ams/AmsConfiguration.js'; -import './amscd/AmsCdConfiguration.js'; -import './bbox/BboxConfiguration.js'; -import './boldsymbol/BoldsymbolConfiguration.js'; -import './braket/BraketConfiguration.js'; -import './bussproofs/BussproofsConfiguration.js'; -import './cancel/CancelConfiguration.js'; -import './cases/CasesConfiguration.js'; -import './centernot/CenternotConfiguration.js'; -import './color/ColorConfiguration.js'; -import './colorv2/ColorV2Configuration.js'; -import './colortbl/ColortblConfiguration.js'; -import './configmacros/ConfigMacrosConfiguration.js'; -import './empheq/EmpheqConfiguration.js'; -import './enclose/EncloseConfiguration.js'; -import './extpfeil/ExtpfeilConfiguration.js'; -import './gensymb/GensymbConfiguration.js'; -import './html/HtmlConfiguration.js'; -import './mathtools/MathtoolsConfiguration.js'; -import './mhchem/MhchemConfiguration.js'; -import './newcommand/NewcommandConfiguration.js'; -import './noerrors/NoErrorsConfiguration.js'; -import './noundefined/NoUndefinedConfiguration.js'; -import './physics/PhysicsConfiguration.js'; -import './setoptions/SetOptionsConfiguration.js'; -import './tagformat/TagFormatConfiguration.js'; -import './texhtml/TexHtmlConfiguration.js'; -import './textcomp/TextcompConfiguration.js'; -import './textmacros/TextMacrosConfiguration.js'; -import './upgreek/UpgreekConfiguration.js'; -import './unicode/UnicodeConfiguration.js'; -import './verb/VerbConfiguration.js'; - -declare const MathJax: any; -if (typeof MathJax !== 'undefined' && MathJax.loader) { - MathJax.loader.preLoad( - '[tex]/action', - '[tex]/ams', - '[tex]/amscd', - '[tex]/bbox', - '[tex]/boldsymbol', - '[tex]/braket', - '[tex]/bussproofs', - '[tex]/cancel', - '[tex]/cases', - '[tex]/centernot', - '[tex]/color', - '[tex]/colorv2', - '[tex]/colortbl', - '[tex]/empheq', - '[tex]/enclose', - '[tex]/extpfeil', - '[tex]/gensymb', - '[tex]/html', - '[tex]/mathtools', - '[tex]/mhchem', - '[tex]/newcommand', - '[tex]/noerrors', - '[tex]/noundefined', - '[tex]/physics', - '[tex]/upgreek', - '[tex]/unicode', - '[tex]/verb', - '[tex]/configmacros', - '[tex]/tagformat', - '[tex]/texhtml', - '[tex]/textcomp', - '[tex]/textmacros', - '[tex]/setoptions', - ); -} - -export const AllPackages: string[] = [ - 'base', - 'action', - 'ams', - 'amscd', - 'bbox', - 'boldsymbol', - 'braket', - 'bussproofs', - 'cancel', - 'cases', - 'centernot', - 'color', - 'colortbl', - 'empheq', - 'enclose', - 'extpfeil', - 'gensymb', - 'html', - 'mathtools', - 'mhchem', - 'newcommand', - 'noerrors', - 'noundefined', - 'upgreek', - 'unicode', - 'verb', - 'configmacros', - 'tagformat', - 'texhtml', - 'textcomp', - 'textmacros' -];