Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions modules/base/latex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1059,8 +1059,7 @@
displayIndent: '0', // default for indentshift when set to 'auto'
fontCache: 'local', // or 'global' or 'none'
localID: null, // ID to use for local font cache (for single equation processing)
internalSpeechTitles: true, // insert <title> tags with speech content
titleID: 0 // initial id number to use for aria-labeledby titles
blacker: 3 // the stroke-width to use for SVG character paths
};

if (!isNodeJs()) {
Expand All @@ -1085,12 +1084,12 @@
}
};

let mj_dir = '../mathjax/3.2.0';
let mj_dir = '../mathjax/4.0.0';
if (browser.webwindow && source_dir.indexOf('https://root.cern/js') < 0 && source_dir.indexOf('https://jsroot.gsi.de') < 0)
mj_dir = 'mathjax';

return loadScript(source_dir + mj_dir + '/es5/tex-svg.js')
.catch(() => loadScript('https://cdn.jsdelivr.net/npm/mathjax@3.2.0/es5/tex-svg.js'))
return loadScript(source_dir + mj_dir + '/tex-svg.js')
.catch(() => loadScript('https://cdn.jsdelivr.net/npm/mathjax@4/tex-svg.js'))
.then(() => promise);
}

Expand Down Expand Up @@ -1509,7 +1508,7 @@
* @private */
async function produceMathjax(painter, mj_node, arg) {
const mtext = translateMath(arg.text, arg.latex, arg.color, painter),
options = { em: arg.font.size, ex: arg.font.size/2, family: arg.font.name, scale: 1, containerWidth: -1, lineWidth: 100000 };
options = { em: arg.font.size, ex: arg.font.size/2, family: arg.font.name, scale: 1, containerWidth: -1 /*, lineWidth: 100000 */ };

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-macos (20.x)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-macos (18.x)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-macos (22.x)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-windows (20.x)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-windows (22.x)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-ubuntu (18.x, g++-12)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-ubuntu (20.x, g++-12)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-ubuntu (20.x, g++-13)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-ubuntu (22.x, g++-13)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-ubuntu (18.x, g++-14)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-ubuntu (22.x, g++-12)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-ubuntu (18.x, g++-13)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-windows (18.x)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-ubuntu (20.x, g++-14)

Expected space or tab after '/*' in comment

Check warning on line 1511 in modules/base/latex.mjs

View workflow job for this annotation

GitHub Actions / build-ubuntu (22.x, g++-14)

Expected space or tab after '/*' in comment

return loadMathjax()
.then(mj => mj.tex2svgPromise(mtext, options))
Expand Down
109 changes: 52 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@oneidentity/zstd-js": "^1.0.3",
"canvas": "^3.1.0",
"jsdom": "^26.1.0",
"mathjax": "3.2.2",
"mathjax": "4.0.0",
"tmp": "^0.2.4",
"xhr2": "^0.2.1",
"three": "0.162.0"
Expand Down
Loading