Skip to content

fix(deps): update dependency mathjax to v4#1625

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/mathjax-4.x
Open

fix(deps): update dependency mathjax to v4#1625
renovate[bot] wants to merge 1 commit intomainfrom
renovate/mathjax-4.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Aug 7, 2025

This PR contains the following updates:

Package Change Age Confidence
mathjax ^3.2.2^4.0.0 age confidence

Release Notes

mathjax/MathJax (mathjax)

v4.1.0: MathJax v4.1.0

Compare Source

This release adds a number of new or improved features to MathJax, and fixes several issues in version 4.0.0. These are described in detail in the MathJax v4.1.0 release notes, but among the more important are:

  • Changes to make v4.1 more compatible with older browsers (v4.0 used modern CSS and javascript functions that are not available in some older browsers).
  • Support for a dark-mode color scheme.
  • Movable and sizable dialog boxes (both via the mouse and by keyboard arrow keys).
  • Ability to tab to hyperlinks within typeset expressions.
  • More accurate highlighting of some expressions during exploration.
  • Better handling of tactile Braille output devices in Windows.
  • Better handling of speech for tables and tagged expressions.
  • Better voicing of European-style open interval notation.
  • Fixed arrows in mhchem that were swapped accidentally.
  • More reliable data-latex attributes for TeX output.
  • Better positioning of some accents (e.g., the vector arrow) in Safari and other WebKit-based browsers in CHTML output.
  • Several new configuration options, e.g., to make font loading easier.
  • Improvements to the build system to allow MathJax to be built in Windows power shell.

v4.0.0: MathJax v4.0.0

Compare Source

This is the long-awaited 4.0.0 release of MathJax, which has been several years in the making. Among the many new features in this release are:

  • Extended font support (11 new fonts)
  • A new default font with much greater character coverage.
  • Line-breaking support (for in-line as well as displayed equations)
  • An updated expression explorer that is now on by default.
  • Separation of speech generation into a webworker thread for better performance.
  • Support for HTML embedded in TeX and MathML expressions.
  • Availability as ES6 modules as well as CommonJS modules.
  • New TeX extensions, including the begingroup extension from v2 (with more features), and several font-related extensions.
  • Inclusion of the textmacros extension in all combined component files.
  • Updated mathtools package to include the changes from 2022 and 2024.
  • Improvements in the baseline alignment of text in CHTML output in WebKit-based browsers.
  • Improved stretchy delimiters in CHTML output.
  • More promise-based conversion and typesetting calls at the document level.

For many sites, the only change that will be needed to use v4 is to change the URL where you load MathJax to refer to version 4 rather than version 3, and to remove the /es5 directory from the URL. Most v3 configurations should still work with v4; but if you use the startup.ready() function to modify MathJax or create new TeX extensions, there may be some adjustments needed. One important change of note is that, since the number of TeX packages has grown, the all-packages extension and the "-full" components have been removed, so if you are using those, you will need to change to a component without the "-full" and either rely on the autoload extension to load the needed packages, or load them explicitly.

The MathJax documentation has been substantially updated for version 4, and now includes the missing or limited sections on using MathJax in node, including many examples and details. See the What's New in V4.0 section (more than 50 pages long) for much more information about the features described above, and in particular, check the Breaking Changes section for any changes that may affect your usage.

The MathJax web demos repository has been updated for v4.0, and reorganized for easier viewing. The demos now include a "Show Source" button that displays explanations and the important sections of the source code rather than using separate .md files, so there are fewer files to wade through, and you can compare the source code to the output more easily. There are also new examples in the documentation on using MathJax in a browser; most are listed in the Examples in a Browser section.

The MathJax node demos repository is being updated and reorganized as well, but work is still being done on that, as some of the documentation needs to be expanded (for now, you may need to read the comments in the code). The tools in this repository have been made more powerful and complete, and much of the functionality that is common across multiple tools have been moved to utility libraries that can be shared by several tools. That means the examples are no longer stand-alone files, but they are more complete in their ability to use the features of MathJax. For example, all the examples that produce CHTML or SVG output can select the font to use, or add speech labels, and so on, and because speech is now available in all those examples, there are no longer separate speech demos. The tools can now take several expressions at once to typeset, or take them from a file, or process a complete HTML page. This means there are no longer separate page-based tools, so the number of examples is reduced, but the functionality is expanded. The MathJax documentation now covers using MathJax in node application in more detail than for v3, with lots of examples; most of these are listed in the Examples in Node Applications section.

