The FontWarnings extensionΒΆ

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

MathJax.Hub.Config({
  FontWarnings: {
    fadeoutTime: 2*1000
  }
});

would set the fadeoutTime option to 2000 milliseconds (2 seconds).

messageStyle: { ... }

This sets the CSS styles to be used for the font warning message window. See the extensions/FontWarnings.js file for details of what are set by default. See the CSS style objects for details about how to specify CSS styles via javascript objects.

Message: { ... }

This block contains HTML snippets to be used for the various messages that the FontWarning extension can produce. There are three messages that you can redefine to suit your needs:

webFont: [ ... ]

The message used for when MathJax uses web-based fonts (rather than local fonts installed on the user’s system).

imageFonts: [ ... ]

The message used for when MathJax must use image fonts rather than local or web-based fonts (for those browsers that don’t handle the @font-face CSS directive).

noFonts: [ ... ]

The message used when MathJax is unable to find any font to use (i.e., neither local nor web-based nor image-based fonts are available).

Any message that is set to null rather than an HTML snippet array will not be presented to the user, so you can set, for example, the webFont message to null in order to have the imageFonts and noFonts messages, but no message if MathJax uses web-based fonts.

See the description of HTML snippets for details about how to describe the messages using HTML snippets. Note that in addition to the usual rules for defining such snippets, the FontWarnings snippets can include references to pre-defined snippets (that represent elements common to all three messages). These are defined below in the HTML block, and are referenced using ["name"] within the snippet, where name is the name of one of the snippets defined in the HTML configuration block. For example

   Message: {
     noFonts: [
       ["closeBox"],
       "MathJax is unable to locate a font to use to display ",
       "its mathematics, and image fonts are not available, so it ",
       "is falling back on generic unicode characters in hopes that ",
       "your browser will be able to display them.  Some characters ",
       "may not show up properly, or possibly not at all.",
       ["fonts"],
       ["webfonts"]
     ]
   }

refers to the ``closeBox``, ``fonts`` and ``webfonts`` snippets in
declared in the ``HTML`` section.
HTML: { ... }

This object defines HTML snippets that are common to more than one message in the Message section above. They can be called in by using ["name"] in an HTML snippet, where name refers to the name of the snippet in the HTML block. The pre-defined snippets are:

closeBox

The HTML for the close box in the FontWarning message.

webfonts

The HTML for a paragraph suggesting an upgrade to a more modern browser that supports web fonts.

fonts

HTML that includes links to the Ma