Skip to content

Commit e0bef35

Browse files
committed
First try to load mathjax relative to source_dir
loadScript loads relative to the current page - not current script.
1 parent 3cb59b2 commit e0bef35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/base/latex.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { loadScript, settings, isNodeJs } from '../core.mjs';
1+
import { loadScript, settings, isNodeJs, source_dir } from '../core.mjs';
22
import { getElementRect, _loadJSDOM } from './BasePainter.mjs';
33
import { FontHandler } from './FontHandler.mjs';
44

@@ -904,7 +904,7 @@ function loadMathjax() {
904904
}
905905
};
906906

907-
return loadScript('../../mathjax/3.2.0/es5/tex-svg.js')
907+
return loadScript(source_dir + '../mathjax/3.2.0/es5/tex-svg.js')
908908
.catch(() => loadScript('https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-svg.js'))
909909
.then(() => promise);
910910
}

0 commit comments

Comments
 (0)