As always, you may report issues in the MathJax issue tracker for v4; this is a major update, and there are sure to be things that will need adjusting.


Configuration

📅 Schedule: Branch creation - "every weekend" in timezone US/Eastern, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/mathjax-4.x branch 4 times, most recently from 1aed91e to 9419887 Compare August 12, 2025 18:04
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch 4 times, most recently from 547be32 to 4aef092 Compare August 26, 2025 05:31
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch 2 times, most recently from c167d4d to dbc8852 Compare September 2, 2025 22:33
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch 4 times, most recently from 7089382 to dedf167 Compare September 16, 2025 17:06
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch 5 times, most recently from 509f71d to fe01e8c Compare September 29, 2025 08:56
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch from fe01e8c to 1f5ed12 Compare October 2, 2025 12:45
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch 9 times, most recently from 1368729 to b2f775b Compare October 15, 2025 14:08
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch from b2f775b to 5f513a6 Compare October 21, 2025 13:58
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch 2 times, most recently from 8108329 to d4e0f86 Compare November 10, 2025 12:25
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch 10 times, most recently from 3d466f1 to e7508e5 Compare November 24, 2025 13:52
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch 5 times, most recently from 33812c9 to 4d90962 Compare December 3, 2025 13:57
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch 6 times, most recently from 2f5457a to 7890407 Compare December 10, 2025 15:15
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch 2 times, most recently from 9ee8bd9 to fbdb865 Compare December 22, 2025 13:07
@renovate renovate bot force-pushed the renovate/mathjax-4.x branch from fbdb865 to 32f637c Compare December 30, 2025 14:15
"lodash.has": "^4.5.2",
"lodash.uppercase": "^4.3.0",
"mathjax": "^3.2.2",
"mathjax": "^4.0.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The MathJax configuration uses outdated v3-style properties (displayAlign, displayIndent, menuSettings) that are invalid in MathJax v4, causing rendering and functionality issues.
Severity: MEDIUM

Suggested Fix

Update the MathJax configuration in base-theme/layouts/partials/mathjax_if_necessary.html to match the v4 structure. Move displayAlign and displayIndent into an output object. Refactor the menuSettings configuration to use the options.menuOptions.settings structure. Verify and update errorSettings according to v4 documentation.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L64

Potential issue: The upgrade to MathJax v4 introduces a compatibility issue with the
existing configuration in `base-theme/layouts/partials/mathjax_if_necessary.html`. The
configuration uses property structures from MathJax v3 that are invalid in v4.
Specifically, `displayAlign` and `displayIndent` are placed at the root level instead of
under the `output` object. Similarly, `menuSettings` is used at the root level, but v4
expects this configuration under `options.menuOptions.settings`. The `errorSettings`
option is also not a standard v4 root-level option. This structural mismatch will cause
MathJax to ignore these settings, leading to incorrect rendering alignment for
mathematical expressions and broken context menu functionality.

"lodash.has": "^4.5.2",
"lodash.uppercase": "^4.3.0",
"mathjax": "^3.2.2",
"mathjax": "^4.0.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The webpack configuration for CopyWebpackPlugin references a non-existent MathJax v3 path (es5/) after the upgrade to v4, which will prevent math rendering.
Severity: CRITICAL

Suggested Fix

Update the from path in the CopyWebpackPlugin configuration within webpack.common.ts. The path should be changed from ./node_modules/mathjax/es5/ to the correct directory for MathJax v4 assets, which is likely the top-level package directory or a new bundle/ directory.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L64

Potential issue: The project's webpack configuration, specifically the
`CopyWebpackPlugin` in `webpack.common.ts`, is configured to copy MathJax assets from
the `./node_modules/mathjax/es5/` directory. This path is correct for MathJax v3 but is
non-existent in MathJax v4, which this pull request upgrades to. This misconfiguration
will cause the build process to fail to copy necessary MathJax files. Consequently, at
runtime, the application will be unable to load the MathJax scripts, leading to a
failure in rendering any mathematical expressions on the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants