File tree Expand file tree Collapse file tree 2 files changed +40
-17
lines changed
src/addon/filter/mathjaxloader/providers Expand file tree Collapse file tree 2 files changed +40
-17
lines changed Original file line number Diff line number Diff line change @@ -14,24 +14,24 @@ module.exports = {
1414 dest : '{{WWW}}/'
1515 } ,
1616 copyMathJaxMain : {
17- src : [ '{{ROOT}}/node_modules/mathjax/* .js' ] ,
17+ src : [ '{{ROOT}}/node_modules/mathjax/MathJax .js' ] ,
1818 dest : '{{WWW}}/lib/mathjax'
1919 } ,
20- copyMathJaxConfig : {
21- src : [ '{{ROOT}}/node_modules/mathjax/config/**/*' ] ,
22- dest : '{{WWW}}/lib/mathjax/config'
23- } ,
2420 copyMathJaxExtensions : {
2521 src : [ '{{ROOT}}/node_modules/mathjax/extensions/**/*' ] ,
2622 dest : '{{WWW}}/lib/mathjax/extensions'
2723 } ,
28- copyMathJaxFonts : {
29- src : [ '{{ROOT}}/node_modules/mathjax/fonts/**/*' ] ,
30- dest : '{{WWW}}/lib/mathjax/fonts'
24+ copyMathJaxElement : {
25+ src : [ '{{ROOT}}/node_modules/mathjax/jax/element/**/*' ] ,
26+ dest : '{{WWW}}/lib/mathjax/jax/element'
27+ } ,
28+ copyMathJaxInput : {
29+ src : [ '{{ROOT}}/node_modules/mathjax/jax/input/**/*' ] ,
30+ dest : '{{WWW}}/lib/mathjax/jax/input'
3131 } ,
32- copyMathJaxJax : {
33- src : [ '{{ROOT}}/node_modules/mathjax/jax/**/*' ] ,
34- dest : '{{WWW}}/lib/mathjax/jax'
32+ copyMathJaxOutput : {
33+ src : [ '{{ROOT}}/node_modules/mathjax/jax/output/SVG/ **/*' ] ,
34+ dest : '{{WWW}}/lib/mathjax/jax/output/SVG '
3535 } ,
3636 copyMathJaxLocalization : {
3737 src : [ '{{ROOT}}/node_modules/mathjax/localization/**/*' ] ,
Original file line number Diff line number Diff line change @@ -32,12 +32,35 @@ export class AddonFilterMathJaxLoaderHandler extends CoreFilterDefaultHandler {
3232
3333 // Default values for MathJax config for sites where we cannot retrieve it.
3434 protected DEFAULT_URL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js' ;
35- protected DEFAULT_CONFIG = 'MathJax.Hub.Config({' +
36- 'config: ["Accessible.js", "Safe.js"],' +
37- 'errorSettings: { message: ["!"] },' +
38- 'skipStartupTypeset: true,' +
39- 'messageStyle: "none"' +
40- '});' ;
35+ protected DEFAULT_CONFIG = `
36+ MathJax.Hub.Config({
37+ extensions: [
38+ "Safe.js",
39+ "tex2jax.js",
40+ "mml2jax.js",
41+ "MathEvents.js",
42+ "MathZoom.js",
43+ "MathMenu.js",
44+ "toMathML.js",
45+ "TeX/noErrors.js",
46+ "TeX/noUndefined.js",
47+ "TeX/AMSmath.js",
48+ "TeX/AMSsymbols.js",
49+ "fast-preview.js",
50+ "AssistiveMML.js",
51+ "[a11y]/accessibility-menu.js"
52+ ],
53+ jax: ["input/TeX","input/MathML","output/SVG"],
54+ menuSettings: {
55+ zoom: "Double-Click",
56+ mpContext: true,
57+ mpMouse: true
58+ },
59+ errorSettings: { message: ["!"] },
60+ skipStartupTypeset: true,
61+ messageStyle: "none"
62+ });
63+ ` ;
4164
4265 // List of language codes found in the MathJax/localization/ directory.
4366 protected MATHJAX_LANG_CODES = [
You can’t perform that action at this time.
0 commit comments