SVG Output Processor Options
The options below control the operation of the SVG output
processor that is run when you include 'output/svg'
in the load array of the loader block of your MathJax
configuration, or if you load a combined component that includes the
CommonHTML output jax. They are listed with their default values. To
set any of these options, include an svg section in your
MathJax global object.
In addition to the options listed below, you can also include any of
the options from the output block listed in the
Output Processor Options section.
The Configuration Block
MathJax = {
svg: {
blacker: 3, // the stroke-width to use for SVG character paths
fontCache: 'local', // or 'global' or 'none'
useXlink: true, // true to include xlink namespace for <use> hrefs, false to not
}
};
Note
The internalSpeechTitles attribute from v3 has been removed in v4.
Option Descriptions
- blacker: 3
This specifies the stroke-width to use for SVG character paths in units that are 1/1000 of an em. Enlarging this makes the characters a bit bolder, but can also cause them to render poorly, as some details may begin to overlap and become unreadable. You probably don’t want to go above 20 or so.
- fontCache: 'local'
This setting determines how the SVG output jax manages characters that appear multiple times in an equation or on a page. The SVG processor uses SVG paths to display the characters in your math expressions, and when a character is used more than once, it is possible to reuse the same path description; this can save space in the SVG image, as the paths can be quite complex. When set to
'local', MathJax will cache font paths on an express-by-expression (each expression has its own cache within the SVG image itself), which makes the SVG self-contained, but still allows for some savings if characters are repeated. When set to'global', a single cache is used for all paths on the page; this gives the most savings, but makes the images dependent on other elements of the page. When set to'none', no caching is done and explicit paths are used for every character in the expression.
- useXlink: true
When a font cache is used, MathJax employs
<use>tags to access the character path definitions. Traditionally, thehrefattributes that reference the path IDs are required to be in thexlinknamespace, and so appear asxlink:href. HTML5 has deprecated namespaces, so in HTML pages, they should appear as plainhrefattributes instead. TheuseXlinkattribute determines whether thexlinknamespace should be included in thehrefattributes or not.
The remaining options are described in the Options Common to All Output Processors section.
Developer Options
In addition to the options listed above, low-level options intended for developers include the following:
- localID: null
This gives the ID prefix to use for the paths stored in a local font cache when
fontCacheis set to'local'. This is useful if you need to process multiple equations by hand and want to generate unique ids for each equation, even if MathJax is restarted between equations. If set tonull, no prefix is used.