|
4 | 4 | Upgrading from v3 to v4 |
5 | 5 | ####################### |
6 | 6 |
|
7 | | -Under construction |
| 7 | +Because version 3 was a complete rewrite of MathJax, the API had major |
| 8 | +changes from version 2 to version 3, making that upgrade one that |
| 9 | +could require significant work. That is not the case for upgrading |
| 10 | +from v3 to v4. The API for v4 is largely the same as v3, with most |
| 11 | +changes being additions rather than changes. |
| 12 | + |
| 13 | +There are many new features in v4. See the :ref:`whats-new-4.0` |
| 14 | +section for complete details. There are some breaking changes, which |
| 15 | +are outlined in the :ref:`v4-breaking-changes` section. |
| 16 | + |
| 17 | +For those who are using MathJax in web pages by just configuring and |
| 18 | +loading MathJax without calling its API directly, you may not have to |
| 19 | +make any changes other than changing the URL to load version 4. |
| 20 | + |
| 21 | +If you are calling the MathJax API, then you may need to change to |
| 22 | +using the promise-based calls like :js:meth:`MathJax.typesetPromise()` |
| 23 | +rather than the synchronous ones like :js:meth:`MathJax.typeset()`. |
| 24 | +See the :ref:`v4-promises` section for details and suggestions for how |
| 25 | +to proceed. |
| 26 | + |
| 27 | +MathJax v4 now produces ES6 modules rather than the older ES5 CommonJS |
| 28 | +modules of v3. This means has lead to changes in the MathJax source |
| 29 | +directories and the build tools that are used to compile and pack |
| 30 | +MathJax and its extensions. See the sections on |
| 31 | +:ref:`v4-es6-modules`, :ref:`v4-api-modules`, and |
| 32 | +:ref:`v4-build-tools` for more information. |
| 33 | + |
| 34 | +There are significant changes to how MathJax handles speech generation |
| 35 | +in v4. See the :ref:`Explorer Technical Details |
| 36 | +<v4-explorer-details>` and :ref:`v4-breaking-speech` sections for more |
| 37 | +information on these changes and how to address them. |
| 38 | + |
| 39 | +If you have written extensions or other customizations for MathJax, |
| 40 | +then there are changes that you may need to take into account. See |
| 41 | +the :ref:`v4-breaking-changes` section for more details about these. |
| 42 | +There are also many more examples available here for both the |
| 43 | +web-based and node-based applications of MathJax. See |
| 44 | +:ref:`web-examples` and :ref:`node-examples` for lists of the most |
| 45 | +important ones. |
| 46 | + |
| 47 | +There are a number of changes to the TeX input jax and its extensions |
| 48 | +that may affect existing content. For example, the |
| 49 | +:ref:`tex-textmacros` extension is no by default in the :ref:`combined |
| 50 | +components <combined-components>`, which has implecations for |
| 51 | +``\text{}`` and othe text-mode macros if they contain text that will |
| 52 | +now be considered as macro references that where ignored in the past. |
| 53 | +There are also changes to the :ref:`tex-mathtools` extension, and to |
| 54 | +several other extensions. See the :ref:`v4-tex-improvements` section |
| 55 | +for details on this and the other such changes. |
| 56 | + |
| 57 | +The ``all-packages`` extension has been removed, as have the combined |
| 58 | +components ending in ``-full``. See :ref:`v4-all-packages` for more on this. |
| 59 | + |
8 | 60 |
|
9 | 61 | |-----| |
10 | 62 |
|
0 commit comments