Skip to content

Commit b9f7623

Browse files
committed
Add v3 to v4 upgrading, and adjust some what's new pages
1 parent 06db7fc commit b9f7623

File tree

3 files changed

+75
-1
lines changed

3 files changed

+75
-1
lines changed

upgrading/v3.rst

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,59 @@
44
Upgrading from v3 to v4
55
#######################
66

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+
860

961
|-----|
1062

upgrading/whats-new-4.0/accessing.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ and if you want a different font, a command like
8181
to get the latest `mathjax-stx2` font package. The other fonts can be
8282
obtained similarly.
8383

84+
In your code, you will need to change any references to the
85+
``mathjax-full`` package to ``@mathjax/src``, and any references to
86+
``mathjax-[fontname]-font`` to ``@mathjax/mathjax-[fontname]-font``.
87+
8488

8589
.. _v4-browser-fonts:
8690

upgrading/whats-new-4.0/output.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ be used in the new renderer without needing additional configuration.
1212
The individual :data:`chtml` and :data:`svg` blocks then should only
1313
include options that are specific to those output formats.
1414

15+
16+
.. _v4-CHTML:
17+
18+
CHTML Improvements
19+
==================
20+
1521
An important improvement has been made in v4 to the way the CHTML
1622
output renderer handles stretchy delimiters. In the past, the CHTML
1723
output would use CSS transforms to stretch the extender to the needed
@@ -40,6 +46,12 @@ includes a work-around that should help with the alignment in
4046
where the characters
4147
are grouped into a single MathML element.
4248

49+
50+
.. _v4-SVG:
51+
52+
SVG Improvements
53+
================
54+
4355
The SVG output jax has two new configuration options. The first is
4456
:data:`svg.blacker`, which is a number that indicates the stroke width
4557
(in thousandths of an em) to use for the character paths. Because
@@ -65,6 +77,12 @@ characters to form a single glyph will be handled properly. So use
6577
Note that this was already being done for CHTML output, so this brings
6678
the two in line with each other.
6779

80+
81+
.. _v4-assisitve-mml:
82+
83+
Assistive MathML Size
84+
=====================
85+
6886
In the past, the hidden MathML that is produced by the
6987
:ref:`assistive-mml-component` extension could be rendered by the
7088
browser larger than the math typeset by MathJax, which could interfere

0 commit comments

Comments
 (0)