The tex2jax PreprocessorΒΆ

The options below control the operation of the tex2jax preprocessor that is run when you include "tex2jax.js" in the extensions array of your configuration. They are listed with their default values. To set any of these options, include a tex2jax section in your MathJax.Hub.Config() call. For example

MathJax.Hub.Config({
  tex2jax: {
    inlineMath: [ ['$','$'], ['\\(','\\)'] ]
  }
});

would set the inlineMath delimiters for the tex2jax preprocessor.

element: null

The id name of the element that should be processed by tex2jax. The default is the whole document.

inlineMath: [['\(','\)']]

Array of pairs of strings that are to be used as in-line math delimters. The first in each pair is the initial delimiter and the second is the terminal delimiter. You can have as many pairs as you want. For example,

inlineMath: [ ['$','$'], ['\\(','\\)'] ]

would cause tex2jax to look for $...$ and \(...\) as delimiters for inline mathematics. (Note that the single dollar signs are not enabled by default because they are used too frequently in normal text, so if you want to use them for math delimiters, you must specify them explicitly.)

Note that the delimiters can’t look like HTML tags (i.e., can’t include the less-than sign), as these would be turned into tags by the browser before MathJax has the chance to run. You can only include text, not tags, as your math delimiters.

displayMath: [ ['$$','$$'], ['\[','\]'] ]

Array of pairs of strings that are to be used as delimters for displayed equations. The first in each pair is the initial delimiter and the second is the terminal delimiter. You can have as many pairs as you want.

Note that the delimiters can’t look like HTML tags (i.e., can’t include the less-than sign), as these would be turned into tags by the browser before MathJax has the chance to run. You can only include text, not tags, as your math delimiters.

processEscapes: false

When set to true, you may use \$ to represent a literal dollar sign, rather than using it as a math delimiter. When false, \$ will not be altered, and the dollar sign may be considered part of a math delimiter. Typically this is set to true if you enable the $ ... $ in-line delimiters, so you can type \$ and tex2jax will convert it to a regular dollar sign in the rendered document.

processEnvironments: true

When true, tex2jax looks not only for the in-line and display math delimters, but also for LaTeX environments (\begin{something}...\end{something}) and marks them for processing by MathJax. When false, LaTeX environments will not be processed outside of math mode.

preview: "TeX"

This controls whether tex2jax inserts MathJax_Preview spans to make a preview available, and what preview to use, when it locates in-line or display mathematics in the page. The default is "TeX", which means use the TeX c