Skip to content

Commit 4947914

Browse files
committed
Add autoload to all-packages, mark autoload and require as preloaded, and make sure their files are listed in the lib
1 parent d8b0dd8 commit 4947914

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

components/src/input/tex/extensions/all-packages/all-packages.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
import './lib/all-packages.js';
22

33
import {AllPackages} from '../../../../../../mathjax3/input/tex/AllPackages.js';
4+
import '../../../../../../mathjax3/input/tex/autoload/AutoloadConfiguration.js';
45
import '../../../../../../mathjax3/input/tex/require/RequireConfiguration.js';
56
import {insert} from '../../../../../../mathjax3/util/Options.js';
67

8+
if (MathJax.loader) {
9+
MathJax.loader.preLoad('[tex]/autoload', '[tex]/require');
10+
}
711
if (MathJax.startup) {
812
if (!MathJax.config.tex) {
913
MathJax.config.tex = {};
1014
}
1115
let packages = MathJax.config.tex.packages;
12-
MathJax.config.tex.packages = ['require',...AllPackages];
16+
MathJax.config.tex.packages = ['autoload', 'require', ...AllPackages];
1317
if (packages) {
1418
insert(MathJax.config.tex, {packages});
1519
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"component": "input/tex/extensions/all-packages",
3-
"targets": ["input/tex/AllPackages.ts"]
3+
"targets": [
4+
"input/tex/AllPackages.ts",
5+
"input/tex/autoload",
6+
"input/tex/require"
7+
]
48
}
59

0 commit comments

Comments
 (0)