Attention

Version 3 is now the current version of MathJax. This document is for version 1.

The HTML-CSS output processor

The options below control the operation of the HTML-CSS output processor that is run when you include "output/HTML-CSS" in the jax array of your configuration. They are listed with their default values. To set any of these options, include a "HTML-CSS" section in your MathJax.Hub.Config() call. Note that, because of the dash, you need to enclose the name in quotes. For example

MathJax.Hub.Config({
  "HTML-CSS": {
    preferredFont: "STIX"
  }
});

would set the preferredFont option to the STIX fonts.

scale: 100

The scaling factor (as a percentage) of math with respect to the surrounding text. The HTML-CSS output processor tries to match the en-size 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.

minScaleAdjust: 50

This gives a minimum scale (as a percent) for the scaling used by MathJax to match the equation to the surrounding text. This will prevent MathJax from making the mathematics too small.

availableFonts: ["STIX","TeX"]

This is a list of the fonts to look for on a user’s computer in preference to using MathJax’s web-based fonts. These must correspond to directories available in the jax/output/HTML-CSS/fonts directory, where MathJax stores data about the characters available in the fonts. Set this to ["TeX"], for example, to prevent the use of the STIX fonts, or set it to an empty list, [], if you want to force MathJax to use web-based or image fonts.

preferredFont: "TeX"

Which font to prefer out of the availableFonts list, when more than one is available on the user’s computer.

webFont: "TeX"

This is the web-based font to use when none of the fonts listed above are available on the user’s computer. Note that currently only the TeX font is available in a web-based form (they are stored in the fonts/HTML-CSS folder in the MathJax directory). Set this to null to disable web fonts.

imageFont: "TeX"

This is the font to use for image fallback mode (when none of the fonts listed above are available and the browser doesn’t support web-fonts via the @font-face CSS directive). Note that currently only the TeX font is available as an image font (they are stored in the fonts/HTML-CSS directory).

Set this to null if you want to prevent the use of image fonts (e.g., you have deleted or not installed the image fonts on your server). In this case, only browsers that support web-based fonts will be able to view your pages without having the fonts installed on the client computer. The browsers that support web-based fonts include: IE6 and later, Chrome, Safari3.1 and above, Firefox3.5 and later, and Opera10 and later. Note that Firefox3.0 is not on this list.

undefinedFamily: "STIXGeneral, 'Arial Unicode MS', serif"

This is the font-family CSS value used for characters that are not in the selected font (e.g., for web-based fonts, this is where to look for characters not included in the MathJax web fonts). IE will stop looking after the first font that exists on the system (even if it doesn’t contain the needed character), so order these carefully.

styles: {}

This is a list of CSS declarations for styling the HTML-CSS output. See the definitions in jax/output/HTML-CSS/config.js for some examples of what are defined by default. See CSS Style Objects for details on how to specify CSS style in a JavaScript object.

showMathMenu: true

This controls whether the MathJax contextual menu will be available on the mathematics in the page. If true, then right-clicking (on the PC) or control-clicking (on the Mac) will produce a MathJax menu that allows you to get the source of the mathematics in various formats, change the size of the mathematics relative to the surrounding text, get information about MathJax, and configure other MathJax settings.

Set this to false to disable the menu. When true, the MathMenu configuration block determines the operation of the menu. See the MathMenu options for more details.

tooltip: { ... }

This sets the configuration options for <maction> elements with actiontype="tooltip". (See also the #MathJax_Tooltip style setting in jax/output/HTML-CSS/config.js, which can be overridden using the styles option above.)

The tooltip section can contain the following options:

delayPost: 600

The delay (in milliseconds) before the tooltip is posted after the mouse is moved over the maction element.

delayClear: 600

The delay (in milliseconds) before the tooltop is cleared after the mouse moves out of the maction element.

offsetX: 10 and offsetY: 5

These are the offset from the mouse position (in pixels) where the tooltip will be placed.