Attention
Version 3 is now the current version of MathJax. This document is for version 2.
The fast-preview extension¶
The options below control the operation of the fast-preview
extension that is run when you include "fast-preview.js"
in the
extensions array of your configuration. They are listed with their
default values. To set any of these options, include a
fast-preview
section in your MathJax.Hub.Config()
call.
For example
MathJax.Hub.Config({
"fast-preview": {
Chunks: {EqnChunk: 10000, EqnChunkFactor: 1, EqnChunkDelay: 0},
color: "inherit!important",
updateTime: 30, updateDelay: 6,
messageStyle: "none",
disabled: false
}
});
would ask for the PreviewHTML output to run as a preview (disabled: false), force inheritance of the surrounding text color, and set the updateTime and updateDelay to low values (30ms / 6ms) to speed up the preview pass. Furthermore, it configures the second pass to set the chunking (Chunks) to a reflow every 10,000 equations and disables the progress messages (messageStyle).
This extension provides a two-pass rendering mode. A first, fast-but-rough rendering is genereated as a preview, using the The PreviewHTML output processor, then a second pass using the configured output jax runs to update the preview output.
This two-pass mode will provide the reader with a quick, decent rendering to start reading immediately, while silently updating that rendering with the high quality layout later.
- EqnChunk: 10000
- EqnChunkFactor: 1
- EqnChunkDelay: 0
These values control how “chunky” the second pass will be. For more information see The HTML-CSS output processor and The SVG output processor.
- color: "inherit!important"
This value allows you to choose a text color for the first passs.
- updateTime: 30
- updateDelay: 6
These values control how often the second pass will pause to allow user interaction (e.g., scrolling).
- messageStyle: "none"
This value controls the verbosity of the processing messages during the the second pass; see The Core Configuration Options for more information.
- disabled:false
This value enables or disables the preview mode. In particular, it allows overriding a combined configuration file, cf. Combined Configurations. The user can independently enable or disable the fast preview via the MathJax Menu.