Output Processor Options¶
There are a number of configuration options that are common to all the output processors. These are described following the links below, which give the options that are specific to the particular output jax.
Options Common to All Output Processors¶
The following options are common to all the output processors listed
above. They are given here with their default values, using the
chtml
block as an example.
MathJax = {
chtml: {
scale: 1, // global scaling factor for all expressions
minScale: .5, // smallest scaling factor to use
matchFontHeight: true, // true to match exheight of surrounding font
mtextInheritFont: false, // true to make mtext elements use surrounding font
merrorInheritFont: true, // true to make merror text use surrounding font
mathmlSpacing: false, // true for MathML spacing rules, false for TeX rules
skipAttributes: {}, // RFDa and other attributes NOT to copy to the output
exFactor: .5, // default size of ex in em units
displayAlign: 'center', // default for indentalign when set to 'auto'
displayIndent: '0' // default for indentshift when set to 'auto'
}
};
Option Descriptions¶

scale: 1
The scaling factor for math compaired to the surrounding text. The CommonHTML output processor tries to match the exsize of the mathematics with that of the text where it is placed, but you may want to adjust the results using this scaling factor. The user can also adjust this value using the contextual menu item associated with the typeset mathematics.

minScale: .5
This gives a minimum scale factor for the scaling used by MathJax to match the equation to the surrounding text. This will prevent MathJax from making the mathematics too small.

matchFontHeight: true
This setting controls whether MathJax will scale the mathematics so that the exheight of the math fonts matches the exheight of the surrounding fonts. This makes the math match the surroundings better, but if the surrounding font doesn’t have its exheight set properly (and not all fonts do), it can cause the math to not match the surrounding text. While this will make the lowercase letters match the surrounding fonts, the upper case letters may not match (that would require the font height and exheight to have the same ratio in the surrounding text as in the math fonts, which is unlikely).

mtextInheritFont: false
This setting controls whether
<mtext>
elements will be typeset using the math fonts or the font of the surrounding text. Whenfalse
, the math fonts will be used, as they are for other token elements; whentrue
, the font will be inherited from the surrounding text, when possible, depending on themathvariant
for the element (some math variants, such asfraktur
can’t be inherited from the surroundings).

merrorInheritFont: false
This setting controls whether the text for
<merror>
elements will be typeset using the math fonts or the font of the surrounding text. Whenfalse
, the math fonts will be used, as they are for other token elements; whentrue
, the font will be inherited from the surrounding text, when possible, depending on themathvariant
for the element (some math variants, such asfraktur
can’t be inherited from the surroundings).

mathmlSpacing: false
This specifies whether to use TeX spacing or MathML spacing when typesetting the math. When
true
, MathML spacing rules are used; whenfalse
, the TeX rules are used.

skipAttributes: {}
This object gives a list of nonstandard attributes (e.g., RFDa attributes) that will not be transferred from MathML element to their corresponding DOM elements in the typeset output. For example, with
skipAttributes: { datamyattr: true }
a MathML element like
<mi datamyattr="some data">x</mi>
will not have thedatamyattr
attribute on the<mjxmi>
element created by the CommonHTML output processor to represent the<mi>
element (normally, any nonstandard attributes are retained in the output).

exFactor: .5
This is the size of an ex in comparison to 1 em that is to be used when the exsize can’t be determined (e.g., when running in a Node application, where the size of DOM elements can’t be determined).

displayAlign: 'center'
This determines how displayed equations will be aligned (left, center, or right). The default is
'center'
.

displayIndent: 0
This gives the amount of indentation that should be used for displayed equations. The default is
0
. A value of'1em'
, for example, would introduce an extra 1 em of space from whichever margin the equation is aligned to, or an offset from the center position if the expression is centered. Note that negative values are allowed.
Developer Options¶
In addition to the options listed above, lowlevel options intended for developers include the following:

wrapperFactory: null
The
WrapperFactory
object instance to use for creating wrappers for the internal MathML objects. This allows you to create a subclass ofWrapperFactory
and pass that to the output jax. Anull
value means use the defaultWrapperFactory
class and make a new instance of that.

font: null
The
FontData
object instance to use for creating wrappers for the internal MathML objects. This allows you to create a subclass ofFontData
and pass that to the output jax. Anull
value means use the defaultFontData
class and make a new instance of that.

cssStyles: null
The
CssStyles
object instance to use for creating wrappers for the internal MathML objects. This allows you to create a subclass ofCssStyles
and pass that to the output jax. Anull
value means use the defaultCssStyles
class and make a new instance of that.