mathtools
The mathtools extension implements the mathtools style package
from LaTeX. The package provides a number of tools for advanced
mathematical typesetting. See the mathtools CTAN page for more information and
documentation.
This package is not autoloaded, so you must request it explicitly if
you want to use it. To load the mathtools extension, add
'[tex]/mathtools' to the load array of the loader
block of your MathJax configuration, and add 'mathtools' to the
packages array of the tex block.
window.MathJax = {
loader: {load: ['[tex]/mathtools']},
tex: {packages: {'[+]': ['mathtools']}}
};
Alternatively, use \require{mathtools} in a TeX expression to load
it dynamically from within the math on the page, if the require
extension is loaded.
mathtools Options
Adding the mathtools extension to the packages array defines an
mathtools sub-block of the tex configuration block with the
following values:
MathJax = {
tex: {
mathtools: {
multline-gap: '1em',
multlined-pos: 'c',
multlined-width: '',
firstline-afterskip: '',
lastline-preskip: '',
smallmatrix-align: 'c',
shortvdotsadjustabove: '.2em',
shortvdotsadjustbelow: '.2em',
centercolon: false,
centercolon-offset: '.04em',
thincolon-dx: '-.04em',
thincolon-dw: '-.08em',
use-unicode: false,
legacycolonsymbols: false,
prescript-sub-format: '',
prescript-sup-format: '',
prescript-arg-format: '',
allow-mathtoolsset: true,
pairedDelimiters: {},
tagforms: {}
}
}
};
- multline-gap: '1em'
Horizontal space for multlined environments. Note that in version 3, this was
multlinegapwithout the dash.
- multlined-pos: 'c'
Default alignment for multlined environments.
- multlined-width: ''
The default width for miltlined environments.
- firstline-afterskip: ''
Space for first line of multlined (overrides multlinegap).
- lastline-preskip: ''
Space for last line of multlined (overrides multlinegap).
- smallmatrix-align: 'c'
Default alignment for smallmatrix environments.
- shortvdotsadjustabove: '.2em'
Space to remove above
\shortvdots.
- shortvdotsadjustbelow: '.2em'
Space to remove below
\shortvdots.
- centercolon: false
True to have colon automatically centered.
- centercolon-offset: '.04em'
Vertical adjustment for centered colons.
- thincolon-dx: '-.04em'
Horizontal adjustment for thin colons (e.g.,
\coloneqq).
- thincolon-dw: '-.08em'
Width adjustment for thin colons.
- use-unicode: false
True to use unicode characters rather than multi-character version for
\coloneqq, etc., when possible.
- legacycolonsymbols: false
The 2022 update to the LaTeX mathtools package changed the definitions of
\coloneqand three other related macros. Setting this option totruewill cause MathJax to use the older definitions rather than the ones from 2022 and later.
- prescript-sub-format: ''
Format for
\prescriptsubscript.
- prescript-sup-format: ''
Format for
\prescriptsuperscript.
- prescript-arg-format: ''
Format for
\prescriptbase.
- allow-mathtoolsset: true
True to allow
\mathtoolssetto change settings.
- pairedDelimiters: {}
Predefined paired delimiters of the form
name: [left, right, body, argcount, pre, post].
- tagforms: {}
Tag form definitions of the form
name: [left, right, format].
mathtools Commands
The mathtools extension implements the following macros:
\:, \Aboxed, \adjustlimits, \approxcolon, \Approxcolon, \ArrowBetweenLines, \bigtimes, \clap, \colonapprox, \Colonapprox, \colondash, \Colondash, \coloneq, \Coloneq, \coloneqq, \Coloneqq, \colonsim, \Colonsim, \cramped, \crampedclap, \crampedllap, \crampedrlap, \crampedsubstack, \dashcolon, \Dashcolon, \dblcolon, \DeclarePairedDelimiter, \DeclarePairedDelimiters, \DeclarePairedDelimitersX, \DeclarePairedDelimitersXPP, \DeclarePairedDelimiterX, \DeclarePairedDelimiterXPP, \eqcolon, \Eqcolon, \eqqcolon, \Eqqcolon, \lparen, \MakeAboxedCommand, \mathclap, \mathllap, \mathmakebox, \mathmbox, \mathrlap, \mathtoolsset, \MoveEqLeft, \MTFlushSpaceAbove, \MTFlushSpaceBelow, \MTThinColon, \ndownarrow, \newtagform, \nuparrow, \ordinarycolon, \overbracket, \prescript, \refeq, \renewtagform, \rparen, \shortvdotswithin, \shoveleft, \shoveright, \simcolon, \Simcolon, \splitdfrac, \splitfrac, \textclap, \textllap, \textrlap, \underbracket, \usetagform, \vcentercolon, \vdotswithin, \xhookleftarrow, \xhookrightarrow, \xLeftarrow, \xleftharpoondown, \xleftharpoonup, \xleftrightarrow, \xLeftrightarrow, \xleftrightharpoons, \xlongleftarrow, \xLongleftarrow, \xlongrightarrow, \xLongrightarrow, \xmapsto, \xmathstrut, \xRightarrow, \xrightharpoondown, \xrightharpoonup, \xrightleftharpoons
And the following environments:
bmatrix*, Bmatrix*, bsmallmatrix*, Bsmallmatrix*, bsmallmatrix, Bsmallmatrix, cases*, crampedsubarray, dcases*, dcases, drcases*, drcases, lgathered, matrix*, multlined, pmatrix*, psmallmatrix*, psmallmatrix, rcases*, rcases, rgathered, smallmatrix*, spreadlines, vmatrix*, Vmatrix*, vsmallmatrix*, Vsmallmatrix*, vsmallmatrix, Vsmallmatrix