MathJax v4.0.0-beta.6
Pre-releaseThis release includes a significant rewrite of the expression explorer and an update to the speech-rule engine (SRE) that underlies MathJax's assistive support. Accompanying this is a reorganization of the MathJax contextual menu that moves the assistive options to a more prominent position for easier access and better control. This release also includes several new font-based TeX packages (and the fonts to accompany them) that provide alternative double-struck character styles. In addition, we have moved from npm
to pnpm
as the package manager for the MathJax source repository. Finally, there are also a number of bug fixes since the beta.4 release.
We anticipate one more beta release before the official 4.0.0 release.
Explorer Updates
The MathJax expression explorer has been updated to seamlessly fit in with an accessible browsing experience. In particular, there is no longer a need to switch on accessibility support in the contextual menu (which can still be used to explicitly disable that support, as described in the next section). Once a formula is focused, exploration can immediately start by using the arrow keys. (For a full list of keyboard commands see here.) This allows you to dive into the details of the formula, including highlighting sub-expressions, and, if selected, magnification. Moreover, the explorer can now also be started by left-clicking elements within in the formula itself. That is, you can click on any character within the expression to start the explorer at that point in the expression. Communication with screen readers (if any is used) is achieved via aria-label
and aria-braille-label
elements instead of the live
region as utilized previously. Alternatively, automatic voicing and synchronized highlighting can be used directly without a screen reader by switching on those options in the contextual menu.
Menu Updates
The MathJax contextual menu has been reorganized to make the accessibility features more easy to use. The top-level menu now includes an "Accessibility" section with four submenus — "Speech", "Braille", "Explorer", and "Options" — rather than an accessibility submenu as in previous versions. The Speech menu allows you to enable/disable speech generation and its associated visual output, and to turn on or off auto voicing. It also provides control over the speech rule-set to use, the verbosity of the set in use, and the language to use for the speech. Similarly, the Braille menu allows you to enable/disable Braille generation and display, as well as to select the type of Braille to generate.
The explorer controls for magnification and highlighting have been moved to the Explorer menu, and other accessibility options have been moved from the Math Settings and old Accessibility submenus to the Options menu. A new "Semantic Enrichment" option controls whether the accessibility features are available or not (unchecking disables speech and Braille generation and the explorer).
New TeX packages
This release of MathJax includes three new TeX packages that provide alternative double-struck (i.e., blackboard bold) character sets: dsfont
, bbm
, and bboldx
. New font extensions for the mathjax-modern font are now available for these packages, and the font extensions are loaded automatically when the TeX package is loaded. Currently, these fonts are available only in combination with the mathjax-modern font, but in the next release, they will be able to be applied to any of the available fonts.
The dsfont
package defines a macro \mathds
that provides access to its double-struck characters. There is a configuration option that controls whether the sans-serif version of these fonts is used, or the roman versions:
MathJax = {
tex: {
dsfont: {
sans: true // default is false
}
}
}
The bbm
package defines macros \mathbbm
, \mathmmbss
, and \mathbbmtt
to generate its double-struck characters, as well as a \mathversion
macro that can be used to select the version of the double-struck fonts to use (this is a global setting). Here, \mathversion{bold}
selects the bold versions of the double-struck characters, while any argument other than bold
will select the normal versions of the fonts.
The bboldx
package redefines \mathbb
to use the bboldx double-struck characters, and adds \mathbfbb
to access their bold-face versions, plus \imathbb
, \jmathbb
, \imathbfbb
, and \jmathbfbb
for dotless i
and j
characters in these fonts. In addition, there are macros for upper- and lower-case Greek letters, e.g., \bbGamma
, \bfbbsigma
, etc., and text-based versions of these for use in \text{}
, e.g., \txtbbGamma
. The bold delimiters \bbLparen
, \bbRparen
, \bbLbrack
, \bbRbrack
, \bbLangle
, \bbRangle
, and the bfbb
versions of these, are defined, but do not yet work with \left
and \right
. That will be addressed in the next release.
Move from npm
to pnpm
With this release, MathJax is switching to pnpm
as our package manager rather than npm
. This speeds up installation and improves script handling. Although you can still use npm
, some of the scripts in package.json
call pnpm
, so you will need to have pnpm
installed to use those scripts. Fortunately, this only affects those who are compiling and packaging MathJax, so unless you are working with the MathJax source files, you should not be affected by this change. If you are only using MathJax in web pages via a CDN, for example, you will not need to worry about pnpm
(or npm
).
To install pnpm
you can use
npm install -g pnpm
The following sections indicate the bug fixes in this release:
TeX Input Fixes
-
Add
dsfont
,bbm
, andbboldx
TeX extensions (#1055, #1056, #1057, #1063, #1064, #1065, #1074, #1075, #1076) -
Make
textcomp
package register withtextmacros
automatically. (#1073) -
Fix problems with
data-latex
attribute generation (mathjax/MathJax#3184) (#1028, #1060) -
Allow unknown characters to use the operator table to determine class and node type. (mathjax/MathJax#3203) (#1070)
-
Handle primes in
munderover
as inmsubsup
. (mathjax/MathJax#3202) (#1069) -
Make
\symbf
and\symsf
handle Greek italics as in LaTeX. (#1061) -
Add missing commands to textmacros package (#1071)
-
Make stretchy paired delimiters in the
mathtools
package not be class INNER. (mathjax/MathJax#3183) (#1059) -
Fix
\require
to properly handle retries in dependencies. (mathjax/MathJax#3170) (#1050) -
Move
\divsymbol
tophysics
package and add\divisionsymbol
. (mathjax/MathJax#3173) (#1049) -
Allow (embellished) operators in
\underset
,\overset
, and\underoverset
to specifyaccent="true"
(#894) -
Fix processing of
\U{...}
where two occurrences in\text{}
would fail. (#1048) -
Update handling of braket bars so that the enclosing braket can be more accurately found. (mathjax/MathJax#3164) (#1041)
-
Fix problem with
\let
using attributes of{}
when they should benull
(#1030) -
Have
\unicode
check for illegal font name. (mathjax/MathJax#3129) (#1019)
Output Fixes
-
Add
xmlns
attribute for global cachesvg
element. (mathjax/MathJax-demos-node#58) (#1045) -
Fix issues with line breaks and spacing in SVG output. (mathjax/MathJax#3166) (#1043)
-
Make sure math items have their metrics set before lazy typesetting. (mathjax/MathJax#3167) (#1042)
-
Don't descend into items that aren't broken when looking for the line-break node. (mathjax/MathJax#3135) (#1024)
-
Fix font extension handling of extra variants, and handle those variants in enrichment. (#1033)
-
Update CHTML
longdiv
output to not requireclip-path
. (#1025) -
Better measuring of text that is in a native font rather than MathJax fonts (#1014)
User Interface Updates
-
Update expression explorer (#987, #1035, #1040, #1053, #1058, #1078, #1079)
-
Fix problem with spurious white pixels from unused explorer regions (mathjax/MathJax#3001) (#1072)
-
Fix rendering of embedded HTML to work with scaling and
mathsize
changes. (mathjax/MathJax#3116) (#1012) -
Add ability to not show latex attributes, and reorganize settings menu (#1017)
API Fixes
-
Proper handling of
typesetPromise()
indefaultPageReady()
. (mathjax/MathJax#3130) (#1018) -
Add missing
Text.splitText()
method tolinkedom
. (mathjax/MathJax#3134) (#1036) -
Update LiteParser's
serializeXML()
method. (mathjax/MathJax-demos-node#58) (#1046) -
Fix menu to not re-render if no typesetting has occurred. (mathjax/MathJax#3167) (#1044)
-
Fix
keyvalOptions
to process braces and backslashes better (#1031) -
Update TeX input's
keyvalOptions
, and addGetBrackets()
option to match brackets. (#1037) -
Add ability to do typechecking and conversion on the values of key-value options (#1032)
-
Clear process bits for
findMath()
andattach-speech()
, and remove safe bit that isn't needed. (#1034) -
Refactor
input/tex/ParseUtil.ts
to removenamespace
(#1022) -
Add
cssText()
method toDOMadaptor
and handle dynamic rules in HTML output. (#1027) -
Make
const enum DIRECTION
into a regular object. (mathjax/MathJax#3114) (#1026) -
Fix default option list to
{}
in constructors for output jax. (mathjax/MathJax#3128) (#1016) -
Fix
make-cjs-components
script to work withoutmjs
files being built first (#1013)