--The MathJax team is pleased to announce the long-awaited release of MathJax v4.0.0. This is the culmination of more than three years of work by the MathJax team, with major new features and important improvements. It has been a long time in coming, but we hope the results are worth the wait.
Some of the new and improved features in v4 include:
- 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.
- And much more.
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.
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/570C592A-68DC-41FB-968A-34A7DC1002A7%40mathjax.org.
On Aug 5, 2025, at 4:38 PM, Lisa Johnson <lis...@gmail.com> wrote:
Hi all!I'm getting error messages for some but not all mathjax equations using Simple Mathjax plugin in Wordpress. Maybe I have the wrong URL; I'm usingThis is what I use for Mathjax 3 (or so says the plugin - there are just dropdowns for versions 2 and 3 so far).Maybe I'm pointing to the wrong URL? Below are examples of a page from using Mathjax 3 and then using Mathjax 4.I'm not a programmer, so I hope I can continue using 3 if the problem persists? Or maybe I can add custom mathjax config to the Simply Mathjax - there is a box for that (or maybe just use another plugin)? I probably have thousands of mathjax equations on my site and don't want to change all these ;)
<Mathjax 3.png>
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/CAD7Rd5128w2auQsTg3kAmJSKRmEwLxN4Av8Bp3WQe2ariFm%2Bpw%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/97467D5B-1B40-4EB6-9277-C34B9C8A1496%40gmail.com.
MathJax = {tex: {inlineMath: {'[+]': [['$', '$']]},preFilters: [({math}) => {if (math.start.delim !== '\begin{align}') {math.math = math.math.replace(/(\\begin|\\end){align}/g, '$1{aligned}');}}]}}
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/CAD7Rd509saCC_wQ61WX%2B%2BF%3Dvqv6CjDUBB9sajO5S0CqWwzU-pw%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/0CE0726C-C7CA-4317-861D-831178A7A0E8%40gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/CAD7Rd509miPoXNfP3kjjYK_KbNpgTtap9FwFFotMPUfAZ3ehHQ%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/CAEMHSOgKK9uUdW%3Dw2QVXVXW2eTg%2B3nXShhKpc%3DE%2B0EubScEzyg%40mail.gmail.com.
On Aug 6, 2025, at 3:04 PM, Lisa Johnson <lis...@gmail.com> wrote:
Thanks so much, Christian! I'm determined to use V4 :)This code DID fix the problem with the erroneous nesting (except it left the "displaystyle" in it. But it broke many other equations.Here's V3 and then V4 with adding your code in the Custom Mathjax config:V3:
<image.png>V4 with the code:
<image.png>Here's the mathjax code:$ \displaystyle \begin{align}y&=-8{{\left( {\frac{1}{2}x+2} \right)}^{2}}+3=-8{{\left( {\left( {\frac{1}{2}} \right)\left( {x+4} \right)} \right)}^{2}}+3\\&=-8{{\left( {\frac{1}{2}} \right)}^{2}}{{\left( {x+4} \right)}^{2}}+3=-2{{\left( {x+4} \right)}^{2}}+3\end{align}$, so the vertex is $ (–4, 3)$.
$ y=a(x-{{r}_{1}})(x-{{r}_{2}})$If you want to try this in your environment to see if you get the same, that'd be great. Otherwise, I may have to resort to using V3 or going in with global search/replace to fix.Lisa
On Wed, Aug 6, 2025 at 9:08 AM Christian Lawson-Perfect <christia...@gmail.com> wrote:
Hi Lisa,I'm the current maintainer of the Simple MathJax plugin. You could just paste all of the code Davide gave into the "Custom MathJax config" box, but to keep the other settings that are WordPress-specific, here's the default code plus Davide's filter:MathJax = {
tex: {
inlineMath: {'[+]': [['$', '$']]},
preFilters: [
({math}) => {
if (math.start.delim !== '\begin{align}') {
math.math = math.math.replace(/(\\begin|\\end){align}/g, '$1{aligned}');
}
}
]
processEscapes: true
},
options: {
ignoreHtmlClass: 'tex2jax_ignore|editor-rich-text'
}
};
On Wed, 6 Aug 2025 at 14:46, Lisa Johnson <lis...@gmail.com> wrote:
Thanks so much for this - I really appreciate it!!I tried it in the box on the plugin settings, but the equations didn't render. But I think I need to incorporate this code in the default code below that I was replacing? And I'm not sure how to do that?
<image.png>There is also this option in the plugin settings:
<image.png>
MathJax = {
tex: {
inlineMath: {'[+]': [['$', '$']]},
preFilters: [
({math}) => {
if (math.start.delim !== '\begin{align}') {
math.math = math.math.replace(/(\\begin|\\end){align}/g, '$1{aligned}');
}
}
]
processEscapes: true
},
options: {
ignoreHtmlClass: 'tex2jax_ignore|editor-rich-text'
}
};
I tried your two other suggestions (in the inlineMath line above) and it didn't work.I do see a Uncaught SyntaxError: Invalid left-hand side in assignmentwhen I look at development tools in Chrome - here, it looks like:
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/521A7654-87D9-4DCC-BE08-4C8FF267B18F%40gmail.com.
On Aug 6, 2025, at 5:41 PM, Lisa Johnson <lis...@gmail.com> wrote:
THis is the code (from Christian) I put in the Custom Math Config.
MathJax = {
tex: {
inlineMath: {'[+]': [['$', '$']]},
preFilters: [
({math}) => {
if (math.start.delim !== '\begin{align}') {
math.math = math.math.replace(/(\\begin|\\end){align}/g, '$1{aligned}');
}
}
]
processEscapes: true
},
options: {
ignoreHtmlClass: 'tex2jax_ignore|editor-rich-text'
}
};I tried your two other suggestions (in the inlineMath line above) and it didn't work.I do see a Uncaught SyntaxError: Invalid left-hand side in assignmentwhen I look at development tools in Chrome - here, it looks like:
<image.png>
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/CAD7Rd51uCg7jU9wwx%3Dn_F-v61spgGcihygqX0nms1rwiVT-akg%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/FE6C7FBE-77D7-4FF7-90F4-E8A99AAB692B%40gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/CAD7Rd51UXnufipSZ_d1rifjG0ZLsxLrYMKG0N-qeijmOHyuepQ%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/A38B289C-8D7D-47EB-B964-9B2B7FA31051%40gmail.com.