Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
cc4d60e
generalise report tmp file
zorkow Oct 22, 2025
c207665
Simplify copy component configurations.
dpvc Dec 23, 2025
cc77be8
Use serializeXML rather than outerHTML in example code
dpvc Dec 30, 2025
d1ff109
Fix position for dialogs. (mathjax/MathJax#3480)
dpvc Dec 31, 2025
8963392
Update windows paths to include file:// and fix tests. (mathjax/MathJ…
dpvc Dec 30, 2025
0ac0974
Update handling of border parts like border-color and add tests for t…
dpvc Jan 2, 2026
2bb4a17
Make sure \surd is symmetric vertically. (mathjax/MathJax#3468)
dpvc Jan 2, 2026
9cf6b54
Allow clicking in HTML-in-MathML to activate elements rather than cau…
dpvc Jan 3, 2026
c942ea1
Have explorer properly handle the tab order menu preference. (mathja…
dpvc Jan 5, 2026
eb066fc
Updates to allow keydown and dblclick events to pass through to HTML …
dpvc Jan 6, 2026
b4445b9
Merge pull request #1403 from mathjax/fix/dialog-css
dpvc Jan 7, 2026
f7a0757
Merge pull request #1405 from mathjax/update/README
dpvc Jan 7, 2026
03f61b0
Merge pull request #1406 from mathjax/update/copy-config
dpvc Jan 7, 2026
481e9d7
Fix spacing as requested by Volker in review
dpvc Jan 7, 2026
ba1cf66
Merge pull request #1409 from mathjax/issue3468
dpvc Jan 7, 2026
b538258
Update ts/a11y/explorer/KeyExplorer.ts
dpvc Jan 7, 2026
44af203
Update ts/a11y/explorer/KeyExplorer.ts
dpvc Jan 7, 2026
a9a3fc0
Merge pull request #1410 from mathjax/issue3491
dpvc Jan 7, 2026
06657a0
Merge pull request #1411 from mathjax/issue3493
dpvc Jan 7, 2026
a9f3bf1
Merge pull request #1408 from mathjax/issue3490
dpvc Jan 7, 2026
4c23062
Fix test broken by context.path change.
dpvc Jan 8, 2026
9401d25
Merge branch 'fix/windows-path' into fix/windows-tests
zorkow Jan 8, 2026
b9a2e27
Uses pnpm in components
zorkow Jan 8, 2026
01dc8da
Fix windows test (correctly this time).
dpvc Jan 10, 2026
094a6ed
Merge branch 'fix/windows-path' into develop
dpvc Jan 10, 2026
7a7cc3b
Restrict anchor color changes to dialogs
dpvc Jan 14, 2026
c500b6a
Fix regression from #1367 (mathjax/MathJax#3498)
dpvc Jan 15, 2026
27f01ee
Update color for self-voicing explorer
dpvc Jan 15, 2026
84f6319
incorporate review suggestions
zorkow Jan 16, 2026
4816587
Merge pull request #1414 from mathjax/fix/dark-mode
dpvc Jan 16, 2026
948865f
Merge pull request #1416 from mathjax/fix/voicing-alpha
dpvc Jan 16, 2026
58c556a
Merge pull request #1417 from mathjax/issue3498
dpvc Jan 16, 2026
8a12d07
Merge pull request #1418 from mathjax/fix/windows-tests
dpvc Jan 20, 2026
95faa0c
Merge pull request #1413 from mathjax/update/pnpm_in_components
dpvc Jan 20, 2026
2b04e5a
Use proper scaling for vertical shift of bevelled fractions. (mathjax…
dpvc Jan 21, 2026
7283d8f
Handle clicking and tabbing to focusable HTML elements within express…
dpvc Jan 22, 2026
4c81e1a
Reorder test for tabbing versus maction, and fixes for prettier
dpvc Jan 22, 2026
60d2484
Implement a no-dark-mode component. (mathjax/MathJax#3502)
dpvc Jan 23, 2026
fd39984
Add version number to default font URLs on jsdelivr
dpvc Jan 26, 2026
7ac5ab4
Merge pull request #1419 from mathjax/issue3506
dpvc Jan 30, 2026
50e6346
Use arrow function rather than bind(this), as requested in review.
dpvc Jan 30, 2026
cc3603e
Merge pull request #1421 from mathjax/feature/input-tabbing
dpvc Jan 30, 2026
8a35cea
Merge pull request #1423 from mathjax/feature/font-versions
dpvc Jan 30, 2026
b189f7e
Merge pull request #1422 from mathjax/feature/no-dark-mode
dpvc Jan 30, 2026
d30e438
Fix speech attachemnt forSVG inline expressions this line breaks. (m…
dpvc Feb 1, 2026
2cf7459
Merge pull request #1425 from mathjax/issue3511
dpvc Feb 1, 2026
325ac92
Make sure | always has stretchy=false, and update tests. (mathjax/Mat…
dpvc Feb 4, 2026
7dd72aa
Make sure columns get new width if contents stretch more than origina…
dpvc Feb 5, 2026
94d8736
Add isEmpty test (deep tree check) to MmlNode and use it to test for …
dpvc Feb 5, 2026
a43a44f
Add isEmpty to AbstractMmlEmptyNode
dpvc Feb 5, 2026
574e1c3
Use isEmpty in MathtoolsUtil, as request in review
dpvc Feb 5, 2026
2bb30bb
Merge pull request #1428 from mathjax/fix/empty-op
dpvc Feb 5, 2026
3ac7c8d
Merge pull request #1426 from mathjax/issue3515
dpvc Feb 5, 2026
49d7fd9
Update SRE to latest version.
zorkow Feb 10, 2026
7f2843d
Merge pull request #1430 from mathjax/update/sre
dpvc Feb 11, 2026
40226d1
Merge pull request #1427 from mathjax/issue3423
dpvc Feb 11, 2026
b182f06
Fix handling of font-* css that aren't being specially handled, like …
dpvc Feb 14, 2026
7805de5
Merge pull request #1431 from mathjax/fix/styles
dpvc Feb 17, 2026
ad00404
update SRE to version v5.0.0-beta.5
zorkow Feb 17, 2026
853f887
Use proper TeX class for mfenced with open and close delimiters
dpvc Feb 18, 2026
0b872a1
Merge pull request #1433 from mathjax/update/sre
dpvc Feb 18, 2026
c59285a
Merge pull request #1434 from mathjax/fix/mfenced-inner
dpvc Feb 18, 2026
d6eaf52
Make sure output renderer settings are transfered when the menu selec…
dpvc Feb 18, 2026
0f3663e
Fix inline linebreaking issues with SVG output. (mathjax/MathJax#3526)
dpvc Feb 18, 2026
919caac
Merge pull request #1436 from mathjax/fix/svg-inline-breaks
dpvc Feb 19, 2026
d634530
Merge pull request #1435 from mathjax/fix/sticky-output-options
dpvc Feb 19, 2026
2c70c55
Update dependency versions
dpvc Feb 17, 2026
70433fd
Update version number
dpvc Jan 30, 2026
8e32324
Update SRE to 5.0.0-beta.6
dpvc Feb 19, 2026
956b1a7
Update font versions
dpvc Feb 19, 2026
88c74d0
Merge branch 'v4.1.1-update' into develop
dpvc Feb 19, 2026
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ await MathJax.init({
loader: {load: ['input/tex', 'output/svg']}
});
const svg = await MathJax.tex2svgPromise('\\frac{1}{x^2-1}', {display: true});
console.log(MathJax.startup.adaptor.outerHTML(svg));
console.log(MathJax.startup.adaptor.serializeXML(svg));
```


Expand All @@ -119,7 +119,7 @@ MathJax.init({
loader: {load: ['input/tex', 'output/svg']}
}).then(() => {
const svg = MathJax.tex2svg('\\frac{1}{x^2-1}', {display: true});
console.log(MathJax.startup.adaptor.outerHTML(svg));
console.log(MathJax.startup.adaptor.serializeXML(svg));
}).catch((err) => console.log(err.message));
```

Expand Down
28 changes: 24 additions & 4 deletions components/bin/copy
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ const bundle = (process.argv[3] || 'bundle');
const json = path.resolve(process.argv[4] || '.', 'config.json');
let configs = require(json).copy;
if (!configs) process.exit();
const wd = path.dirname(json);
process.chdir(wd);
if (!Array.isArray(configs)) {
configs = [configs];
}
process.chdir(path.dirname(json));

/**
* Get the directory for node modules (either the parent of the MathJax directory,
Expand All @@ -61,6 +60,13 @@ if (!Array.isArray(configs)) {
const parent = path.resolve(__dirname, '..', '..');
const nodeDir = (dir => (fs.existsSync(dir) ? dir : path.resolve(parent, '..')))(path.join(parent, 'node_modules'));

/**
* Other top-level directories
*/
const tsDir = path.resolve(parent, 'ts');
const jsDir = path.resolve(parent, target);
const bundleDir = path.resolve(parent, bundle);

/**
* Copy a file or directory tree
*
Expand All @@ -84,14 +90,28 @@ function copyFile(from, to, name, space) {
}
}

/**
* @param {string} name The file name to process
* @returns {string} The name with paths replaced by full directories
*/
function resolvePaths(name) {
return path.resolve(
process.cwd(),
name.replace(/^\[node\]/, nodeDir)
.replace(/^\[ts\]/, tsDir)
.replace(/^\[js\]/, jsDir)
.replace(/^\[bundle\]/, bundleDir)
);
}

/**
* Handle the copying for a given configuration
*
* @param {{from: string, to: string, copy: string[]}} config The configuration for the copy operation
*/
function processConfig(config) {
const to = path.resolve(wd, config.to.replace(/\/bundle(\/|$)/, '/' + bundle + '$1'));
const from = path.resolve(wd, config.from.replace(/\[node\]/, nodeDir));
const to = resolvePaths(config.to);
const from = resolvePaths(config.from);
for (const name of config.copy) {
copyFile(from, to, name, '');
}
Expand Down
6 changes: 3 additions & 3 deletions components/bin/pack
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ async function readJSON(dir) {
return new Promise((ok, fail) => {
const buffer = [];
const child = spawn(
'npx',
'node',
[
'webpack',
require.resolve(path.join('webpack', 'bin', 'webpack.js')),
'--env', `dir=${path.relative(packDir, path.resolve(dir))}`,
'--env', `bundle=${bundle}`,
'--json',
'-c', path.relative(packDir, path.join(compPath, 'webpack.config.' + target))
],
{
cwd: packDir,
shell: true,
shell: process.platform === 'Win32',
}
);
child.stdout.on('data', (data) => buffer.push(String(data)));
Expand Down
4 changes: 2 additions & 2 deletions components/mjs/a11y/sre/worker/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "sre/speech-worker"
},
"copy": {
"to": "../../../../../bundle/sre",
"from": "../../../../../ts/a11y/sre",
"to": "[bundle]/sre",
"from": "[ts]/a11y/sre",
"copy": [
"require.mjs",
"require.d.mts"
Expand Down
4 changes: 2 additions & 2 deletions components/mjs/input/mml/extensions/mml3/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"excludeSubdirs": true
},
"copy": {
"to": "../../../../../../bundle/input/mml/extensions",
"from": "../../../../../../ts/input/mathml/mml3",
"to": "[bundle]/input/mml/extensions",
"from": "[ts]/input/mathml/mml3",
"copy": [
"mml3.sef.json"
]
Expand Down
2 changes: 1 addition & 1 deletion components/mjs/node-main/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"copy": {
"to": "../../../bundle",
"to": "[bundle]",
"from": ".",
"copy": [
"node-main.mjs",
Expand Down
12 changes: 10 additions & 2 deletions components/mjs/output/util.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import {combineDefaults, combineWithMathJax} from '#js/components/global.js';
import {Package} from '#js/components/package.js';
import {hasWindow} from '#js/util/context.js';
import {mathjax} from '#js/mathjax.js'

export function configFont(font, jax, config, extension = '') {
const path = (config.fontPath || `[fonts]/%%FONT%%-font${extension}`);
const version =
(MathJax.config.loader?.paths?.fonts || '').substring(0, 24) === 'https://cdn.jsdelivr.net'
? `@%%VERSION%%` : '';
const path = (config.fontPath || `[fonts]/%%FONT%%-font${extension}${version}`);
const name = (font.match(/^[a-z]+:/) ? (font.match(/[^/:\\]*$/) || [jax])[0] : font);
combineDefaults(MathJax.config.loader, 'paths', {
[name+extension]: (name === font ? path.replace(/%%FONT%%/g, font) : font)
[name+extension]: (
name === font
? path.replace(/%%FONT%%/g, font).replace(/%%VERSION%%/g, mathjax.version)
: font
)
});
return `[${name}${extension}]`;
}
Expand Down
2 changes: 1 addition & 1 deletion components/mjs/require/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"copy": {
"to": "../../../bundle",
"to": "[bundle]",
"from": "../..",
"copy": [
"require.mjs"
Expand Down
1 change: 1 addition & 0 deletions components/mjs/source.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const source = {
'[mathmaps]': `${src}/../../bundle/sre/mathmaps`,
'ui/lazy': `${src}/ui/lazy/lazy.js`,
'ui/menu': `${src}/ui/menu/menu.js`,
'ui/no-dark-mode': `${src}/ui/nodarkmode/nodarkmode.js`,
'ui/safe': `${src}/ui/safe/safe.js`,
'mml-chtml': `${src}/mml-chtml/mml-chtml.js`,
'mml-chtml-nofont': `${src}/mml-chtml-nofont/mml-chtml-nofont.js`,
Expand Down
2 changes: 1 addition & 1 deletion components/mjs/sre/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"copy": {
"to": "../../../bundle/sre",
"to": "[bundle]/sre",
"from": "[node]/speech-rule-engine/lib",
"copy": [
"mathmaps"
Expand Down
5 changes: 5 additions & 0 deletions components/mjs/ui/no-dark-mode/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"webpack": {
"name": "ui/no-dark-mode"
}
}
7 changes: 7 additions & 0 deletions components/mjs/ui/no-dark-mode/no-dark-mode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {VERSION} from '#js/components/version.js';
import '#js/ui/no-dark-mode/no-dark-mode.js';

if (MathJax.loader) {
MathJax.loader.checkVersion('ui/no-dark-mode', VERSION, 'extension');
}

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mathjax/src",
"version": "4.1.0",
"version": "4.1.1",
"description": "Beautiful and accessible math in all browsers. MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all browsers and in server-side node applications. This package includes the source code as well as the packaged components.",
"keywords": [
"MathJax",
Expand Down Expand Up @@ -142,21 +142,21 @@
"@eslint/js": "^9.39.2",
"@xmldom/xmldom": "^0.8.11",
"copyfiles": "^2.4.1",
"diff": "^8.0.2",
"diff": "^8.0.3",
"eslint": "^9.39.2",
"eslint-formatter-unix": "^9.0.1",
"eslint-plugin-jsdoc": "^61.5.0",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-jsdoc": "^62.5.5",
"eslint-plugin-prettier": "^5.5.5",
"husky": "^9.1.7",
"lint-staged": "^16.2.7",
"prettier": "^3.7.4",
"rimraf": "^6.1.2",
"prettier": "^3.8.1",
"rimraf": "^6.1.3",
"terser-webpack-plugin": "^5.3.16",
"typedoc": "^0.28.15",
"typedoc": "^0.28.17",
"typescript": "^5.9.3",
"typescript-eslint": "^8.50.0",
"typescript-eslint": "^8.56.0",
"typescript-tools": "^0.3.1",
"webpack": "^5.103.0",
"webpack": "^5.105.2",
"webpack-cli": "^6.0.1",
"wicked-good-xpath": "^1.3.0",
"xslt3": "^2.7.0"
Expand All @@ -168,9 +168,9 @@
]
},
"dependencies": {
"@mathjax/mathjax-newcm-font": "4.1.0",
"@mathjax/mathjax-newcm-font": "4.1.1",
"mhchemparser": "^4.2.1",
"mj-context-menu": "^1.0.0",
"speech-rule-engine": "5.0.0-beta.3"
"speech-rule-engine": "5.0.0-beta.6"
}
}
Loading