-
Notifications
You must be signed in to change notification settings - Fork 99
Configuration options
Peter Krautzberger edited this page Jun 3, 2016
·
5 revisions
mathjax-node's main API has two sets of configuration options.
The first set, passed to the config method, provides global configuration options.
{
displayMessages: false, // determines whether Message.Set() calls are logged
displayErrors: true, // determines whether error messages are shown on the console
undefinedCharError: false, // determines whether unknown characters are saved in the error array
extensions: '', // a convenience option to add MathJax extensions
fontURL: 'https://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS', // for webfont urls in the CSS for HTML output
MathJax: { } // options MathJax configuration, see https://docs.mathjax.org
}data:
ex: 6, // ex-size in pixels
width: 100, // width of container (in ex) for linebreaking and tags
useFontCache: true, // use <defs> and <use> in svg output?
useGlobalCache: false, // use common <defs> for all equations?
linebreaks: false, // do linebreaking?
equationNumbers: "none", // or "AMS" or "all"
math: "", // the math to typeset
format: "TeX", // the input format (TeX, inline-TeX, AsciiMath, or MathML)
xmlns: "mml", // the namespace to use for MathML
html: false, // return HTML output?
css: false, // return CSS for HTML output?
mml: false, // return mml output?
svg: false, // return svg output?
img: false, // return img tag for remote image?
png: false, // return png image (as data: URL)?
dpi: 144, // dpi for png image
speakText: false, // add spoken annotations to svg output?
speakRuleset: "mathspeak", // set speech ruleset (default (chromevox rules), mathspeak)
speakStyle: "default", // set speech style (mathspeak: default, brief, sbrief)
timeout: 10 * 1000, // 10 second timeout before restarting MathJax
};MathJax, extensions, and fontURL are "sticky" and changes require a restart of the API (using the start() method).