1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
.. _configure-SVG:
************************
The SVG output processor
************************
The options below control the operation of the SVG output
processor that is run when you include ``"output/SVG"`` in the
`jax` array of your configuration or load a combined configuration
file that includes the SVG output jax. They are listed with their default
values. To set any of these options, include an ``SVG`` section
in your :meth:`MathJax.Hub.Config()` call. For example
.. code-block:: javascript
MathJax.Hub.Config({
SVG: {
scale: 120
}
});
would set the ``scale`` option to 120%.
.. describe:: scale: 100
The scaling factor (as a percentage) of math with respect to the
surrounding text. The `SVG` output processor tries to match
the ex-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.
.. describe:: 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.
.. describe:: font: "TeX"
This is the font to use for rendering the mathematics. The
possible values are ``TeX``, ``STIX-Web``, ``Asana-Math``,
``Neo-Euler``, ``Gyre-Pagella``, ``Gyre-Termes`` and
``Latin-Modern``. Note that not all mathematical characters are
available in all fonts (e.g., Neo-Euler does not include italic
characters), so some mathematics may work better in some fonts
than in others. The ``STIX-Web`` font is the most complete.
.. describe:: blacker: 1
This is the stroke width to use for all character paths (1em =
1000 units). This is a cheap way of getting slightly lighter or
darker characters, but remember that not all displays will act the
same, so a value that is good for you may not be good for everyone.
.. describe:: 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., this is where to look for characters
not included in the MathJax TeX 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.
.. describe:: mtextFontInherit: false
This setting controls whether ``<mtext>`` elements will be typeset
using the math fonts or the font of the surrounding text. When
``false``, the font for ``mathvariant="normal"`` will be used;
when ``true``, the font will be inherited from the surrounding
paragraph.
.. describe:: addMMLclasses: false
This controls whether the MathML structure is retained and CSS
classes are added to mark the original MathML elements (as in the
output from the `HTML-CSS` output jax). By default, the SVG
output jax removes unneeded nesting in order to produce a more
efficient markup, but if you want to use CSS to style the elements
as if they were MathML, you might need to set this to true.
.. describe:: useFontCache: true
This controls whether the SVG output uses ``<use>`` elements to re-use font paths rather than repeat paths every time. If ``useGlobalCache`` (see below) is set to ``false``, this will still reduce duplication of paths while keeping each SVG self-contained.
.. describe:: useGlobalCache: true
When set to ``true`` the SVG Output stores paths (corresponding to "fonts" in the SVG output) in a global SVG object using ``<defs>`` elements so that it can re-use them in all equations via ``<use>`` elements (much like a font file allows re-use of characters across the document). While set to ``true`` by default, it will have no effect if ``useFontCache`` is set to ``false``.
.. describe:: EqnChunk: 50
EqnChunkFactor: 1.5
EqnChunkDelay: 100
These values control how "chunky" the display of mathematical
expressions will be; that is, how often the equations will be
updated as they are processed.
``EqnChunk`` is the number of equations that will be typeset before
they appear on screen. Larger values make for less visual flicker
as the equations are drawn, but also mean longer delays before the
reader sees anything.
``EqChunkFactor`` is the factor by which the ``EqnChunk`` will
grow after each chunk is displayed.
``EqChunkDelay`` is the time (in milliseconds) to delay between
chunks (to allow the browser to respond to other user
interaction).
Set ``EqnChunk`` to 1, ``EqnChunkFactor`` to 1, and
``EqnChunkDelay`` to 10 to get the behavior from MathJax v1.1 and
below.
.. describe:: matchFontHeight: true
This option indicates whether MathJax should try to adjust the
x-height of equations to match the x-height of the surrounding text.
See the :ref:`MatchWebFonts options <configure-MatchWebFonts>` for finer
control, especially if you are using Web fonts.
.. describe:: linebreaks: {}
This is an object that configures automatic linebreaking in the
SVG output. In order to be backward compatible with earlier
versions of MathJax, only explicit line breaks are performed by
default, so you must enable line breaks if you want automatic
ones. The object contains the following values:
.. describe:: automatic: false
This controls the automatic breaking of expressions: when
``false``, only ``linebreak="newline"`` is processed; when
``true``, line breaks are inserted automatically in long
expressions.
.. describe:: width: "container"
This controls how wide the lines of mathematics can be.
Use an explicit width like ``"30em"`` for a fixed width.
Use ``"container"`` to compute the size from the containing
element.
Use ``"nn% container"`` for a portion of the container.
Use ``"nn%"`` for a portion of the window size.
The container-based widths may be slower, and may not produce
the expected results if the layout width changes due to the
removal of previews or inclusion of mathematics during
typesetting.
.. describe:: styles: {}
This is a list of CSS declarations for styling the SVG output.
See the definitions in ``jax/output/SVG/config.js`` for some
examples of what are defined by default. See :ref:`CSS Style
Objects <css-style-objects>` for details on how to specify CSS
style in a JavaScript object.
.. describe:: tooltip: { ... }
This sets the configuration options for ``<maction>`` elements
with ``actiontype="tooltip"``. (See also the ``#MathJax_Tooltip``
style setting in ``jax/output/SVG/config.js``, which can be
overridden using the ``styles`` option above.)
The ``tooltip`` section can contain the following options:
.. describe:: delayPost: 600
The delay (in milliseconds) before the tooltip is posted after
the mouse is moved over the ``maction`` element.
.. describe:: delayClear: 600
The delay (in milliseconds) before the tooltop is cleared
after the mouse moves out of the ``maction`` element.
.. describe:: offsetX: 10
offsetY: 5
These are the offset from the mouse position (in pixels)
where the tooltip will be placed.
|