Updated configuration options documentaiton and added SVG and MathEvents documentation

This commit is contained in:
Davide P. Cervone 2012-02-20 18:01:27 -05:00
parent 4332291f58
commit 39b78b1477
47 changed files with 1981 additions and 449 deletions

View File

@ -6,10 +6,11 @@ The AsciiMath input processor
The options below control the operation of the AsciiMath input The options below control the operation of the AsciiMath input
processor that is run when you include ``"input/AsciiMath"`` in the processor that is run when you include ``"input/AsciiMath"`` in the
`jax` array of your configuration or use a combined configuration file `jax` array of your configuration or load a combined configuration
that includes AsciiMath input. They are listed with their default file that includes the AsciiMath input jax. They are listed with
values. To set any of these options, include a ``AsciiMath`` section their default values. To set any of these options, include a
in your :meth:`MathJax.Hub.Config()` call. For example ``AsciiMath`` section in your :meth:`MathJax.Hub.Config()` call. For
example
.. code-block:: javascript .. code-block:: javascript

View File

@ -6,10 +6,12 @@ The HTML-CSS output processor
The options below control the operation of the HTML-CSS output The options below control the operation of the HTML-CSS output
processor that is run when you include ``"output/HTML-CSS"`` in the processor that is run when you include ``"output/HTML-CSS"`` in the
`jax` array of your configuration. They are listed with their default `jax` array of your configuration or load a combined configuration
values. To set any of these options, include a ``"HTML-CSS"`` section file that includes the HTML-CSS output jax. They are listed with
in your :meth:`MathJax.Hub.Config()` call. Note that, because of the their default values. To set any of these options, include a
dash, you need to enclose the name in quotes. For example ``"HTML-CSS"`` section in your :meth:`MathJax.Hub.Config()` call.
Note that, because of the dash, you need to enclose the name in
quotes. For example
.. code-block:: javascript .. code-block:: javascript
@ -25,7 +27,7 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
The scaling factor (as a percentage) of math with respect to the The scaling factor (as a percentage) of math with respect to the
surrounding text. The `HTML-CSS` output processor tries to match surrounding text. The `HTML-CSS` output processor tries to match
the en-size of the mathematics with that of the text where it is 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 placed, but you may want to adjust the results using this scaling
factor. The user can also adjust this value using the contextual factor. The user can also adjust this value using the contextual
menu item associated with the typeset mathematics. menu item associated with the typeset mathematics.
@ -86,6 +88,68 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
(even if it doesn't contain the needed character), so order these (even if it doesn't contain the needed character), so order these
carefully. 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:: 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:: linebreaks: {}
This is an object that configures automatic linebreaking in the
HTML-CSS 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: {} .. describe:: styles: {}
This is a list of CSS declarations for styling the HTML-CSS This is a list of CSS declarations for styling the HTML-CSS
@ -96,18 +160,10 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
.. describe:: showMathMenu: true .. describe:: showMathMenu: true
This controls whether the MathJax contextual menu will be This value has been moved to the core configuration block, since
available on the mathematics in the page. If true, then it applies to all output jax, but it will still be honored (for
right-clicking (on the PC) or control-clicking (on the Mac) will now) if it is set here. See the :ref:`Core configuration options
produce a MathJax menu that allows you to get the source of the <configure-hub>` for more details.
mathematics in various formats, change the size of the mathematics
relative to the surrounding text, get information about
MathJax, and configure other MathJax settings.
Set this to ``false`` to disable the menu. When ``true``, the
``MathMenu`` configuration block determines the operation of the
menu. See :ref:`the MathMenu options <configure-MathMenu>` for
more details.
.. describe:: tooltip: { ... } .. describe:: tooltip: { ... }
@ -128,7 +184,8 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
The delay (in milliseconds) before the tooltop is cleared The delay (in milliseconds) before the tooltop is cleared
after the mouse moves out of the ``maction`` element. after the mouse moves out of the ``maction`` element.
.. describe:: offsetX: 10 and offsetY: 5 .. describe:: offsetX: 10
offsetY: 5
These are the offset from the mouse position (in pixels) These are the offset from the mouse position (in pixels)
where the tooltip will be placed. where the tooltip will be placed.

View File

@ -6,9 +6,11 @@ The MMLorHTML configuration options
The options below control the operation of the MMLorHTML configuration The options below control the operation of the MMLorHTML configuration
file that is run when you include ``"MMLorHTML.js"`` in the `config` file that is run when you include ``"MMLorHTML.js"`` in the `config`
array of your configuration. They are listed with their default array of your configuration, or when you use one of the combined
values. To set any of these options, include a ``MMLorHTML`` section configuration files that ends with ``_HTMLorMML``. They are listed
in your :meth:`MathJax.Hub.Config()` call. For example with their default values. To set any of these options, include a
``MMLorHTML`` section in your :meth:`MathJax.Hub.Config()` call. For
example
.. code-block:: javascript .. code-block:: javascript
@ -28,15 +30,29 @@ Note that if you use the ``MMLorHTML.js`` configuration file, you should
**not** specify an output processor in the `jax` array of your **not** specify an output processor in the `jax` array of your
configuration; `MMLorHTML` will fill that in for you. configuration; `MMLorHTML` will fill that in for you.
.. describe:: prefer: { MSIE: "MML", Firefox: "MML", Opera: "HTML", other: "HTML" } .. describe:: prefer: {
MSIE: "MML",
Firefox: "HTML",
Safari: "HTML",
Chrome: "HTML",
Opera: "HTML",
other: "HTML"
}
This lets you set the preferred renderer on a browser-by-browser This lets you set the preferred renderer on a browser-by-browser
basis. You set the browser to either ``"MML"`` or ``"HTML"`` basis. You set the browser to either ``"MML"`` or ``"HTML"``
depending on whether you want to use the `NativeMML` or `HTML-CSS` depending on whether you want to use the `NativeMML` or `HTML-CSS`
output processor. Note that although Opera does process some MathML output processor. Note that although Opera and Safari do process some MathML
natively, its support is not sufficient to handle the more natively, their support is not sufficient to handle the more
complicated output generated by MathJax, so its setting is complicated output generated by MathJax, so their settings are
``"HTML"`` by default. ``"HTML"`` by default. Although Firefox does support a large
subset of MathJax, it does not implement all the features needed by
MathJax, and so it is also set to ``"HTML"`` by default (this is
new in v2.0).
Note that users can still use the MathJax contextual menu to select
a different renderer after the default one has been chosen by
``MMLorHTML.js``.

View File

@ -0,0 +1,37 @@
.. _configure-MathEvents:
************************
The MathEvents extension
************************
The options below control the operation of the MathEvents component that
allows handles mouse and menu events attached to mathematics that is
typeset by MathJax. They are listed with their
default values. To set any of these options, include a ``MathEvents``
section in your :meth:`MathJax.Hub.Config()` call. For example
.. code-block:: javascript
MathJax.Hub.Config({
MathEvents: {
hover: 400
}
});
would set the required delay for hovering over a math element to
400 milliseconds.
.. describe:: hover: 500
This value is the time (in milliseconds) that a user must hold the
mouse still over a math element before it is considered to be
hovering over the math.
.. describe:: styles: {}
This is a list of CSS declarations for styling the zoomed
mathematics. See the definitions in ``extensions/MathEvents.js``
for details 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.

View File

@ -6,7 +6,8 @@ The MathML input processor
The options below control the operation of the MathML input processor The options below control the operation of the MathML input processor
that is run when you include ``"input/MathML"`` in the `jax` array of that is run when you include ``"input/MathML"`` in the `jax` array of
your configuration. They are listed with their default values. To your configuration or load a combined configuration file that includes
the MathML input jax. They are listed with their default values. To
set any of these options, include a ``MathML`` section in your set any of these options, include a ``MathML`` section in your
:meth:`MathJax.Hub.Config()` call. For example :meth:`MathJax.Hub.Config()` call. For example

View File

@ -34,34 +34,42 @@ would set the ``delay`` option to 600 milliseconds.
.. describe:: showRenderer: true .. describe:: showRenderer: true
This controls whether the "Math Renderer" item will be displayed in This controls whether the "Math Renderer" item will be displayed
the "Settings" submenu of the mathematics contextual menu. It in the "Math Settings" submenu of the MathJax contextual menu.
allows the user to change between the `HTML-CSS` and `NativeMML` It allows the user to change between the `HTML-CSS`, `NativeMML`,
output processors for the mathematics on the page. Set to and `SVG` output processors for the mathematics on the page. Set
``false`` to prevent this menu item from showing. to ``false`` to prevent this menu item from showing.
.. describe:: showContext: false
This controls whether the "Contextual Menu" item will be displayed
in the "Settings" submenu of the mathematics contextual menu.
It allows the user to decide whether the MathJax menu or the
browser's default contextual menu will be shown when the context
menu click occurs over mathematics typeset by MathJax. (The main
reason to allow pass-through to the browser's menu is to gain
access to the MathPlayer contextual menu when the NativeMML output
processor is used in Internet Explorer with the `MathPlayer plugin
<http://www.dessci.com/en/products/mathplayer/>`_.) Set to
``false`` to prevent this menu item from showing.
.. describe:: showFontMenu: false .. describe:: showFontMenu: false
This controls whether the "Font Preference" item will be displayed This controls whether the "Font Preference" item will be displayed
in the "Settings" submenu of the mathematics contextual menu. in the "Math Settings" submenu of the MathJax contextual menu.
This submenu lets the user select what font to use in the This submenu lets the user select what font to use in the
mathematics produced by the `HTML-CSS` output processor. Note that mathematics produced by the `HTML-CSS` output processor. Note that
changing the selection in the font menu will cause the page to changing the selection in the font menu will cause the page to
reload. Set to ``false`` to prevent this menu item from showing. reload. Set to ``false`` to prevent this menu item from showing.
.. describe:: showMathPlayer: true
This controls whether the "MathPlayer" item will be displayed in
the "Math Settings" submenu of the MathJax contextual menu. This
submenu lets the user select what events should be passed on to
the `MathPlayer plugin
<http://www.dessci.com/en/products/mathplayer/>`_, when it is
present. Mouse events can be passed on (so that clicks will be
processed by MathPlayer rather than MathJax), and emnu events can
be passed on (to allow the user access to the MathPlayer menu).
Set to ``false`` to prevent this menu item from showing.
.. describe:: showContext: false
This controls whether the "Contextual Menu" item will be displayed
in the "Math Settings" submenu of the MathJax contextual menu.
It allows the user to decide whether the MathJax menu or the
browser's default contextual menu will be shown when the context
menu click occurs over mathematics typeset by MathJax. Set to
``false`` to prevent this menu item from showing.
.. describe:: windowSettings: { ... } .. describe:: windowSettings: { ... }
These are the settings for the ``window.open()`` call that These are the settings for the ``window.open()`` call that

View File

@ -14,23 +14,28 @@ section in your :meth:`MathJax.Hub.Config()` call. For example
MathJax.Hub.Config({ MathJax.Hub.Config({
MathZoom: { MathZoom: {
delay: 600 styles: {
"#MathJax_Zoom": {
"background-color": "#0000F0"
}
}
} }
}); });
would set the ``delay`` option to 600 milliseconds. would set the background color of the Zoom box to a very light blue.
Mathematics is zoomed when the user "triggers" the zoom by an action, Mathematics is zoomed when the user "triggers" the zoom by an action,
either clicking on the mathematics, double-clicking on it, or holding either clicking on the mathematics, double-clicking on it, or holding
the mouse still over it (i.e., "hovering"). Which trigger is used is the mouse still over it (i.e., "hovering"). Which trigger is used is
set by the user via the math contextual menu (or by the author using set by the user via the math contextual menu (or by the author using
the ``menuSettings`` configuration section). the ``menuSettings`` configuration section of the `core configuration
options <configure-hub>`).
.. describe:: delay: 400 .. describe:: delay: 500
This the time (in milliseconds) that the mouse must be still over a This value is now stored as the ``hover`` parameter in the
typeset mathematical formula before the zoomed version is displayed :ref:`MathEvents <configure-MathEvents>` configuration options, and
(when the zoom trigger is set to `Hover`). will have no effect if given here.
.. describe:: styles: {} .. describe:: styles: {}

View File

@ -6,9 +6,11 @@ The NativeMML output processor
The options below control the operation of the NativeMML output The options below control the operation of the NativeMML output
processor that is run when you include ``"output/NativeMML"`` in the processor that is run when you include ``"output/NativeMML"`` in the
`jax` array of your configuration. They are listed with their default `jax` array of your configuration or load a combined configuration
values. To set any of these options, include a ``NativeMML`` section file taht includes the NativeMML output jax. They are listed with
in your :meth:`MathJax.Hub.Config()` call. For example their default values. To set any of these options, include a
``NativeMML`` section in your :meth:`MathJax.Hub.Config()` call. For
example
.. code-block:: javascript .. code-block:: javascript
@ -23,34 +25,25 @@ would set the ``scale`` option to 105 percent.
.. describe:: scale: 100 .. describe:: scale: 100
The scaling factor (as a percentage) of math with respect to the The scaling factor (as a percentage) of math with respect to the
surrounding text. Since the `NativeMML` output relies on the surrounding text. The `NativeMML` output processor tries to match
browser's native MathML support, MathJax does not control the the ex-size of the mathematics with that of the text where it is
font size used in the mathematics. You may need to set this value placed, but you may want to adjust the results using this scaling
to compensate for the size selected by the browser. The user can factor. The user can also adjust this value using the contextual
also adjust this value using the contextual menu item associated menu item associated with the typeset mathematics.
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:: showMathMath: true .. describe:: showMathMath: true
showMathMenuMSIE: true
This controls whether the MathJax contextual menu will be These values have been moved to the core configuration block, since
available on the mathematics in the page. If true, then it applies to all output jax, but they will still be honored (for
right-clicking (on the PC) or control-clicking (on the Mac) will now) if it is set here. See the :ref:`Core configuration options
produce a MathJax menu that allows you to get the source of the <configure-hub>` for more details.
mathematics in various formats, change the size of the mathematics
relative to the surrounding text, get information about
MathJax, and configure other MathJax settings.
Set this to ``false`` to disable the menu. When ``true``, the
``MathMenu`` configuration block determines the operation of the
menu. See :ref:`the MathMenu options <configure-MathMenu>` for
more details.
.. describe:: showMathMenuMSIE: true
There is a separate menu setting for MSIE since the code to handle
that is a bit delicate; if it turns out to have unexpected
consequences, you can turn it off without turning off the
menu support in other browsers.
.. describe:: styles: {} .. describe:: styles: {}

View File

@ -0,0 +1,162 @@
.. _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. Note that, because of the
dash, you need to enclose the name in quotes. 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. Note that
currently only the `TeX` font is available.
.. describe:: blacker: 10
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:: 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:: 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.

View File

@ -6,7 +6,8 @@ The TeX input processor
The options below control the operation of the TeX input processor The options below control the operation of the TeX input processor
that is run when you include ``"input/TeX"`` in the `jax` array of that is run when you include ``"input/TeX"`` in the `jax` array of
your configuration. They are listed with their default values. To your configuration or load a combined configuration file that includes
the TeX input jax. They are listed with their default values. To
set any of these options, include a ``TeX`` section in your set any of these options, include a ``TeX`` section in your
:meth:`MathJax.Hub.Config()` call. For example :meth:`MathJax.Hub.Config()` call. For example
@ -42,16 +43,65 @@ to be defined within the TeX input processor.
in a small area or a thin column of text, you might need to change in a small area or a thin column of text, you might need to change
the value to leave sufficient margin for tags. the value to leave sufficient margin for tags.
.. describe:: equationNumbers: {}
This object controls the automatic equation numbering and the
equation referencing. It contains the following values:
.. describe:: autoNumber: "none"
This controls whether equations are numbered and how. By
default it is set to ``"none"`` to be compatible with earlier
versions of MathJax where auto-numbering was not performed (so
pages will not change their appearance). You can change
this to ``"AMS"`` for equations numbered as the `AMSmath`
package would do, or ``"all"`` to get an equation number for
every displayed equation.
.. describe:: formatNumber: function (n) {return n}
A function that tells MathJax what tag to use for equation
number ``n``. This could be used to have the equations labeled
by a sequence of symbols rather than numbers, or to use section
and subsection numbers instead.
.. describe:: formatTag: function (n) {return '('+n+')'}
A function that tells MathJax how to format an equation number
for displaying as a tag for an equation. This is what appears
in the margin of a tagged or numbered equation.
.. describe:: formatID: function {return 'mjx-eqn-'+String(n).replace(/[:'"<>&]/g,"")}
A function that rells MathJax what ID to use as an anchor for
the equation (so that it can be used in URL references).
.. describe:: formatURL: function (id) {return '#'+escape(id)}
A function that takes an equation ID and returns the URL to
link to it.
.. describe:: useLabelIds: true
This controls whether element ID's use the ``\label`` name or
the equation number. When ``true``, use the label, when
``false``, use the equation number.
See the `MathJax examples page
<http://cdn.mathjax.org/mathjax/latest/test/examples.html>`_ for
some examples of equation numbering.
.. describe:: Macros: {} .. describe:: Macros: {}
This lists macros to define before the TeX input processor begins. This lists macros to define before the TeX input processor begins.
These are name:value pairs where the `name` gives the name of the TeX These are `name:value` pairs where the `name` gives the name of
macro to be defined, and `value` gives the replacement text for the the TeX macro to be defined, and `value` gives the replacement
macro. The `value` can be an array of the form `[value,n]`, where text for the macro. The `value` can be an array of the form
`value` is the replacement text and `n` is the number of parameters `[value,n]`, where `value` is the replacement text and `n` is the
for the macro. Note that since the `value` is a javascript string, number of parameters for the macro. Note that since the `value`
backslashes in the replacement text must be doubled to prevent them is a javascript string, backslashes in the replacement text must
from acting as javascript escape characters. be doubled to prevent them from acting as javascript escape
characters.
For example, For example,

View File

@ -86,11 +86,11 @@ preprocessor to include dollar signs as well as back-ticks.
special characters. The pattern is inserted into one that special characters. The pattern is inserted into one that
requires your pattern to match a complete word, so setting requires your pattern to match a complete word, so setting
``ignoreClass: "class2"`` would cause it to match an element with ``ignoreClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"``. Note that you can assign ``class="class1 class2 class3"`` but not ``class="myclass2"``.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(``|``). For instance, with ``ignoreClass: "class1|class2"`` vertical line character (``|``). For instance, with
any element assigned a class of either ``class1`` or ``class2`` ``ignoreClass: "class1|class2"`` any element assigned a class of
will be skipped. either ``class1`` or ``class2`` will be skipped.
.. describe:: processClass: "asciimath2jax_process" .. describe:: processClass: "asciimath2jax_process"
@ -103,8 +103,8 @@ preprocessor to include dollar signs as well as back-ticks.
`regexp` special characters. The pattern is inserted into one `regexp` special characters. The pattern is inserted into one
that requires your pattern to match a complete word, so setting that requires your pattern to match a complete word, so setting
``processClass: "class2"`` would cause it to match an element with ``processClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"``. Note that you can assign ``class="class1 class2 class3"`` but not ``class="myclass2"``.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(``|``). For instance, with ``processClass: "class1|class2"`` any vertical line character (``|``). For instance, with
element assigned a class of either ``class1`` or ``class2`` will ``processClass: "class1|class2"`` any element assigned a class of
have its contents processed. either ``class1`` or ``class2`` will have its contents processed.

View File

@ -19,10 +19,7 @@ behavior of MathJax. They are given with their default values.
A comma-separated list of extensions to load at startup. The A comma-separated list of extensions to load at startup. The
default directory is ``MathJax/extensions``. The ``tex2jax`` and default directory is ``MathJax/extensions``. The ``tex2jax`` and
``mml2jax`` preprocessors can be listed here, as well as a number ``mml2jax`` preprocessors can be listed here, as well as a
of TeX-specific extensions (see the :ref:`TeX and LaTeX input
<tex-and-latex-input>` section of the :ref:`Getting Started
<getting-started>` document for more details). There is also a
``FontWarnings`` extension that you can use to inform your user ``FontWarnings`` extension that you can use to inform your user
that mathematics fonts are available that they can download to that mathematics fonts are available that they can download to
improve their experience of your site. improve their experience of your site.
@ -33,7 +30,9 @@ behavior of MathJax. They are given with their default values.
starts up, e.g., to define local macros, etc., and there is a starts up, e.g., to define local macros, etc., and there is a
sample config file named ``config/local/local.js``. The default sample config file named ``config/local/local.js``. The default
directory is the `MathJax/config` directory. The ``MMLorHTML.js`` directory is the `MathJax/config` directory. The ``MMLorHTML.js``
configuration is the only other predefined configuration file. configuration is one such configuration file, and there are a
number of other pre-defined configurations (see :ref:`Using a
configuration file <config-files>` for more details).
.. describe:: styleSheets: [] .. describe:: styleSheets: []
@ -43,8 +42,9 @@ behavior of MathJax. They are given with their default values.
.. describe:: styles: {} .. describe:: styles: {}
CSS `selector: rules;` styles to be defined dynamically at startup CSS styles to be defined dynamically at startup time. These are
time. in the form `selector:rules` (see :ref:`CSS Style Objects
<css-style-objects>` for complete details).
.. describe:: preJax: null and postJax: null .. describe:: preJax: null and postJax: null
@ -149,13 +149,51 @@ behavior of MathJax. They are given with their default values.
.. describe:: elements: [] .. describe:: elements: []
This is a list of DOM element ID's that are the ones to process for This is a list of DOM element ID's that are the ones to process for
mathematics when any of the Hub typesetting calls (Typeset, Process, mathematics when any of the Hub typesetting calls (``Typeset()``, ``Process()``,
Update, etc.) are called with no element specified, and during ``Update()``, etc.) are called with no element specified, and during
MathJax's initial typesetting run when it starts up. This lets you MathJax's initial typesetting run when it starts up. This lets you
restrict the processing to particular containers rather than scanning restrict the processing to particular containers rather than scanning
the entire document for mathematics. If none are supplied, the complete the entire document for mathematics. If none are supplied, the complete
document is processed. document is processed.
.. describe:: positionToHash: true
Since typesetting usually changes the vertical dimensions of the
page, if the URL contains an anchor position, then after the page
is typeset, you may no longer be positioned at the correct
position on the page. MathJax can reposition to that location
after it completes its initial typesetting of the page. This
value controls whether MathJax will reposition the browser to the
``#hash`` location from the page URL after typesetting for the page.
.. describe:: showMathMenu: true
showMathMenuMSIE: true
These control whether to attach the MathJax contextual menu to the
expressions typeset by MathJax. Since the code for handling
MathPlayer in Internet Explorer is somewhat delicate, it is
controlled separately via ``showMathMenuMSIE``, but the latter is
now deprecated in favor of the MathJax contextual menu settings
for MathPlayer (see below).
If ``showMathMenu`` is ``true``, then right-clicking (on Windows
or Linux) or control-clicking (on Mac OS X) will produce a MathJax
menu that allows you to get the source of the mathematics in
various formats, change the size of the mathematics relative to
the surrounding text, get information about MathJax, and configure
other MathJax settings.
Set this to ``false`` to disable the menu. When ``true``, the
``MathMenu`` configuration block determines the operation of the
menu. See :ref:`the MathMenu options <configure-MathMenu>` for
more details.
These values used to be listed in the separate output jax, but
have been moved to this more central location since they are
shared by all output jax. MathJax will still honor their values
from their original positions, if they are set there.
.. describe:: menuSettings: { ... } .. describe:: menuSettings: { ... }
This block contains settings for the mathematics contextual menu This block contains settings for the mathematics contextual menu
@ -195,9 +233,19 @@ behavior of MathJax. They are given with their default values.
to ``"Browser"``, you will get the MathPlayer contextual menu to ``"Browser"``, you will get the MathPlayer contextual menu
rather than the MathJax menu. rather than the MathJax menu.
There are also settings for ``format``, ``renderer``, and ``font``, .. describe:: texHints: true
but these are maintained by MathJax and should not be set by the
page author. This controls whether the "Show Source" menu item includes
special class names that help MathJax to typeset the
mathematics that was produced by the TeX input jax. If these
are included, then you can take the output from "Show Source"
and put it into a page that uses MathJax's MathML input jax
and expect to get the same results as the original TeX.
(Without this, there may be some spacing differences.)
There are also settings for ``format``, ``renderer``, ``font``,
``mpContext``, and ``mpMouse``, but these are maintained by
MathJax and should not be set by the page author.
.. describe:: errorSettings: { ... } .. describe:: errorSettings: { ... }

View File

@ -13,16 +13,16 @@ will see that ``config/default.js`` is itself one big call to
``config/default.js`` can be included in-line to configure MathJax. ``config/default.js`` can be included in-line to configure MathJax.
The structure that you pass to :meth:`MathJax.Hub.Config()` is a The structure that you pass to :meth:`MathJax.Hub.Config()` is a
JavaScript object that includes name-value pairs giving the names of JavaScript object that includes `name:value` pairs giving the names of
parameters and their values, with pairs separated by commas. Be parameters and their values, with pairs separated by commas. Be
careful not to include a comma after the last value, however, as some careful not to include a comma after the last value, however, as some
browsers (namely Internet Explorer) will fail to process the browsers (namely Internet Explorer) will fail to process the
configuration if you do. configuration if you do.
The MathJax components, like the TeX input processor, have their own The MathJax components, like the TeX input processor, have their own
sections in the configuration object, labeled by the component name, sections in the configuration object labeled by the component name,
and using an object as its value. That object is itself and using an object as its value. That object is itself
a configuration object made up of name-value pairs that give the a configuration object made up of `name:value` pairs that give the
configuration options for the component. configuration options for the component.
For example, For example,
@ -81,6 +81,7 @@ are categorized by the component they affect.
The AsciiMath input processor options <AsciiMath> The AsciiMath input processor options <AsciiMath>
The HTML-CSS output processor options <HTML-CSS> The HTML-CSS output processor options <HTML-CSS>
The NativeMML output processor options <NativeMML> The NativeMML output processor options <NativeMML>
The SVG output processor options <SVG>
The MMLorHTML configuration options <MMLorHTML> The MMLorHTML configuration options <MMLorHTML>
.. toctree:: .. toctree::
@ -88,6 +89,7 @@ are categorized by the component they affect.
The MathMenu options <MathMenu> The MathMenu options <MathMenu>
The MathZoom options <MathZoom> The MathZoom options <MathZoom>
The MathEvents options <MathEvents>
The FontWarnings options <FontWarnings> The FontWarnings options <FontWarnings>

View File

@ -56,6 +56,21 @@ preprocessor.
the browser before MathJax has the chance to run. You can only the browser before MathJax has the chance to run. You can only
include text, not tags, as your math delimiters. include text, not tags, as your math delimiters.
.. describe:: balanceBraces: true,
This value determines whether `tex2jax` requires braces to be
balanced within math delimiters (which allows for nested dollar
signs). Set to ``false`` to get pre-v2.0 compatibility. When
``true``,
.. code-block:: latex
$y = x^2 \hbox{ when $x > 2$}$.
will be properly handled as a single expression. When ``false``,
it would be interpreted as two searpate expressions, each with
improperly balanced braces.
.. describe:: processEscapes: false .. describe:: processEscapes: false
When set to ``true``, you may use ``\$`` to represent a literal When set to ``true``, you may use ``\$`` to represent a literal
@ -116,11 +131,11 @@ preprocessor.
special characters. The pattern is inserted into one that special characters. The pattern is inserted into one that
requires your pattern to match a complete word, so setting requires your pattern to match a complete word, so setting
``ignoreClass: "class2"`` would cause it to match an element with ``ignoreClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"``. Note that you can assign ``class="class1 class2 class3"`` but not ``class="myclass2"``.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(``|``). For instance, with ``ignoreClass: "class1|class2"`` vertical line character (``|``). For instance, with
any element assigned a class of either ``class1`` or ``class2`` ``ignoreClass: "class1|class2"`` any element assigned a class of
will be skipped. either ``class1`` or ``class2`` will be skipped.
.. describe:: processClass: "tex2jax_process" .. describe:: processClass: "tex2jax_process"
@ -133,8 +148,8 @@ preprocessor.
`regexp` special characters. The pattern is inserted into one `regexp` special characters. The pattern is inserted into one
that requires your pattern to match a complete word, so setting that requires your pattern to match a complete word, so setting
``processClass: "class2"`` would cause it to match an element with ``processClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"``. Note that you can assign ``class="class1 class2 class3"`` but not ``class="myclass2"``.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(``|``). For instance, with ``processClass: "class1|class2"`` any vertical line character (``|``). For instance, with
element assigned a class of either ``class1`` or ``class2`` will ``processClass: "class1|class2"`` any element assigned a class of
have its contents processed. either ``class1`` or ``class2`` will have its contents processed.

View File

@ -32,7 +32,7 @@ the `jax` array of your MathJax configuration. For example
would specify TeX input and HTML-with-CSS output for the mathematics would specify TeX input and HTML-with-CSS output for the mathematics
in your document. in your document.
The HTML-CSS output processor produces high-quality output in all The **HTML-CSS output processor** produces high-quality output in all
major browsers, with results that are consistent across browsers and major browsers, with results that are consistent across browsers and
operating systems. This is MathJax's primary output mode. Its major operating systems. This is MathJax's primary output mode. Its major
advantage is its quality and consistency; its drawback is that it is advantage is its quality and consistency; its drawback is that it is
@ -46,7 +46,7 @@ fonts so that users don't have to have math fonts installed on their
computers; but this does introduce some printing issues in some computers; but this does introduce some printing issues in some
browsers. browsers.
The SVG output processor is new in MathJax version 2.0, and it uses The **SVG output processor** is new in MathJax version 2.0, and it uses
`Scalable Vector Graphics` to render the mathematics on the page. SVG `Scalable Vector Graphics` to render the mathematics on the page. SVG
is supported in all the major browsers and most mobile devices; note, is supported in all the major browsers and most mobile devices; note,
however, that Internet Explorer prior to IE9 does not support SVG, and however, that Internet Explorer prior to IE9 does not support SVG, and
@ -63,7 +63,7 @@ once they are typeset, and don't rescale if the window size changes
variable-width tables, that means equation numbers may not stay at the variable-width tables, that means equation numbers may not stay at the
edge of the window if it is resized. edge of the window if it is resized.
The NativeMML output processor uses the browser's internal MathML The **NativeMML output processor** uses the browser's internal MathML
support (if any) to render the mathematics. Currently, Firefox has support (if any) to render the mathematics. Currently, Firefox has
native support for MathML, and IE has the `MathPlayer plugin native support for MathML, and IE has the `MathPlayer plugin
<http://www.dessci.com/en/products/mathplayer/>`_ for rendering <http://www.dessci.com/en/products/mathplayer/>`_ for rendering
@ -179,3 +179,32 @@ possible. That can be accomplished by adding
at the top of the ``<head>`` section of your HTML documents. Note at the top of the ``<head>`` section of your HTML documents. Note
that this line must come at the beginning of the ``<head>``, before that this line must come at the beginning of the ``<head>``, before
any stylesheets, scripts, or other content are loaded. any stylesheets, scripts, or other content are loaded.
.. _html-css-extensions:
HTML-CSS Extensions
===================
The HTML-CSS output jax uses elements with width set to 100% when it
typesets displayed equations. If there are floating elements on the
left or right, this can mean that displayed mathematics isn't properly
centered, and can cause equation numbers to overlap the floating
content. To avoid this, you can specify the `handle-floats` extension
in the `extensions` array of your `HTML-CSS` configuration block.
.. code-block:: javascript
"HTML-CSS": {
extensions: ["handle-floats.js"]
}
This will use CSS that puts the displayed equations into elements that
work like tabel cells, and won't overlap the floaring content.
Because this is somewhat of a misuse of CSS, it is not used by
default, but it has proved successful in most situations, so you may
consider using it in pages that include material that floats to the
left or right of text containing displayed mathematics, especially
when equation numbers or tags are used.
See the :ref:`HTML-CSS configuration options <configure-HTML-CSS>` for
other options of the HTML-CSS output jax.

View File

@ -55,10 +55,11 @@
<span id="configure-asciimath"></span><h1>The AsciiMath input processor<a class="headerlink" href="#the-asciimath-input-processor" title="Permalink to this headline"></a></h1> <span id="configure-asciimath"></span><h1>The AsciiMath input processor<a class="headerlink" href="#the-asciimath-input-processor" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the AsciiMath input <p>The options below control the operation of the AsciiMath input
processor that is run when you include <tt class="docutils literal"><span class="pre">&quot;input/AsciiMath&quot;</span></tt> in the processor that is run when you include <tt class="docutils literal"><span class="pre">&quot;input/AsciiMath&quot;</span></tt> in the
<cite>jax</cite> array of your configuration or use a combined configuration file <cite>jax</cite> array of your configuration or load a combined configuration
that includes AsciiMath input. They are listed with their default file that includes the AsciiMath input jax. They are listed with
values. To set any of these options, include a <tt class="docutils literal"><span class="pre">AsciiMath</span></tt> section their default values. To set any of these options, include a
in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> <tt class="docutils literal"><span class="pre">AsciiMath</span></tt> section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For
example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">AsciiMath</span><span class="o">:</span> <span class="p">{</span> <span class="nx">AsciiMath</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">displaystyle</span><span class="o">:</span> <span class="kc">false</span> <span class="nx">displaystyle</span><span class="o">:</span> <span class="kc">false</span>

View File

@ -25,7 +25,7 @@
<link rel="top" title="MathJax v2.0 documentation" href="../index.html" /> <link rel="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" /> <link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="Using MathJax in popular web platforms" href="../platforms/index.html" /> <link rel="next" title="Using MathJax in popular web platforms" href="../platforms/index.html" />
<link rel="prev" title="The MathZoom extension" href="MathZoom.html" /> <link rel="prev" title="The MathEvents extension" href="MathEvents.html" />
</head> </head>
<body> <body>
@ -39,7 +39,7 @@
<a href="../platforms/index.html" title="Using MathJax in popular web platforms" <a href="../platforms/index.html" title="Using MathJax in popular web platforms"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="MathZoom.html" title="The MathZoom extension" <a href="MathEvents.html" title="The MathEvents extension"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li> <li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li> <li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
@ -218,8 +218,8 @@ The default is 1.5 seconds.</p>
<div class="sphinxsidebar"> <div class="sphinxsidebar">
<div class="sphinxsidebarwrapper"> <div class="sphinxsidebarwrapper">
<h4>Previous topic</h4> <h4>Previous topic</h4>
<p class="topless"><a href="MathZoom.html" <p class="topless"><a href="MathEvents.html"
title="previous chapter">The MathZoom extension</a></p> title="previous chapter">The MathEvents extension</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="../platforms/index.html" <p class="topless"><a href="../platforms/index.html"
title="next chapter">Using MathJax in popular web platforms</a></p> title="next chapter">Using MathJax in popular web platforms</a></p>
@ -250,7 +250,7 @@ The default is 1.5 seconds.</p>
<a href="../platforms/index.html" title="Using MathJax in popular web platforms" <a href="../platforms/index.html" title="Using MathJax in popular web platforms"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="MathZoom.html" title="The MathZoom extension" <a href="MathEvents.html" title="The MathEvents extension"
>previous</a> |</li> >previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li> <li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li> <li><a href="index.html" >Configuration Objects</a> &raquo;</li>

View File

@ -55,10 +55,12 @@
<span id="configure-html-css"></span><h1>The HTML-CSS output processor<a class="headerlink" href="#the-html-css-output-processor" title="Permalink to this headline"></a></h1> <span id="configure-html-css"></span><h1>The HTML-CSS output processor<a class="headerlink" href="#the-html-css-output-processor" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the HTML-CSS output <p>The options below control the operation of the HTML-CSS output
processor that is run when you include <tt class="docutils literal"><span class="pre">&quot;output/HTML-CSS&quot;</span></tt> in the processor that is run when you include <tt class="docutils literal"><span class="pre">&quot;output/HTML-CSS&quot;</span></tt> in the
<cite>jax</cite> array of your configuration. They are listed with their default <cite>jax</cite> array of your configuration or load a combined configuration
values. To set any of these options, include a <tt class="docutils literal"><span class="pre">&quot;HTML-CSS&quot;</span></tt> section file that includes the HTML-CSS output jax. They are listed with
in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that, because of the their default values. To set any of these options, include a
dash, you need to enclose the name in quotes. For example</p> <tt class="docutils literal"><span class="pre">&quot;HTML-CSS&quot;</span></tt> section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call.
Note that, because of the dash, you need to enclose the name in
quotes. For example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="s2">&quot;HTML-CSS&quot;</span><span class="o">:</span> <span class="p">{</span> <span class="s2">&quot;HTML-CSS&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">preferredFont</span><span class="o">:</span> <span class="s2">&quot;STIX&quot;</span> <span class="nx">preferredFont</span><span class="o">:</span> <span class="s2">&quot;STIX&quot;</span>
@ -72,7 +74,7 @@ dash, you need to enclose the name in quotes. For example</p>
<tt class="descname">scale: 100</tt></dt> <tt class="descname">scale: 100</tt></dt>
<dd><p>The scaling factor (as a percentage) of math with respect to the <dd><p>The scaling factor (as a percentage) of math with respect to the
surrounding text. The <cite>HTML-CSS</cite> output processor tries to match surrounding text. The <cite>HTML-CSS</cite> output processor tries to match
the en-size of the mathematics with that of the text where it is 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 placed, but you may want to adjust the results using this scaling
factor. The user can also adjust this value using the contextual factor. The user can also adjust this value using the contextual
menu item associated with the typeset mathematics.</p> menu item associated with the typeset mathematics.</p>
@ -145,6 +147,74 @@ will stop looking after the first font that exists on the system
carefully.</p> carefully.</p>
</dd></dl> </dd></dl>
<dl class="describe">
<dt>
<tt class="descname">mtextFontInherit: false</tt></dt>
<dd><p>This setting controls whether <tt class="docutils literal"><span class="pre">&lt;mtext&gt;</span></tt> elements will be typeset
using the math fonts or the font of the surrounding text. When
<tt class="docutils literal"><span class="pre">false</span></tt>, the font for <tt class="docutils literal"><span class="pre">mathvariant=&quot;normal&quot;</span></tt> will be used;
when <tt class="docutils literal"><span class="pre">true</span></tt>, the font will be inherited from the surrounding
paragraph.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">EqnChunk: 50</tt></dt>
<dt>
<tt class="descname">EqnChunkFactor: 1.5</tt></dt>
<dt>
<tt class="descname">EqnChunkDelay: 100</tt></dt>
<dd><p>These values control how &#8220;chunky&#8221; the display of mathematical
expressions will be; that is, how often the equations will be
updated as they are processed.</p>
<p><tt class="docutils literal"><span class="pre">EqnChunk</span></tt> 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.</p>
<p><tt class="docutils literal"><span class="pre">EqChunkFactor</span></tt> is the factor by which the <tt class="docutils literal"><span class="pre">EqnChunk</span></tt> will
grow after each chunk is displayed.</p>
<p><tt class="docutils literal"><span class="pre">EqChunkDelay</span></tt> is the time (in milliseconds) to delay between
chunks (to allow the browser to respond to other user
interaction).</p>
<p>Set <tt class="docutils literal"><span class="pre">EqnChunk</span></tt> to 1, <tt class="docutils literal"><span class="pre">EqnChunkFactor</span></tt> to 1, and
<tt class="docutils literal"><span class="pre">EqnChunkDelay</span></tt> to 10 to get the behavior from MathJax v1.1 and
below.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">linebreaks: {}</tt></dt>
<dd><p>This is an object that configures automatic linebreaking in the
HTML-CSS 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:</p>
<dl class="describe">
<dt>
<tt class="descname">automatic: false</tt></dt>
<dd><p>This controls the automatic breaking of expressions: when
<tt class="docutils literal"><span class="pre">false</span></tt>, only <tt class="docutils literal"><span class="pre">linebreak=&quot;newline&quot;</span></tt> is processed; when
<tt class="docutils literal"><span class="pre">true</span></tt>, line breaks are inserted automatically in long
expressions.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">width: &quot;container&quot;</tt></dt>
<dd><p>This controls how wide the lines of mathematics can be.</p>
<p>Use an explicit width like <tt class="docutils literal"><span class="pre">&quot;30em&quot;</span></tt> for a fixed width.
Use <tt class="docutils literal"><span class="pre">&quot;container&quot;</span></tt> to compute the size from the containing
element.
Use <tt class="docutils literal"><span class="pre">&quot;nn%</span> <span class="pre">container&quot;</span></tt> for a portion of the container.
Use <tt class="docutils literal"><span class="pre">&quot;nn%&quot;</span></tt> for a portion of the window size.</p>
<p>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.</p>
</dd></dl>
</dd></dl>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">styles: {}</tt></dt> <tt class="descname">styles: {}</tt></dt>
@ -158,17 +228,9 @@ CSS style in a JavaScript object.</p>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">showMathMenu: true</tt></dt> <tt class="descname">showMathMenu: true</tt></dt>
<dd><p>This controls whether the MathJax contextual menu will be <dd><p>This value has been moved to the core configuration block, since
available on the mathematics in the page. If true, then it applies to all output jax, but it will still be honored (for
right-clicking (on the PC) or control-clicking (on the Mac) will now) if it is set here. See the <a class="reference internal" href="hub.html#configure-hub"><em>Core configuration options</em></a> for more details.</p>
produce a MathJax menu that allows you to get the source of the
mathematics in various formats, change the size of the mathematics
relative to the surrounding text, get information about
MathJax, and configure other MathJax settings.</p>
<p>Set this to <tt class="docutils literal"><span class="pre">false</span></tt> to disable the menu. When <tt class="docutils literal"><span class="pre">true</span></tt>, the
<tt class="docutils literal"><span class="pre">MathMenu</span></tt> configuration block determines the operation of the
menu. See <a class="reference internal" href="MathMenu.html#configure-mathmenu"><em>the MathMenu options</em></a> for
more details.</p>
</dd></dl> </dd></dl>
<dl class="describe"> <dl class="describe">
@ -195,7 +257,9 @@ after the mouse moves out of the <tt class="docutils literal"><span class="pre">
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">offsetX: 10 and offsetY: 5</tt></dt> <tt class="descname">offsetX: 10</tt></dt>
<dt>
<tt class="descname">offsetY: 5</tt></dt>
<dd><p>These are the offset from the mouse position (in pixels) <dd><p>These are the offset from the mouse position (in pixels)
where the tooltip will be placed.</p> where the tooltip will be placed.</p>
</dd></dl> </dd></dl>

View File

@ -25,7 +25,7 @@
<link rel="top" title="MathJax v2.0 documentation" href="../index.html" /> <link rel="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" /> <link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MathMenu extension" href="MathMenu.html" /> <link rel="next" title="The MathMenu extension" href="MathMenu.html" />
<link rel="prev" title="The NativeMML output processor" href="NativeMML.html" /> <link rel="prev" title="The SVG output processor" href="SVG.html" />
</head> </head>
<body> <body>
@ -39,7 +39,7 @@
<a href="MathMenu.html" title="The MathMenu extension" <a href="MathMenu.html" title="The MathMenu extension"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="NativeMML.html" title="The NativeMML output processor" <a href="SVG.html" title="The SVG output processor"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li> <li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li> <li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
@ -55,9 +55,11 @@
<span id="configure-mmlorhtml"></span><h1>The MMLorHTML configuration options<a class="headerlink" href="#the-mmlorhtml-configuration-options" title="Permalink to this headline"></a></h1> <span id="configure-mmlorhtml"></span><h1>The MMLorHTML configuration options<a class="headerlink" href="#the-mmlorhtml-configuration-options" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the MMLorHTML configuration <p>The options below control the operation of the MMLorHTML configuration
file that is run when you include <tt class="docutils literal"><span class="pre">&quot;MMLorHTML.js&quot;</span></tt> in the <cite>config</cite> file that is run when you include <tt class="docutils literal"><span class="pre">&quot;MMLorHTML.js&quot;</span></tt> in the <cite>config</cite>
array of your configuration. They are listed with their default array of your configuration, or when you use one of the combined
values. To set any of these options, include a <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> section configuration files that ends with <tt class="docutils literal"><span class="pre">_HTMLorMML</span></tt>. They are listed
in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> with their default values. To set any of these options, include a
<tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For
example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">MMLorHTML</span><span class="o">:</span> <span class="p">{</span> <span class="nx">MMLorHTML</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">prefer</span><span class="o">:</span> <span class="p">{</span> <span class="nx">prefer</span><span class="o">:</span> <span class="p">{</span>
@ -75,14 +77,34 @@ browsers unchanged).</p>
configuration; <cite>MMLorHTML</cite> will fill that in for you.</p> configuration; <cite>MMLorHTML</cite> will fill that in for you.</p>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">prefer: { MSIE: &quot;MML&quot;, Firefox: &quot;MML&quot;, Opera: &quot;HTML&quot;, other: &quot;HTML&quot; }</tt></dt> <tt class="descname">prefer: {</tt></dt>
<dt>
<tt class="descname">MSIE: &quot;MML&quot;,</tt></dt>
<dt>
<tt class="descname">Firefox: &quot;HTML&quot;,</tt></dt>
<dt>
<tt class="descname">Safari: &quot;HTML&quot;,</tt></dt>
<dt>
<tt class="descname">Chrome: &quot;HTML&quot;,</tt></dt>
<dt>
<tt class="descname">Opera: &quot;HTML&quot;,</tt></dt>
<dt>
<tt class="descname">other: &quot;HTML&quot;</tt></dt>
<dt>
<tt class="descname">}</tt></dt>
<dd><p>This lets you set the preferred renderer on a browser-by-browser <dd><p>This lets you set the preferred renderer on a browser-by-browser
basis. You set the browser to either <tt class="docutils literal"><span class="pre">&quot;MML&quot;</span></tt> or <tt class="docutils literal"><span class="pre">&quot;HTML&quot;</span></tt> basis. You set the browser to either <tt class="docutils literal"><span class="pre">&quot;MML&quot;</span></tt> or <tt class="docutils literal"><span class="pre">&quot;HTML&quot;</span></tt>
depending on whether you want to use the <cite>NativeMML</cite> or <cite>HTML-CSS</cite> depending on whether you want to use the <cite>NativeMML</cite> or <cite>HTML-CSS</cite>
output processor. Note that although Opera does process some MathML output processor. Note that although Opera and Safari do process some MathML
natively, its support is not sufficient to handle the more natively, their support is not sufficient to handle the more
complicated output generated by MathJax, so its setting is complicated output generated by MathJax, so their settings are
<tt class="docutils literal"><span class="pre">&quot;HTML&quot;</span></tt> by default.</p> <tt class="docutils literal"><span class="pre">&quot;HTML&quot;</span></tt> by default. Although Firefox does support a large
subset of MathJax, it does not implement all the features needed by
MathJax, and so it is also set to <tt class="docutils literal"><span class="pre">&quot;HTML&quot;</span></tt> by default (this is
new in v2.0).</p>
<p>Note that users can still use the MathJax contextual menu to select
a different renderer after the default one has been chosen by
<tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt>.</p>
</dd></dl> </dd></dl>
</div> </div>
@ -94,8 +116,8 @@ complicated output generated by MathJax, so its setting is
<div class="sphinxsidebar"> <div class="sphinxsidebar">
<div class="sphinxsidebarwrapper"> <div class="sphinxsidebarwrapper">
<h4>Previous topic</h4> <h4>Previous topic</h4>
<p class="topless"><a href="NativeMML.html" <p class="topless"><a href="SVG.html"
title="previous chapter">The NativeMML output processor</a></p> title="previous chapter">The SVG output processor</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="MathMenu.html" <p class="topless"><a href="MathMenu.html"
title="next chapter">The MathMenu extension</a></p> title="next chapter">The MathMenu extension</a></p>
@ -126,7 +148,7 @@ complicated output generated by MathJax, so its setting is
<a href="MathMenu.html" title="The MathMenu extension" <a href="MathMenu.html" title="The MathMenu extension"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="NativeMML.html" title="The NativeMML output processor" <a href="SVG.html" title="The SVG output processor"
>previous</a> |</li> >previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li> <li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li> <li><a href="index.html" >Configuration Objects</a> &raquo;</li>

View File

@ -0,0 +1,141 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathEvents extension &mdash; MathJax v2.0 documentation</title>
<link rel="stylesheet" href="../_static/mj.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The FontWarnings extension" href="FontWarnings.html" />
<link rel="prev" title="The MathZoom extension" href="MathZoom.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="FontWarnings.html" title="The FontWarnings extension"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="MathZoom.html" title="The MathZoom extension"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="the-mathevents-extension">
<span id="configure-mathevents"></span><h1>The MathEvents extension<a class="headerlink" href="#the-mathevents-extension" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the MathEvents component that
allows handles mouse and menu events attached to mathematics that is
typeset by MathJax. They are listed with their
default values. To set any of these options, include a <tt class="docutils literal"><span class="pre">MathEvents</span></tt>
section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">MathEvents</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">hover</span><span class="o">:</span> <span class="mi">400</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>would set the required delay for hovering over a math element to
400 milliseconds.</p>
<dl class="describe">
<dt>
<tt class="descname">hover: 500</tt></dt>
<dd><p>This value is the time (in milliseconds) that a user must hold the
mouse still over a math element before it is considered to be
hovering over the math.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">styles: {}</tt></dt>
<dd><p>This is a list of CSS declarations for styling the zoomed
mathematics. See the definitions in <tt class="docutils literal"><span class="pre">extensions/MathEvents.js</span></tt>
for details of what are defined by default. See <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS Style
Objects</em></a> for details on how to specify CSS
style in a JavaScript object.</p>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="MathZoom.html"
title="previous chapter">The MathZoom extension</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="FontWarnings.html"
title="next chapter">The FontWarnings extension</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="FontWarnings.html" title="The FontWarnings extension"
>next</a> |</li>
<li class="right" >
<a href="MathZoom.html" title="The MathZoom extension"
>previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>

View File

@ -55,7 +55,8 @@
<span id="configure-mathml"></span><h1>The MathML input processor<a class="headerlink" href="#the-mathml-input-processor" title="Permalink to this headline"></a></h1> <span id="configure-mathml"></span><h1>The MathML input processor<a class="headerlink" href="#the-mathml-input-processor" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the MathML input processor <p>The options below control the operation of the MathML input processor
that is run when you include <tt class="docutils literal"><span class="pre">&quot;input/MathML&quot;</span></tt> in the <cite>jax</cite> array of that is run when you include <tt class="docutils literal"><span class="pre">&quot;input/MathML&quot;</span></tt> in the <cite>jax</cite> array of
your configuration. They are listed with their default values. To your configuration or load a combined configuration file that includes
the MathML input jax. They are listed with their default values. To
set any of these options, include a <tt class="docutils literal"><span class="pre">MathML</span></tt> section in your set any of these options, include a <tt class="docutils literal"><span class="pre">MathML</span></tt> section in your
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>

View File

@ -85,38 +85,48 @@ selects that item, the browser opens a new window with this URL.</p>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">showRenderer: true</tt></dt> <tt class="descname">showRenderer: true</tt></dt>
<dd><p>This controls whether the &#8220;Math Renderer&#8221; item will be displayed in <dd><p>This controls whether the &#8220;Math Renderer&#8221; item will be displayed
the &#8220;Settings&#8221; submenu of the mathematics contextual menu. It in the &#8220;Math Settings&#8221; submenu of the MathJax contextual menu.
allows the user to change between the <cite>HTML-CSS</cite> and <cite>NativeMML</cite> It allows the user to change between the <cite>HTML-CSS</cite>, <cite>NativeMML</cite>,
output processors for the mathematics on the page. Set to and <cite>SVG</cite> output processors for the mathematics on the page. Set
<tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p> to <tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">showContext: false</tt></dt>
<dd><p>This controls whether the &#8220;Contextual Menu&#8221; item will be displayed
in the &#8220;Settings&#8221; submenu of the mathematics contextual menu.
It allows the user to decide whether the MathJax menu or the
browser&#8217;s default contextual menu will be shown when the context
menu click occurs over mathematics typeset by MathJax. (The main
reason to allow pass-through to the browser&#8217;s menu is to gain
access to the MathPlayer contextual menu when the NativeMML output
processor is used in Internet Explorer with the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a>.) Set to
<tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p>
</dd></dl> </dd></dl>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">showFontMenu: false</tt></dt> <tt class="descname">showFontMenu: false</tt></dt>
<dd><p>This controls whether the &#8220;Font Preference&#8221; item will be displayed <dd><p>This controls whether the &#8220;Font Preference&#8221; item will be displayed
in the &#8220;Settings&#8221; submenu of the mathematics contextual menu. in the &#8220;Math Settings&#8221; submenu of the MathJax contextual menu.
This submenu lets the user select what font to use in the This submenu lets the user select what font to use in the
mathematics produced by the <cite>HTML-CSS</cite> output processor. Note that mathematics produced by the <cite>HTML-CSS</cite> output processor. Note that
changing the selection in the font menu will cause the page to changing the selection in the font menu will cause the page to
reload. Set to <tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p> reload. Set to <tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p>
</dd></dl> </dd></dl>
<dl class="describe">
<dt>
<tt class="descname">showMathPlayer: true</tt></dt>
<dd><p>This controls whether the &#8220;MathPlayer&#8221; item will be displayed in
the &#8220;Math Settings&#8221; submenu of the MathJax contextual menu. This
submenu lets the user select what events should be passed on to
the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a>, when it is
present. Mouse events can be passed on (so that clicks will be
processed by MathPlayer rather than MathJax), and emnu events can
be passed on (to allow the user access to the MathPlayer menu).
Set to <tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">showContext: false</tt></dt>
<dd><p>This controls whether the &#8220;Contextual Menu&#8221; item will be displayed
in the &#8220;Math Settings&#8221; submenu of the MathJax contextual menu.
It allows the user to decide whether the MathJax menu or the
browser&#8217;s default contextual menu will be shown when the context
menu click occurs over mathematics typeset by MathJax. Set to
<tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p>
</dd></dl>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">windowSettings: { ... }</tt></dt> <tt class="descname">windowSettings: { ... }</tt></dt>

View File

@ -24,7 +24,7 @@
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>--> <!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v2.0 documentation" href="../index.html" /> <link rel="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" /> <link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The FontWarnings extension" href="FontWarnings.html" /> <link rel="next" title="The MathEvents extension" href="MathEvents.html" />
<link rel="prev" title="The MathMenu extension" href="MathMenu.html" /> <link rel="prev" title="The MathMenu extension" href="MathMenu.html" />
</head> </head>
<body> <body>
@ -36,7 +36,7 @@
<a href="../genindex.html" title="General Index" <a href="../genindex.html" title="General Index"
accesskey="I">index</a></li> accesskey="I">index</a></li>
<li class="right" > <li class="right" >
<a href="FontWarnings.html" title="The FontWarnings extension" <a href="MathEvents.html" title="The MathEvents extension"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="MathMenu.html" title="The MathMenu extension" <a href="MathMenu.html" title="The MathMenu extension"
@ -60,23 +60,28 @@ default values. To set any of these options, include a <tt class="docutils lite
section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">MathZoom</span><span class="o">:</span> <span class="p">{</span> <span class="nx">MathZoom</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">delay</span><span class="o">:</span> <span class="mi">600</span> <span class="nx">styles</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;#MathJax_Zoom&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;background-color&quot;</span><span class="o">:</span> <span class="s2">&quot;#0000F0&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span> <span class="p">}</span>
<span class="p">});</span> <span class="p">});</span>
</pre></div> </pre></div>
</div> </div>
<p>would set the <tt class="docutils literal"><span class="pre">delay</span></tt> option to 600 milliseconds.</p> <p>would set the background color of the Zoom box to a very light blue.</p>
<p>Mathematics is zoomed when the user &#8220;triggers&#8221; the zoom by an action, <p>Mathematics is zoomed when the user &#8220;triggers&#8221; the zoom by an action,
either clicking on the mathematics, double-clicking on it, or holding either clicking on the mathematics, double-clicking on it, or holding
the mouse still over it (i.e., &#8220;hovering&#8221;). Which trigger is used is the mouse still over it (i.e., &#8220;hovering&#8221;). Which trigger is used is
set by the user via the math contextual menu (or by the author using set by the user via the math contextual menu (or by the author using
the <tt class="docutils literal"><span class="pre">menuSettings</span></tt> configuration section).</p> the <tt class="docutils literal"><span class="pre">menuSettings</span></tt> configuration section of the <cite>core configuration
options &lt;configure-hub&gt;</cite>).</p>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">delay: 400</tt></dt> <tt class="descname">delay: 500</tt></dt>
<dd><p>This the time (in milliseconds) that the mouse must be still over a <dd><p>This value is now stored as the <tt class="docutils literal"><span class="pre">hover</span></tt> parameter in the
typeset mathematical formula before the zoomed version is displayed <a class="reference internal" href="MathEvents.html#configure-mathevents"><em>MathEvents</em></a> configuration options, and
(when the zoom trigger is set to <cite>Hover</cite>).</p> will have no effect if given here.</p>
</dd></dl> </dd></dl>
<dl class="describe"> <dl class="describe">
@ -101,8 +106,8 @@ style in a JavaScript object.</p>
<p class="topless"><a href="MathMenu.html" <p class="topless"><a href="MathMenu.html"
title="previous chapter">The MathMenu extension</a></p> title="previous chapter">The MathMenu extension</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="FontWarnings.html" <p class="topless"><a href="MathEvents.html"
title="next chapter">The FontWarnings extension</a></p> title="next chapter">The MathEvents extension</a></p>
<div id="searchbox" style="display: none"> <div id="searchbox" style="display: none">
<h3>Quick search</h3> <h3>Quick search</h3>
<form class="search" action="../search.html" method="get"> <form class="search" action="../search.html" method="get">
@ -127,7 +132,7 @@ style in a JavaScript object.</p>
<a href="../genindex.html" title="General Index" <a href="../genindex.html" title="General Index"
>index</a></li> >index</a></li>
<li class="right" > <li class="right" >
<a href="FontWarnings.html" title="The FontWarnings extension" <a href="MathEvents.html" title="The MathEvents extension"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="MathMenu.html" title="The MathMenu extension" <a href="MathMenu.html" title="The MathMenu extension"

View File

@ -24,7 +24,7 @@
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>--> <!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v2.0 documentation" href="../index.html" /> <link rel="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" /> <link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MMLorHTML configuration options" href="MMLorHTML.html" /> <link rel="next" title="The SVG output processor" href="SVG.html" />
<link rel="prev" title="The HTML-CSS output processor" href="HTML-CSS.html" /> <link rel="prev" title="The HTML-CSS output processor" href="HTML-CSS.html" />
</head> </head>
<body> <body>
@ -36,7 +36,7 @@
<a href="../genindex.html" title="General Index" <a href="../genindex.html" title="General Index"
accesskey="I">index</a></li> accesskey="I">index</a></li>
<li class="right" > <li class="right" >
<a href="MMLorHTML.html" title="The MMLorHTML configuration options" <a href="SVG.html" title="The SVG output processor"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="HTML-CSS.html" title="The HTML-CSS output processor" <a href="HTML-CSS.html" title="The HTML-CSS output processor"
@ -55,9 +55,11 @@
<span id="configure-nativemml"></span><h1>The NativeMML output processor<a class="headerlink" href="#the-nativemml-output-processor" title="Permalink to this headline"></a></h1> <span id="configure-nativemml"></span><h1>The NativeMML output processor<a class="headerlink" href="#the-nativemml-output-processor" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the NativeMML output <p>The options below control the operation of the NativeMML output
processor that is run when you include <tt class="docutils literal"><span class="pre">&quot;output/NativeMML&quot;</span></tt> in the processor that is run when you include <tt class="docutils literal"><span class="pre">&quot;output/NativeMML&quot;</span></tt> in the
<cite>jax</cite> array of your configuration. They are listed with their default <cite>jax</cite> array of your configuration or load a combined configuration
values. To set any of these options, include a <tt class="docutils literal"><span class="pre">NativeMML</span></tt> section file taht includes the NativeMML output jax. They are listed with
in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> their default values. To set any of these options, include a
<tt class="docutils literal"><span class="pre">NativeMML</span></tt> section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For
example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">NativeMML</span><span class="o">:</span> <span class="p">{</span> <span class="nx">NativeMML</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">scale</span><span class="o">:</span> <span class="mi">105</span> <span class="nx">scale</span><span class="o">:</span> <span class="mi">105</span>
@ -70,37 +72,29 @@ in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.H
<dt> <dt>
<tt class="descname">scale: 100</tt></dt> <tt class="descname">scale: 100</tt></dt>
<dd><p>The scaling factor (as a percentage) of math with respect to the <dd><p>The scaling factor (as a percentage) of math with respect to the
surrounding text. Since the <cite>NativeMML</cite> output relies on the surrounding text. The <cite>NativeMML</cite> output processor tries to match
browser&#8217;s native MathML support, MathJax does not control the the ex-size of the mathematics with that of the text where it is
font size used in the mathematics. You may need to set this value placed, but you may want to adjust the results using this scaling
to compensate for the size selected by the browser. The user can factor. The user can also adjust this value using the contextual
also adjust this value using the contextual menu item associated menu item associated with the typeset mathematics.</p>
with the typeset mathematics.</p> </dd></dl>
<dl class="describe">
<dt>
<tt class="descname">minScaleAdjust: 50</tt></dt>
<dd><p>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.</p>
</dd></dl> </dd></dl>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">showMathMath: true</tt></dt> <tt class="descname">showMathMath: true</tt></dt>
<dd><p>This controls whether the MathJax contextual menu will be
available on the mathematics in the page. If true, then
right-clicking (on the PC) or control-clicking (on the Mac) will
produce a MathJax menu that allows you to get the source of the
mathematics in various formats, change the size of the mathematics
relative to the surrounding text, get information about
MathJax, and configure other MathJax settings.</p>
<p>Set this to <tt class="docutils literal"><span class="pre">false</span></tt> to disable the menu. When <tt class="docutils literal"><span class="pre">true</span></tt>, the
<tt class="docutils literal"><span class="pre">MathMenu</span></tt> configuration block determines the operation of the
menu. See <a class="reference internal" href="MathMenu.html#configure-mathmenu"><em>the MathMenu options</em></a> for
more details.</p>
</dd></dl>
<dl class="describe">
<dt> <dt>
<tt class="descname">showMathMenuMSIE: true</tt></dt> <tt class="descname">showMathMenuMSIE: true</tt></dt>
<dd><p>There is a separate menu setting for MSIE since the code to handle <dd><p>These values have been moved to the core configuration block, since
that is a bit delicate; if it turns out to have unexpected it applies to all output jax, but they will still be honored (for
consequences, you can turn it off without turning off the now) if it is set here. See the <a class="reference internal" href="hub.html#configure-hub"><em>Core configuration options</em></a> for more details.</p>
menu support in other browsers.</p>
</dd></dl> </dd></dl>
<dl class="describe"> <dl class="describe">
@ -125,8 +119,8 @@ CSS style in a JavaScript object.</p>
<p class="topless"><a href="HTML-CSS.html" <p class="topless"><a href="HTML-CSS.html"
title="previous chapter">The HTML-CSS output processor</a></p> title="previous chapter">The HTML-CSS output processor</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="MMLorHTML.html" <p class="topless"><a href="SVG.html"
title="next chapter">The MMLorHTML configuration options</a></p> title="next chapter">The SVG output processor</a></p>
<div id="searchbox" style="display: none"> <div id="searchbox" style="display: none">
<h3>Quick search</h3> <h3>Quick search</h3>
<form class="search" action="../search.html" method="get"> <form class="search" action="../search.html" method="get">
@ -151,7 +145,7 @@ CSS style in a JavaScript object.</p>
<a href="../genindex.html" title="General Index" <a href="../genindex.html" title="General Index"
>index</a></li> >index</a></li>
<li class="right" > <li class="right" >
<a href="MMLorHTML.html" title="The MMLorHTML configuration options" <a href="SVG.html" title="The SVG output processor"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="HTML-CSS.html" title="The HTML-CSS output processor" <a href="HTML-CSS.html" title="The HTML-CSS output processor"

291
docs/html/options/SVG.html Normal file
View File

@ -0,0 +1,291 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The SVG output processor &mdash; MathJax v2.0 documentation</title>
<link rel="stylesheet" href="../_static/mj.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MMLorHTML configuration options" href="MMLorHTML.html" />
<link rel="prev" title="The NativeMML output processor" href="NativeMML.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="MMLorHTML.html" title="The MMLorHTML configuration options"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="NativeMML.html" title="The NativeMML output processor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="the-svg-output-processor">
<span id="configure-svg"></span><h1>The SVG output processor<a class="headerlink" href="#the-svg-output-processor" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the SVG output
processor that is run when you include <tt class="docutils literal"><span class="pre">&quot;output/SVG&quot;</span></tt> in the
<cite>jax</cite> 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 <tt class="docutils literal"><span class="pre">SVG</span></tt> section
in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that, because of the
dash, you need to enclose the name in quotes. For example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="s2">&quot;SVG&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">scale</span><span class="o">:</span> <span class="mi">120</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>would set the <tt class="docutils literal"><span class="pre">scale</span></tt> option to 120%.</p>
<dl class="describe">
<dt>
<tt class="descname">scale: 100</tt></dt>
<dd><p>The scaling factor (as a percentage) of math with respect to the
surrounding text. The <cite>SVG</cite> 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.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">minScaleAdjust: 50</tt></dt>
<dd><p>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.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">font: &quot;TeX&quot;</tt></dt>
<dd><p>This is the font to use for rendering the mathematics. Note that
currently only the <cite>TeX</cite> font is available.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">blacker: 10</tt></dt>
<dd><p>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.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">undefinedFamily: &quot;STIXGeneral, 'Arial Unicode MS', serif&quot;</tt></dt>
<dd><p>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&#8217;t
contain the needed character), so order these carefully.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">mtextFontInherit: false</tt></dt>
<dd><p>This setting controls whether <tt class="docutils literal"><span class="pre">&lt;mtext&gt;</span></tt> elements will be typeset
using the math fonts or the font of the surrounding text. When
<tt class="docutils literal"><span class="pre">false</span></tt>, the font for <tt class="docutils literal"><span class="pre">mathvariant=&quot;normal&quot;</span></tt> will be used;
when <tt class="docutils literal"><span class="pre">true</span></tt>, the font will be inherited from the surrounding
paragraph.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">addMMLclasses: false</tt></dt>
<dd><p>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 <cite>HTML-CSS</cite> 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.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">EqnChunk: 50</tt></dt>
<dt>
<tt class="descname">EqnChunkFactor: 1.5</tt></dt>
<dt>
<tt class="descname">EqnChunkDelay: 100</tt></dt>
<dd><p>These values control how &#8220;chunky&#8221; the display of mathematical
expressions will be; that is, how often the equations will be
updated as they are processed.</p>
<p><tt class="docutils literal"><span class="pre">EqnChunk</span></tt> 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.</p>
<p><tt class="docutils literal"><span class="pre">EqChunkFactor</span></tt> is the factor by which the <tt class="docutils literal"><span class="pre">EqnChunk</span></tt> will
grow after each chunk is displayed.</p>
<p><tt class="docutils literal"><span class="pre">EqChunkDelay</span></tt> is the time (in milliseconds) to delay between
chunks (to allow the browser to respond to other user
interaction).</p>
<p>Set <tt class="docutils literal"><span class="pre">EqnChunk</span></tt> to 1, <tt class="docutils literal"><span class="pre">EqnChunkFactor</span></tt> to 1, and
<tt class="docutils literal"><span class="pre">EqnChunkDelay</span></tt> to 10 to get the behavior from MathJax v1.1 and
below.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">linebreaks: {}</tt></dt>
<dd><p>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:</p>
<dl class="describe">
<dt>
<tt class="descname">automatic: false</tt></dt>
<dd><p>This controls the automatic breaking of expressions: when
<tt class="docutils literal"><span class="pre">false</span></tt>, only <tt class="docutils literal"><span class="pre">linebreak=&quot;newline&quot;</span></tt> is processed; when
<tt class="docutils literal"><span class="pre">true</span></tt>, line breaks are inserted automatically in long
expressions.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">width: &quot;container&quot;</tt></dt>
<dd><p>This controls how wide the lines of mathematics can be.</p>
<p>Use an explicit width like <tt class="docutils literal"><span class="pre">&quot;30em&quot;</span></tt> for a fixed width.
Use <tt class="docutils literal"><span class="pre">&quot;container&quot;</span></tt> to compute the size from the containing
element.
Use <tt class="docutils literal"><span class="pre">&quot;nn%</span> <span class="pre">container&quot;</span></tt> for a portion of the container.
Use <tt class="docutils literal"><span class="pre">&quot;nn%&quot;</span></tt> for a portion of the window size.</p>
<p>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.</p>
</dd></dl>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">styles: {}</tt></dt>
<dd><p>This is a list of CSS declarations for styling the SVG output.
See the definitions in <tt class="docutils literal"><span class="pre">jax/output/SVG/config.js</span></tt> for some
examples of what are defined by default. See <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS Style
Objects</em></a> for details on how to specify CSS
style in a JavaScript object.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">tooltip: { ... }</tt></dt>
<dd><p>This sets the configuration options for <tt class="docutils literal"><span class="pre">&lt;maction&gt;</span></tt> elements
with <tt class="docutils literal"><span class="pre">actiontype=&quot;tooltip&quot;</span></tt>. (See also the <tt class="docutils literal"><span class="pre">#MathJax_Tooltip</span></tt>
style setting in <tt class="docutils literal"><span class="pre">jax/output/SVG/config.js</span></tt>, which can be
overridden using the <tt class="docutils literal"><span class="pre">styles</span></tt> option above.)</p>
<p>The <tt class="docutils literal"><span class="pre">tooltip</span></tt> section can contain the following options:</p>
<dl class="describe">
<dt>
<tt class="descname">delayPost: 600</tt></dt>
<dd><p>The delay (in milliseconds) before the tooltip is posted after
the mouse is moved over the <tt class="docutils literal"><span class="pre">maction</span></tt> element.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">delayClear: 600</tt></dt>
<dd><p>The delay (in milliseconds) before the tooltop is cleared
after the mouse moves out of the <tt class="docutils literal"><span class="pre">maction</span></tt> element.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">offsetX: 10</tt></dt>
<dt>
<tt class="descname">offsetY: 5</tt></dt>
<dd><p>These are the offset from the mouse position (in pixels)
where the tooltip will be placed.</p>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="NativeMML.html"
title="previous chapter">The NativeMML output processor</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="MMLorHTML.html"
title="next chapter">The MMLorHTML configuration options</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="MMLorHTML.html" title="The MMLorHTML configuration options"
>next</a> |</li>
<li class="right" >
<a href="NativeMML.html" title="The NativeMML output processor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>

View File

@ -55,7 +55,8 @@
<span id="configure-tex"></span><h1>The TeX input processor<a class="headerlink" href="#the-tex-input-processor" title="Permalink to this headline"></a></h1> <span id="configure-tex"></span><h1>The TeX input processor<a class="headerlink" href="#the-tex-input-processor" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the TeX input processor <p>The options below control the operation of the TeX input processor
that is run when you include <tt class="docutils literal"><span class="pre">&quot;input/TeX&quot;</span></tt> in the <cite>jax</cite> array of that is run when you include <tt class="docutils literal"><span class="pre">&quot;input/TeX&quot;</span></tt> in the <cite>jax</cite> array of
your configuration. They are listed with their default values. To your configuration or load a combined configuration file that includes
the TeX input jax. They are listed with their default values. To
set any of these options, include a <tt class="docutils literal"><span class="pre">TeX</span></tt> section in your set any of these options, include a <tt class="docutils literal"><span class="pre">TeX</span></tt> section in your
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
@ -94,17 +95,78 @@ in a small area or a thin column of text, you might need to change
the value to leave sufficient margin for tags.</p> the value to leave sufficient margin for tags.</p>
</dd></dl> </dd></dl>
<dl class="describe">
<dt>
<tt class="descname">equationNumbers: {}</tt></dt>
<dd><p>This object controls the automatic equation numbering and the
equation referencing. It contains the following values:</p>
<dl class="describe">
<dt>
<tt class="descname">autoNumber: &quot;none&quot;</tt></dt>
<dd><p>This controls whether equations are numbered and how. By
default it is set to <tt class="docutils literal"><span class="pre">&quot;none&quot;</span></tt> to be compatible with earlier
versions of MathJax where auto-numbering was not performed (so
pages will not change their appearance). You can change
this to <tt class="docutils literal"><span class="pre">&quot;AMS&quot;</span></tt> for equations numbered as the <cite>AMSmath</cite>
package would do, or <tt class="docutils literal"><span class="pre">&quot;all&quot;</span></tt> to get an equation number for
every displayed equation.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">formatNumber: function (n) {return n}</tt></dt>
<dd><p>A function that tells MathJax what tag to use for equation
number <tt class="docutils literal"><span class="pre">n</span></tt>. This could be used to have the equations labeled
by a sequence of symbols rather than numbers, or to use section
and subsection numbers instead.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">formatTag: function (n) {return '('+n+')'}</tt></dt>
<dd><p>A function that tells MathJax how to format an equation number
for displaying as a tag for an equation. This is what appears
in the margin of a tagged or numbered equation.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">formatID: function {return 'mjx-eqn-'+String(n).replace(/[:'&quot;&lt;&gt;&amp;]/g,&quot;&quot;)}</tt></dt>
<dd><p>A function that rells MathJax what ID to use as an anchor for
the equation (so that it can be used in URL references).</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">formatURL: function (id) {return '#'+escape(id)}</tt></dt>
<dd><p>A function that takes an equation ID and returns the URL to
link to it.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">useLabelIds: true</tt></dt>
<dd><p>This controls whether element ID&#8217;s use the <tt class="docutils literal"><span class="pre">\label</span></tt> name or
the equation number. When <tt class="docutils literal"><span class="pre">true</span></tt>, use the label, when
<tt class="docutils literal"><span class="pre">false</span></tt>, use the equation number.</p>
</dd></dl>
<p>See the <a class="reference external" href="http://cdn.mathjax.org/mathjax/latest/test/examples.html">MathJax examples page</a> for
some examples of equation numbering.</p>
</dd></dl>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">Macros: {}</tt></dt> <tt class="descname">Macros: {}</tt></dt>
<dd><p>This lists macros to define before the TeX input processor begins. <dd><p>This lists macros to define before the TeX input processor begins.
These are name:value pairs where the <cite>name</cite> gives the name of the TeX These are <cite>name:value</cite> pairs where the <cite>name</cite> gives the name of
macro to be defined, and <cite>value</cite> gives the replacement text for the the TeX macro to be defined, and <cite>value</cite> gives the replacement
macro. The <cite>value</cite> can be an array of the form <cite>[value,n]</cite>, where text for the macro. The <cite>value</cite> can be an array of the form
<cite>value</cite> is the replacement text and <cite>n</cite> is the number of parameters <cite>[value,n]</cite>, where <cite>value</cite> is the replacement text and <cite>n</cite> is the
for the macro. Note that since the <cite>value</cite> is a javascript string, number of parameters for the macro. Note that since the <cite>value</cite>
backslashes in the replacement text must be doubled to prevent them is a javascript string, backslashes in the replacement text must
from acting as javascript escape characters.</p> be doubled to prevent them from acting as javascript escape
characters.</p>
<p>For example,</p> <p>For example,</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">RR</span><span class="o">:</span> <span class="s1">&#39;{\\bf R}&#39;</span><span class="p">,</span> <span class="nx">RR</span><span class="o">:</span> <span class="s1">&#39;{\\bf R}&#39;</span><span class="p">,</span>

View File

@ -131,11 +131,11 @@ expression, and so you need to be sure to quote any <cite>regexp</cite>
special characters. The pattern is inserted into one that special characters. The pattern is inserted into one that
requires your pattern to match a complete word, so setting requires your pattern to match a complete word, so setting
<tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with <tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with
<tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt>. Note that you can assign <tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt> but not <tt class="docutils literal"><span class="pre">class=&quot;myclass2&quot;</span></tt>.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with <tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> vertical line character (<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with
any element assigned a class of either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> <tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> any element assigned a class of
will be skipped.</p> either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> will be skipped.</p>
</dd></dl> </dd></dl>
<dl class="describe"> <dl class="describe">
@ -150,11 +150,11 @@ regular expression, and so you need to be sure to quote any
<cite>regexp</cite> special characters. The pattern is inserted into one <cite>regexp</cite> special characters. The pattern is inserted into one
that requires your pattern to match a complete word, so setting that requires your pattern to match a complete word, so setting
<tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with <tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with
<tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt>. Note that you can assign <tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt> but not <tt class="docutils literal"><span class="pre">class=&quot;myclass2&quot;</span></tt>.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with <tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> any vertical line character (<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with
element assigned a class of either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> will <tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> any element assigned a class of
have its contents processed.</p> either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> will have its contents processed.</p>
</dd></dl> </dd></dl>
</div> </div>

View File

@ -70,8 +70,7 @@ directory.</p>
<tt class="descname">extensions: []</tt></dt> <tt class="descname">extensions: []</tt></dt>
<dd><p>A comma-separated list of extensions to load at startup. The <dd><p>A comma-separated list of extensions to load at startup. The
default directory is <tt class="docutils literal"><span class="pre">MathJax/extensions</span></tt>. The <tt class="docutils literal"><span class="pre">tex2jax</span></tt> and default directory is <tt class="docutils literal"><span class="pre">MathJax/extensions</span></tt>. The <tt class="docutils literal"><span class="pre">tex2jax</span></tt> and
<tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessors can be listed here, as well as a number <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessors can be listed here, as well as a
of TeX-specific extensions (see the <a class="reference internal" href="../start.html#tex-and-latex-input"><em>TeX and LaTeX input</em></a> section of the <a class="reference internal" href="../start.html#getting-started"><em>Getting Started</em></a> document for more details). There is also a
<tt class="docutils literal"><span class="pre">FontWarnings</span></tt> extension that you can use to inform your user <tt class="docutils literal"><span class="pre">FontWarnings</span></tt> extension that you can use to inform your user
that mathematics fonts are available that they can download to that mathematics fonts are available that they can download to
improve their experience of your site.</p> improve their experience of your site.</p>
@ -84,7 +83,9 @@ improve their experience of your site.</p>
starts up, e.g., to define local macros, etc., and there is a starts up, e.g., to define local macros, etc., and there is a
sample config file named <tt class="docutils literal"><span class="pre">config/local/local.js</span></tt>. The default sample config file named <tt class="docutils literal"><span class="pre">config/local/local.js</span></tt>. The default
directory is the <cite>MathJax/config</cite> directory. The <tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt> directory is the <cite>MathJax/config</cite> directory. The <tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt>
configuration is the only other predefined configuration file.</p> configuration is one such configuration file, and there are a
number of other pre-defined configurations (see <a class="reference internal" href="../configuration.html#config-files"><em>Using a
configuration file</em></a> for more details).</p>
</dd></dl> </dd></dl>
<dl class="describe"> <dl class="describe">
@ -98,8 +99,8 @@ directory.</p>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">styles: {}</tt></dt> <tt class="descname">styles: {}</tt></dt>
<dd><p>CSS <cite>selector: rules;</cite> styles to be defined dynamically at startup <dd><p>CSS styles to be defined dynamically at startup time. These are
time.</p> in the form <cite>selector:rules</cite> (see <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS Style Objects</em></a> for complete details).</p>
</dd></dl> </dd></dl>
<dl class="describe"> <dl class="describe">
@ -213,14 +214,53 @@ yourself by hand, set this value to <tt class="docutils literal"><span class="pr
<dt> <dt>
<tt class="descname">elements: []</tt></dt> <tt class="descname">elements: []</tt></dt>
<dd><p>This is a list of DOM element ID&#8217;s that are the ones to process for <dd><p>This is a list of DOM element ID&#8217;s that are the ones to process for
mathematics when any of the Hub typesetting calls (Typeset, Process, mathematics when any of the Hub typesetting calls (<tt class="docutils literal"><span class="pre">Typeset()</span></tt>, <tt class="docutils literal"><span class="pre">Process()</span></tt>,
Update, etc.) are called with no element specified, and during <tt class="docutils literal"><span class="pre">Update()</span></tt>, etc.) are called with no element specified, and during
MathJax&#8217;s initial typesetting run when it starts up. This lets you MathJax&#8217;s initial typesetting run when it starts up. This lets you
restrict the processing to particular containers rather than scanning restrict the processing to particular containers rather than scanning
the entire document for mathematics. If none are supplied, the complete the entire document for mathematics. If none are supplied, the complete
document is processed.</p> document is processed.</p>
</dd></dl> </dd></dl>
<dl class="describe">
<dt>
<tt class="descname">positionToHash: true</tt></dt>
<dd><p>Since typesetting usually changes the vertical dimensions of the
page, if the URL contains an anchor position, then after the page
is typeset, you may no longer be positioned at the correct
position on the page. MathJax can reposition to that location
after it completes its initial typesetting of the page. This
value controls whether MathJax will reposition the browser to the
<tt class="docutils literal"><span class="pre">#hash</span></tt> location from the page URL after typesetting for the page.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">showMathMenu: true</tt></dt>
<dt>
<tt class="descname">showMathMenuMSIE: true</tt></dt>
<dd><p>These control whether to attach the MathJax contextual menu to the
expressions typeset by MathJax. Since the code for handling
MathPlayer in Internet Explorer is somewhat delicate, it is
controlled separately via <tt class="docutils literal"><span class="pre">showMathMenuMSIE</span></tt>, but the latter is
now deprecated in favor of the MathJax contextual menu settings
for MathPlayer (see below).</p>
<p>If <tt class="docutils literal"><span class="pre">showMathMenu</span></tt> is <tt class="docutils literal"><span class="pre">true</span></tt>, then right-clicking (on Windows
or Linux) or control-clicking (on Mac OS X) will produce a MathJax
menu that allows you to get the source of the mathematics in
various formats, change the size of the mathematics relative to
the surrounding text, get information about MathJax, and configure
other MathJax settings.</p>
<p>Set this to <tt class="docutils literal"><span class="pre">false</span></tt> to disable the menu. When <tt class="docutils literal"><span class="pre">true</span></tt>, the
<tt class="docutils literal"><span class="pre">MathMenu</span></tt> configuration block determines the operation of the
menu. See <a class="reference internal" href="MathMenu.html#configure-mathmenu"><em>the MathMenu options</em></a> for
more details.</p>
<p>These values used to be listed in the separate output jax, but
have been moved to this more central location since they are
shared by all output jax. MathJax will still honor their values
from their original positions, if they are set there.</p>
</dd></dl>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">menuSettings: { ... }</tt></dt> <tt class="descname">menuSettings: { ... }</tt></dt>
@ -268,9 +308,21 @@ to <tt class="docutils literal"><span class="pre">&quot;Browser&quot;</span></tt
rather than the MathJax menu.</p> rather than the MathJax menu.</p>
</dd></dl> </dd></dl>
<p>There are also settings for <tt class="docutils literal"><span class="pre">format</span></tt>, <tt class="docutils literal"><span class="pre">renderer</span></tt>, and <tt class="docutils literal"><span class="pre">font</span></tt>, <dl class="describe">
but these are maintained by MathJax and should not be set by the <dt>
page author.</p> <tt class="descname">texHints: true</tt></dt>
<dd><p>This controls whether the &#8220;Show Source&#8221; menu item includes
special class names that help MathJax to typeset the
mathematics that was produced by the TeX input jax. If these
are included, then you can take the output from &#8220;Show Source&#8221;
and put it into a page that uses MathJax&#8217;s MathML input jax
and expect to get the same results as the original TeX.
(Without this, there may be some spacing differences.)</p>
</dd></dl>
<p>There are also settings for <tt class="docutils literal"><span class="pre">format</span></tt>, <tt class="docutils literal"><span class="pre">renderer</span></tt>, <tt class="docutils literal"><span class="pre">font</span></tt>,
<tt class="docutils literal"><span class="pre">mpContext</span></tt>, and <tt class="docutils literal"><span class="pre">mpMouse</span></tt>, but these are maintained by
MathJax and should not be set by the page author.</p>
</dd></dl> </dd></dl>
<dl class="describe"> <dl class="describe">

View File

@ -59,15 +59,15 @@ will see that <tt class="docutils literal"><span class="pre">config/default.js</
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt>). Anything that is in <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt>). Anything that is in
<tt class="docutils literal"><span class="pre">config/default.js</span></tt> can be included in-line to configure MathJax.</p> <tt class="docutils literal"><span class="pre">config/default.js</span></tt> can be included in-line to configure MathJax.</p>
<p>The structure that you pass to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> is a <p>The structure that you pass to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> is a
JavaScript object that includes name-value pairs giving the names of JavaScript object that includes <cite>name:value</cite> pairs giving the names of
parameters and their values, with pairs separated by commas. Be parameters and their values, with pairs separated by commas. Be
careful not to include a comma after the last value, however, as some careful not to include a comma after the last value, however, as some
browsers (namely Internet Explorer) will fail to process the browsers (namely Internet Explorer) will fail to process the
configuration if you do.</p> configuration if you do.</p>
<p>The MathJax components, like the TeX input processor, have their own <p>The MathJax components, like the TeX input processor, have their own
sections in the configuration object, labeled by the component name, sections in the configuration object labeled by the component name,
and using an object as its value. That object is itself and using an object as its value. That object is itself
a configuration object made up of name-value pairs that give the a configuration object made up of <cite>name:value</cite> pairs that give the
configuration options for the component.</p> configuration options for the component.</p>
<p>For example,</p> <p>For example,</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
@ -117,6 +117,7 @@ are categorized by the component they affect.</p>
<li class="toctree-l1"><a class="reference internal" href="AsciiMath.html">The AsciiMath input processor options</a></li> <li class="toctree-l1"><a class="reference internal" href="AsciiMath.html">The AsciiMath input processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="HTML-CSS.html">The HTML-CSS output processor options</a></li> <li class="toctree-l1"><a class="reference internal" href="HTML-CSS.html">The HTML-CSS output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="NativeMML.html">The NativeMML output processor options</a></li> <li class="toctree-l1"><a class="reference internal" href="NativeMML.html">The NativeMML output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="SVG.html">The SVG output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MMLorHTML.html">The MMLorHTML configuration options</a></li> <li class="toctree-l1"><a class="reference internal" href="MMLorHTML.html">The MMLorHTML configuration options</a></li>
</ul> </ul>
</div> </div>
@ -124,6 +125,7 @@ are categorized by the component they affect.</p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="MathMenu.html">The MathMenu options</a></li> <li class="toctree-l1"><a class="reference internal" href="MathMenu.html">The MathMenu options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MathZoom.html">The MathZoom options</a></li> <li class="toctree-l1"><a class="reference internal" href="MathZoom.html">The MathZoom options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MathEvents.html">The MathEvents options</a></li>
<li class="toctree-l1"><a class="reference internal" href="FontWarnings.html">The FontWarnings options</a></li> <li class="toctree-l1"><a class="reference internal" href="FontWarnings.html">The FontWarnings options</a></li>
</ul> </ul>
</div> </div>

View File

@ -101,6 +101,21 @@ the browser before MathJax has the chance to run. You can only
include text, not tags, as your math delimiters.</p> include text, not tags, as your math delimiters.</p>
</dd></dl> </dd></dl>
<dl class="describe">
<dt>
<tt class="descname">balanceBraces: true,</tt></dt>
<dd><p>This value determines whether <cite>tex2jax</cite> requires braces to be
balanced within math delimiters (which allows for nested dollar
signs). Set to <tt class="docutils literal"><span class="pre">false</span></tt> to get pre-v2.0 compatibility. When
<tt class="docutils literal"><span class="pre">true</span></tt>,</p>
<div class="highlight-latex"><div class="highlight"><pre><span class="s">$</span><span class="nb">y </span><span class="o">=</span><span class="nb"> x^</span><span class="m">2</span><span class="nb"> </span><span class="nv">\hbox</span><span class="nb">{ when </span><span class="s">$</span>x &gt; 2<span class="s">$</span><span class="nb">}</span><span class="s">$</span>.
</pre></div>
</div>
<p>will be properly handled as a single expression. When <tt class="docutils literal"><span class="pre">false</span></tt>,
it would be interpreted as two searpate expressions, each with
improperly balanced braces.</p>
</dd></dl>
<dl class="describe"> <dl class="describe">
<dt> <dt>
<tt class="descname">processEscapes: false</tt></dt> <tt class="descname">processEscapes: false</tt></dt>
@ -166,11 +181,11 @@ expression, and so you need to be sure to quote any <cite>regexp</cite>
special characters. The pattern is inserted into one that special characters. The pattern is inserted into one that
requires your pattern to match a complete word, so setting requires your pattern to match a complete word, so setting
<tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with <tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with
<tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt>. Note that you can assign <tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt> but not <tt class="docutils literal"><span class="pre">class=&quot;myclass2&quot;</span></tt>.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with <tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> vertical line character (<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with
any element assigned a class of either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> <tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> any element assigned a class of
will be skipped.</p> either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> will be skipped.</p>
</dd></dl> </dd></dl>
<dl class="describe"> <dl class="describe">
@ -185,11 +200,11 @@ regular expression, and so you need to be sure to quote any
<cite>regexp</cite> special characters. The pattern is inserted into one <cite>regexp</cite> special characters. The pattern is inserted into one
that requires your pattern to match a complete word, so setting that requires your pattern to match a complete word, so setting
<tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with <tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with
<tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt>. Note that you can assign <tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt> but not <tt class="docutils literal"><span class="pre">class=&quot;myclass2&quot;</span></tt>.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with <tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> any vertical line character (<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with
element assigned a class of either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> will <tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> any element assigned a class of
have its contents processed.</p> either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> will have its contents processed.</p>
</dd></dl> </dd></dl>
</div> </div>

View File

@ -74,7 +74,7 @@ the <cite>jax</cite> array of your MathJax configuration. For example</p>
</div> </div>
<p>would specify TeX input and HTML-with-CSS output for the mathematics <p>would specify TeX input and HTML-with-CSS output for the mathematics
in your document.</p> in your document.</p>
<p>The HTML-CSS output processor produces high-quality output in all <p>The <strong>HTML-CSS output processor</strong> produces high-quality output in all
major browsers, with results that are consistent across browsers and major browsers, with results that are consistent across browsers and
operating systems. This is MathJax&#8217;s primary output mode. Its major operating systems. This is MathJax&#8217;s primary output mode. Its major
advantage is its quality and consistency; its drawback is that it is advantage is its quality and consistency; its drawback is that it is
@ -87,7 +87,7 @@ more comparable to other browsers. The HTML-CSS output uses web-based
fonts so that users don&#8217;t have to have math fonts installed on their fonts so that users don&#8217;t have to have math fonts installed on their
computers; but this does introduce some printing issues in some computers; but this does introduce some printing issues in some
browsers.</p> browsers.</p>
<p>The SVG output processor is new in MathJax version 2.0, and it uses <p>The <strong>SVG output processor</strong> is new in MathJax version 2.0, and it uses
<cite>Scalable Vector Graphics</cite> to render the mathematics on the page. SVG <cite>Scalable Vector Graphics</cite> to render the mathematics on the page. SVG
is supported in all the major browsers and most mobile devices; note, is supported in all the major browsers and most mobile devices; note,
however, that Internet Explorer prior to IE9 does not support SVG, and however, that Internet Explorer prior to IE9 does not support SVG, and
@ -103,7 +103,7 @@ once they are typeset, and don&#8217;t rescale if the window size changes
(for example). Since equation numbers are handled through (for example). Since equation numbers are handled through
variable-width tables, that means equation numbers may not stay at the variable-width tables, that means equation numbers may not stay at the
edge of the window if it is resized.</p> edge of the window if it is resized.</p>
<p>The NativeMML output processor uses the browser&#8217;s internal MathML <p>The <strong>NativeMML output processor</strong> uses the browser&#8217;s internal MathML
support (if any) to render the mathematics. Currently, Firefox has support (if any) to render the mathematics. Currently, Firefox has
native support for MathML, and IE has the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a> for rendering native support for MathML, and IE has the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a> for rendering
MathML. Opera has some built-in support for MathML that works well MathML. Opera has some built-in support for MathML that works well
@ -200,6 +200,29 @@ possible. That can be accomplished by adding</p>
that this line must come at the beginning of the <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt>, before that this line must come at the beginning of the <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt>, before
any stylesheets, scripts, or other content are loaded.</p> any stylesheets, scripts, or other content are loaded.</p>
</div> </div>
<div class="section" id="html-css-extensions">
<span id="id1"></span><h2>HTML-CSS Extensions<a class="headerlink" href="#html-css-extensions" title="Permalink to this headline"></a></h2>
<p>The HTML-CSS output jax uses elements with width set to 100% when it
typesets displayed equations. If there are floating elements on the
left or right, this can mean that displayed mathematics isn&#8217;t properly
centered, and can cause equation numbers to overlap the floating
content. To avoid this, you can specify the <cite>handle-floats</cite> extension
in the <cite>extensions</cite> array of your <cite>HTML-CSS</cite> configuration block.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="s2">&quot;HTML-CSS&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;handle-floats.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This will use CSS that puts the displayed equations into elements that
work like tabel cells, and won&#8217;t overlap the floaring content.
Because this is somewhat of a misuse of CSS, it is not used by
default, but it has proved successful in most situations, so you may
consider using it in pages that include material that floats to the
left or right of text containing displayed mathematics, especially
when equation numbers or tags are used.</p>
<p>See the <a class="reference internal" href="options/HTML-CSS.html#configure-html-css"><em>HTML-CSS configuration options</em></a> for
other options of the HTML-CSS output jax.</p>
</div>
</div> </div>
@ -213,6 +236,7 @@ any stylesheets, scripts, or other content are loaded.</p>
<li><a class="reference internal" href="#">MathJax Output Formats</a><ul> <li><a class="reference internal" href="#">MathJax Output Formats</a><ul>
<li><a class="reference internal" href="#automatic-selection-of-the-output-processor">Automatic Selection of the Output Processor</a></li> <li><a class="reference internal" href="#automatic-selection-of-the-output-processor">Automatic Selection of the Output Processor</a></li>
<li><a class="reference internal" href="#html-css-with-ie8-and-ie9">HTML-CSS with IE8 and IE9</a></li> <li><a class="reference internal" href="#html-css-with-ie8-and-ie9">HTML-CSS with IE8 and IE9</a></li>
<li><a class="reference internal" href="#html-css-extensions">HTML-CSS Extensions</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>

File diff suppressed because one or more lines are too long

View File

@ -6,10 +6,11 @@ The AsciiMath input processor
The options below control the operation of the AsciiMath input The options below control the operation of the AsciiMath input
processor that is run when you include ``"input/AsciiMath"`` in the processor that is run when you include ``"input/AsciiMath"`` in the
`jax` array of your configuration or use a combined configuration file `jax` array of your configuration or load a combined configuration
that includes AsciiMath input. They are listed with their default file that includes the AsciiMath input jax. They are listed with
values. To set any of these options, include a ``AsciiMath`` section their default values. To set any of these options, include a
in your :meth:`MathJax.Hub.Config()` call. For example ``AsciiMath`` section in your :meth:`MathJax.Hub.Config()` call. For
example
.. code-block:: javascript .. code-block:: javascript

View File

@ -6,10 +6,12 @@ The HTML-CSS output processor
The options below control the operation of the HTML-CSS output The options below control the operation of the HTML-CSS output
processor that is run when you include ``"output/HTML-CSS"`` in the processor that is run when you include ``"output/HTML-CSS"`` in the
`jax` array of your configuration. They are listed with their default `jax` array of your configuration or load a combined configuration
values. To set any of these options, include a ``"HTML-CSS"`` section file that includes the HTML-CSS output jax. They are listed with
in your :meth:`MathJax.Hub.Config()` call. Note that, because of the their default values. To set any of these options, include a
dash, you need to enclose the name in quotes. For example ``"HTML-CSS"`` section in your :meth:`MathJax.Hub.Config()` call.
Note that, because of the dash, you need to enclose the name in
quotes. For example
.. code-block:: javascript .. code-block:: javascript
@ -25,7 +27,7 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
The scaling factor (as a percentage) of math with respect to the The scaling factor (as a percentage) of math with respect to the
surrounding text. The `HTML-CSS` output processor tries to match surrounding text. The `HTML-CSS` output processor tries to match
the en-size of the mathematics with that of the text where it is 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 placed, but you may want to adjust the results using this scaling
factor. The user can also adjust this value using the contextual factor. The user can also adjust this value using the contextual
menu item associated with the typeset mathematics. menu item associated with the typeset mathematics.
@ -86,6 +88,68 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
(even if it doesn't contain the needed character), so order these (even if it doesn't contain the needed character), so order these
carefully. 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:: 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:: linebreaks: {}
This is an object that configures automatic linebreaking in the
HTML-CSS 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: {} .. describe:: styles: {}
This is a list of CSS declarations for styling the HTML-CSS This is a list of CSS declarations for styling the HTML-CSS
@ -96,18 +160,10 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
.. describe:: showMathMenu: true .. describe:: showMathMenu: true
This controls whether the MathJax contextual menu will be This value has been moved to the core configuration block, since
available on the mathematics in the page. If true, then it applies to all output jax, but it will still be honored (for
right-clicking (on the PC) or control-clicking (on the Mac) will now) if it is set here. See the :ref:`Core configuration options
produce a MathJax menu that allows you to get the source of the <configure-hub>` for more details.
mathematics in various formats, change the size of the mathematics
relative to the surrounding text, get information about
MathJax, and configure other MathJax settings.
Set this to ``false`` to disable the menu. When ``true``, the
``MathMenu`` configuration block determines the operation of the
menu. See :ref:`the MathMenu options <configure-MathMenu>` for
more details.
.. describe:: tooltip: { ... } .. describe:: tooltip: { ... }
@ -128,7 +184,8 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
The delay (in milliseconds) before the tooltop is cleared The delay (in milliseconds) before the tooltop is cleared
after the mouse moves out of the ``maction`` element. after the mouse moves out of the ``maction`` element.
.. describe:: offsetX: 10 and offsetY: 5 .. describe:: offsetX: 10
offsetY: 5
These are the offset from the mouse position (in pixels) These are the offset from the mouse position (in pixels)
where the tooltip will be placed. where the tooltip will be placed.

View File

@ -6,9 +6,11 @@ The MMLorHTML configuration options
The options below control the operation of the MMLorHTML configuration The options below control the operation of the MMLorHTML configuration
file that is run when you include ``"MMLorHTML.js"`` in the `config` file that is run when you include ``"MMLorHTML.js"`` in the `config`
array of your configuration. They are listed with their default array of your configuration, or when you use one of the combined
values. To set any of these options, include a ``MMLorHTML`` section configuration files that ends with ``_HTMLorMML``. They are listed
in your :meth:`MathJax.Hub.Config()` call. For example with their default values. To set any of these options, include a
``MMLorHTML`` section in your :meth:`MathJax.Hub.Config()` call. For
example
.. code-block:: javascript .. code-block:: javascript
@ -28,15 +30,29 @@ Note that if you use the ``MMLorHTML.js`` configuration file, you should
**not** specify an output processor in the `jax` array of your **not** specify an output processor in the `jax` array of your
configuration; `MMLorHTML` will fill that in for you. configuration; `MMLorHTML` will fill that in for you.
.. describe:: prefer: { MSIE: "MML", Firefox: "MML", Opera: "HTML", other: "HTML" } .. describe:: prefer: {
MSIE: "MML",
Firefox: "HTML",
Safari: "HTML",
Chrome: "HTML",
Opera: "HTML",
other: "HTML"
}
This lets you set the preferred renderer on a browser-by-browser This lets you set the preferred renderer on a browser-by-browser
basis. You set the browser to either ``"MML"`` or ``"HTML"`` basis. You set the browser to either ``"MML"`` or ``"HTML"``
depending on whether you want to use the `NativeMML` or `HTML-CSS` depending on whether you want to use the `NativeMML` or `HTML-CSS`
output processor. Note that although Opera does process some MathML output processor. Note that although Opera and Safari do process some MathML
natively, its support is not sufficient to handle the more natively, their support is not sufficient to handle the more
complicated output generated by MathJax, so its setting is complicated output generated by MathJax, so their settings are
``"HTML"`` by default. ``"HTML"`` by default. Although Firefox does support a large
subset of MathJax, it does not implement all the features needed by
MathJax, and so it is also set to ``"HTML"`` by default (this is
new in v2.0).
Note that users can still use the MathJax contextual menu to select
a different renderer after the default one has been chosen by
``MMLorHTML.js``.

View File

@ -0,0 +1,37 @@
.. _configure-MathEvents:
************************
The MathEvents extension
************************
The options below control the operation of the MathEvents component that
allows handles mouse and menu events attached to mathematics that is
typeset by MathJax. They are listed with their
default values. To set any of these options, include a ``MathEvents``
section in your :meth:`MathJax.Hub.Config()` call. For example
.. code-block:: javascript
MathJax.Hub.Config({
MathEvents: {
hover: 400
}
});
would set the required delay for hovering over a math element to
400 milliseconds.
.. describe:: hover: 500
This value is the time (in milliseconds) that a user must hold the
mouse still over a math element before it is considered to be
hovering over the math.
.. describe:: styles: {}
This is a list of CSS declarations for styling the zoomed
mathematics. See the definitions in ``extensions/MathEvents.js``
for details 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.

View File

@ -6,7 +6,8 @@ The MathML input processor
The options below control the operation of the MathML input processor The options below control the operation of the MathML input processor
that is run when you include ``"input/MathML"`` in the `jax` array of that is run when you include ``"input/MathML"`` in the `jax` array of
your configuration. They are listed with their default values. To your configuration or load a combined configuration file that includes
the MathML input jax. They are listed with their default values. To
set any of these options, include a ``MathML`` section in your set any of these options, include a ``MathML`` section in your
:meth:`MathJax.Hub.Config()` call. For example :meth:`MathJax.Hub.Config()` call. For example

View File

@ -34,34 +34,42 @@ would set the ``delay`` option to 600 milliseconds.
.. describe:: showRenderer: true .. describe:: showRenderer: true
This controls whether the "Math Renderer" item will be displayed in This controls whether the "Math Renderer" item will be displayed
the "Settings" submenu of the mathematics contextual menu. It in the "Math Settings" submenu of the MathJax contextual menu.
allows the user to change between the `HTML-CSS` and `NativeMML` It allows the user to change between the `HTML-CSS`, `NativeMML`,
output processors for the mathematics on the page. Set to and `SVG` output processors for the mathematics on the page. Set
``false`` to prevent this menu item from showing. to ``false`` to prevent this menu item from showing.
.. describe:: showContext: false
This controls whether the "Contextual Menu" item will be displayed
in the "Settings" submenu of the mathematics contextual menu.
It allows the user to decide whether the MathJax menu or the
browser's default contextual menu will be shown when the context
menu click occurs over mathematics typeset by MathJax. (The main
reason to allow pass-through to the browser's menu is to gain
access to the MathPlayer contextual menu when the NativeMML output
processor is used in Internet Explorer with the `MathPlayer plugin
<http://www.dessci.com/en/products/mathplayer/>`_.) Set to
``false`` to prevent this menu item from showing.
.. describe:: showFontMenu: false .. describe:: showFontMenu: false
This controls whether the "Font Preference" item will be displayed This controls whether the "Font Preference" item will be displayed
in the "Settings" submenu of the mathematics contextual menu. in the "Math Settings" submenu of the MathJax contextual menu.
This submenu lets the user select what font to use in the This submenu lets the user select what font to use in the
mathematics produced by the `HTML-CSS` output processor. Note that mathematics produced by the `HTML-CSS` output processor. Note that
changing the selection in the font menu will cause the page to changing the selection in the font menu will cause the page to
reload. Set to ``false`` to prevent this menu item from showing. reload. Set to ``false`` to prevent this menu item from showing.
.. describe:: showMathPlayer: true
This controls whether the "MathPlayer" item will be displayed in
the "Math Settings" submenu of the MathJax contextual menu. This
submenu lets the user select what events should be passed on to
the `MathPlayer plugin
<http://www.dessci.com/en/products/mathplayer/>`_, when it is
present. Mouse events can be passed on (so that clicks will be
processed by MathPlayer rather than MathJax), and emnu events can
be passed on (to allow the user access to the MathPlayer menu).
Set to ``false`` to prevent this menu item from showing.
.. describe:: showContext: false
This controls whether the "Contextual Menu" item will be displayed
in the "Math Settings" submenu of the MathJax contextual menu.
It allows the user to decide whether the MathJax menu or the
browser's default contextual menu will be shown when the context
menu click occurs over mathematics typeset by MathJax. Set to
``false`` to prevent this menu item from showing.
.. describe:: windowSettings: { ... } .. describe:: windowSettings: { ... }
These are the settings for the ``window.open()`` call that These are the settings for the ``window.open()`` call that

View File

@ -14,23 +14,28 @@ section in your :meth:`MathJax.Hub.Config()` call. For example
MathJax.Hub.Config({ MathJax.Hub.Config({
MathZoom: { MathZoom: {
delay: 600 styles: {
"#MathJax_Zoom": {
"background-color": "#0000F0"
}
}
} }
}); });
would set the ``delay`` option to 600 milliseconds. would set the background color of the Zoom box to a very light blue.
Mathematics is zoomed when the user "triggers" the zoom by an action, Mathematics is zoomed when the user "triggers" the zoom by an action,
either clicking on the mathematics, double-clicking on it, or holding either clicking on the mathematics, double-clicking on it, or holding
the mouse still over it (i.e., "hovering"). Which trigger is used is the mouse still over it (i.e., "hovering"). Which trigger is used is
set by the user via the math contextual menu (or by the author using set by the user via the math contextual menu (or by the author using
the ``menuSettings`` configuration section). the ``menuSettings`` configuration section of the `core configuration
options <configure-hub>`).
.. describe:: delay: 400 .. describe:: delay: 500
This the time (in milliseconds) that the mouse must be still over a This value is now stored as the ``hover`` parameter in the
typeset mathematical formula before the zoomed version is displayed :ref:`MathEvents <configure-MathEvents>` configuration options, and
(when the zoom trigger is set to `Hover`). will have no effect if given here.
.. describe:: styles: {} .. describe:: styles: {}

View File

@ -6,9 +6,11 @@ The NativeMML output processor
The options below control the operation of the NativeMML output The options below control the operation of the NativeMML output
processor that is run when you include ``"output/NativeMML"`` in the processor that is run when you include ``"output/NativeMML"`` in the
`jax` array of your configuration. They are listed with their default `jax` array of your configuration or load a combined configuration
values. To set any of these options, include a ``NativeMML`` section file taht includes the NativeMML output jax. They are listed with
in your :meth:`MathJax.Hub.Config()` call. For example their default values. To set any of these options, include a
``NativeMML`` section in your :meth:`MathJax.Hub.Config()` call. For
example
.. code-block:: javascript .. code-block:: javascript
@ -23,34 +25,25 @@ would set the ``scale`` option to 105 percent.
.. describe:: scale: 100 .. describe:: scale: 100
The scaling factor (as a percentage) of math with respect to the The scaling factor (as a percentage) of math with respect to the
surrounding text. Since the `NativeMML` output relies on the surrounding text. The `NativeMML` output processor tries to match
browser's native MathML support, MathJax does not control the the ex-size of the mathematics with that of the text where it is
font size used in the mathematics. You may need to set this value placed, but you may want to adjust the results using this scaling
to compensate for the size selected by the browser. The user can factor. The user can also adjust this value using the contextual
also adjust this value using the contextual menu item associated menu item associated with the typeset mathematics.
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:: showMathMath: true .. describe:: showMathMath: true
showMathMenuMSIE: true
This controls whether the MathJax contextual menu will be These values have been moved to the core configuration block, since
available on the mathematics in the page. If true, then it applies to all output jax, but they will still be honored (for
right-clicking (on the PC) or control-clicking (on the Mac) will now) if it is set here. See the :ref:`Core configuration options
produce a MathJax menu that allows you to get the source of the <configure-hub>` for more details.
mathematics in various formats, change the size of the mathematics
relative to the surrounding text, get information about
MathJax, and configure other MathJax settings.
Set this to ``false`` to disable the menu. When ``true``, the
``MathMenu`` configuration block determines the operation of the
menu. See :ref:`the MathMenu options <configure-MathMenu>` for
more details.
.. describe:: showMathMenuMSIE: true
There is a separate menu setting for MSIE since the code to handle
that is a bit delicate; if it turns out to have unexpected
consequences, you can turn it off without turning off the
menu support in other browsers.
.. describe:: styles: {} .. describe:: styles: {}

162
docs/source/options/SVG.rst Normal file
View File

@ -0,0 +1,162 @@
.. _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. Note that, because of the
dash, you need to enclose the name in quotes. 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. Note that
currently only the `TeX` font is available.
.. describe:: blacker: 10
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:: 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:: 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.

View File

@ -6,7 +6,8 @@ The TeX input processor
The options below control the operation of the TeX input processor The options below control the operation of the TeX input processor
that is run when you include ``"input/TeX"`` in the `jax` array of that is run when you include ``"input/TeX"`` in the `jax` array of
your configuration. They are listed with their default values. To your configuration or load a combined configuration file that includes
the TeX input jax. They are listed with their default values. To
set any of these options, include a ``TeX`` section in your set any of these options, include a ``TeX`` section in your
:meth:`MathJax.Hub.Config()` call. For example :meth:`MathJax.Hub.Config()` call. For example
@ -42,16 +43,65 @@ to be defined within the TeX input processor.
in a small area or a thin column of text, you might need to change in a small area or a thin column of text, you might need to change
the value to leave sufficient margin for tags. the value to leave sufficient margin for tags.
.. describe:: equationNumbers: {}
This object controls the automatic equation numbering and the
equation referencing. It contains the following values:
.. describe:: autoNumber: "none"
This controls whether equations are numbered and how. By
default it is set to ``"none"`` to be compatible with earlier
versions of MathJax where auto-numbering was not performed (so
pages will not change their appearance). You can change
this to ``"AMS"`` for equations numbered as the `AMSmath`
package would do, or ``"all"`` to get an equation number for
every displayed equation.
.. describe:: formatNumber: function (n) {return n}
A function that tells MathJax what tag to use for equation
number ``n``. This could be used to have the equations labeled
by a sequence of symbols rather than numbers, or to use section
and subsection numbers instead.
.. describe:: formatTag: function (n) {return '('+n+')'}
A function that tells MathJax how to format an equation number
for displaying as a tag for an equation. This is what appears
in the margin of a tagged or numbered equation.
.. describe:: formatID: function {return 'mjx-eqn-'+String(n).replace(/[:'"<>&]/g,"")}
A function that rells MathJax what ID to use as an anchor for
the equation (so that it can be used in URL references).
.. describe:: formatURL: function (id) {return '#'+escape(id)}
A function that takes an equation ID and returns the URL to
link to it.
.. describe:: useLabelIds: true
This controls whether element ID's use the ``\label`` name or
the equation number. When ``true``, use the label, when
``false``, use the equation number.
See the `MathJax examples page
<http://cdn.mathjax.org/mathjax/latest/test/examples.html>`_ for
some examples of equation numbering.
.. describe:: Macros: {} .. describe:: Macros: {}
This lists macros to define before the TeX input processor begins. This lists macros to define before the TeX input processor begins.
These are name:value pairs where the `name` gives the name of the TeX These are `name:value` pairs where the `name` gives the name of
macro to be defined, and `value` gives the replacement text for the the TeX macro to be defined, and `value` gives the replacement
macro. The `value` can be an array of the form `[value,n]`, where text for the macro. The `value` can be an array of the form
`value` is the replacement text and `n` is the number of parameters `[value,n]`, where `value` is the replacement text and `n` is the
for the macro. Note that since the `value` is a javascript string, number of parameters for the macro. Note that since the `value`
backslashes in the replacement text must be doubled to prevent them is a javascript string, backslashes in the replacement text must
from acting as javascript escape characters. be doubled to prevent them from acting as javascript escape
characters.
For example, For example,

View File

@ -86,11 +86,11 @@ preprocessor to include dollar signs as well as back-ticks.
special characters. The pattern is inserted into one that special characters. The pattern is inserted into one that
requires your pattern to match a complete word, so setting requires your pattern to match a complete word, so setting
``ignoreClass: "class2"`` would cause it to match an element with ``ignoreClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"``. Note that you can assign ``class="class1 class2 class3"`` but not ``class="myclass2"``.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(``|``). For instance, with ``ignoreClass: "class1|class2"`` vertical line character (``|``). For instance, with
any element assigned a class of either ``class1`` or ``class2`` ``ignoreClass: "class1|class2"`` any element assigned a class of
will be skipped. either ``class1`` or ``class2`` will be skipped.
.. describe:: processClass: "asciimath2jax_process" .. describe:: processClass: "asciimath2jax_process"
@ -103,8 +103,8 @@ preprocessor to include dollar signs as well as back-ticks.
`regexp` special characters. The pattern is inserted into one `regexp` special characters. The pattern is inserted into one
that requires your pattern to match a complete word, so setting that requires your pattern to match a complete word, so setting
``processClass: "class2"`` would cause it to match an element with ``processClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"``. Note that you can assign ``class="class1 class2 class3"`` but not ``class="myclass2"``.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(``|``). For instance, with ``processClass: "class1|class2"`` any vertical line character (``|``). For instance, with
element assigned a class of either ``class1`` or ``class2`` will ``processClass: "class1|class2"`` any element assigned a class of
have its contents processed. either ``class1`` or ``class2`` will have its contents processed.

View File

@ -19,10 +19,7 @@ behavior of MathJax. They are given with their default values.
A comma-separated list of extensions to load at startup. The A comma-separated list of extensions to load at startup. The
default directory is ``MathJax/extensions``. The ``tex2jax`` and default directory is ``MathJax/extensions``. The ``tex2jax`` and
``mml2jax`` preprocessors can be listed here, as well as a number ``mml2jax`` preprocessors can be listed here, as well as a
of TeX-specific extensions (see the :ref:`TeX and LaTeX input
<tex-and-latex-input>` section of the :ref:`Getting Started
<getting-started>` document for more details). There is also a
``FontWarnings`` extension that you can use to inform your user ``FontWarnings`` extension that you can use to inform your user
that mathematics fonts are available that they can download to that mathematics fonts are available that they can download to
improve their experience of your site. improve their experience of your site.
@ -33,7 +30,9 @@ behavior of MathJax. They are given with their default values.
starts up, e.g., to define local macros, etc., and there is a starts up, e.g., to define local macros, etc., and there is a
sample config file named ``config/local/local.js``. The default sample config file named ``config/local/local.js``. The default
directory is the `MathJax/config` directory. The ``MMLorHTML.js`` directory is the `MathJax/config` directory. The ``MMLorHTML.js``
configuration is the only other predefined configuration file. configuration is one such configuration file, and there are a
number of other pre-defined configurations (see :ref:`Using a
configuration file <config-files>` for more details).
.. describe:: styleSheets: [] .. describe:: styleSheets: []
@ -43,8 +42,9 @@ behavior of MathJax. They are given with their default values.
.. describe:: styles: {} .. describe:: styles: {}
CSS `selector: rules;` styles to be defined dynamically at startup CSS styles to be defined dynamically at startup time. These are
time. in the form `selector:rules` (see :ref:`CSS Style Objects
<css-style-objects>` for complete details).
.. describe:: preJax: null and postJax: null .. describe:: preJax: null and postJax: null
@ -149,13 +149,51 @@ behavior of MathJax. They are given with their default values.
.. describe:: elements: [] .. describe:: elements: []
This is a list of DOM element ID's that are the ones to process for This is a list of DOM element ID's that are the ones to process for
mathematics when any of the Hub typesetting calls (Typeset, Process, mathematics when any of the Hub typesetting calls (``Typeset()``, ``Process()``,
Update, etc.) are called with no element specified, and during ``Update()``, etc.) are called with no element specified, and during
MathJax's initial typesetting run when it starts up. This lets you MathJax's initial typesetting run when it starts up. This lets you
restrict the processing to particular containers rather than scanning restrict the processing to particular containers rather than scanning
the entire document for mathematics. If none are supplied, the complete the entire document for mathematics. If none are supplied, the complete
document is processed. document is processed.
.. describe:: positionToHash: true
Since typesetting usually changes the vertical dimensions of the
page, if the URL contains an anchor position, then after the page
is typeset, you may no longer be positioned at the correct
position on the page. MathJax can reposition to that location
after it completes its initial typesetting of the page. This
value controls whether MathJax will reposition the browser to the
``#hash`` location from the page URL after typesetting for the page.
.. describe:: showMathMenu: true
showMathMenuMSIE: true
These control whether to attach the MathJax contextual menu to the
expressions typeset by MathJax. Since the code for handling
MathPlayer in Internet Explorer is somewhat delicate, it is
controlled separately via ``showMathMenuMSIE``, but the latter is
now deprecated in favor of the MathJax contextual menu settings
for MathPlayer (see below).
If ``showMathMenu`` is ``true``, then right-clicking (on Windows
or Linux) or control-clicking (on Mac OS X) will produce a MathJax
menu that allows you to get the source of the mathematics in
various formats, change the size of the mathematics relative to
the surrounding text, get information about MathJax, and configure
other MathJax settings.
Set this to ``false`` to disable the menu. When ``true``, the
``MathMenu`` configuration block determines the operation of the
menu. See :ref:`the MathMenu options <configure-MathMenu>` for
more details.
These values used to be listed in the separate output jax, but
have been moved to this more central location since they are
shared by all output jax. MathJax will still honor their values
from their original positions, if they are set there.
.. describe:: menuSettings: { ... } .. describe:: menuSettings: { ... }
This block contains settings for the mathematics contextual menu This block contains settings for the mathematics contextual menu
@ -195,9 +233,19 @@ behavior of MathJax. They are given with their default values.
to ``"Browser"``, you will get the MathPlayer contextual menu to ``"Browser"``, you will get the MathPlayer contextual menu
rather than the MathJax menu. rather than the MathJax menu.
There are also settings for ``format``, ``renderer``, and ``font``, .. describe:: texHints: true
but these are maintained by MathJax and should not be set by the
page author. This controls whether the "Show Source" menu item includes
special class names that help MathJax to typeset the
mathematics that was produced by the TeX input jax. If these
are included, then you can take the output from "Show Source"
and put it into a page that uses MathJax's MathML input jax
and expect to get the same results as the original TeX.
(Without this, there may be some spacing differences.)
There are also settings for ``format``, ``renderer``, ``font``,
``mpContext``, and ``mpMouse``, but these are maintained by
MathJax and should not be set by the page author.
.. describe:: errorSettings: { ... } .. describe:: errorSettings: { ... }

View File

@ -13,16 +13,16 @@ will see that ``config/default.js`` is itself one big call to
``config/default.js`` can be included in-line to configure MathJax. ``config/default.js`` can be included in-line to configure MathJax.
The structure that you pass to :meth:`MathJax.Hub.Config()` is a The structure that you pass to :meth:`MathJax.Hub.Config()` is a
JavaScript object that includes name-value pairs giving the names of JavaScript object that includes `name:value` pairs giving the names of
parameters and their values, with pairs separated by commas. Be parameters and their values, with pairs separated by commas. Be
careful not to include a comma after the last value, however, as some careful not to include a comma after the last value, however, as some
browsers (namely Internet Explorer) will fail to process the browsers (namely Internet Explorer) will fail to process the
configuration if you do. configuration if you do.
The MathJax components, like the TeX input processor, have their own The MathJax components, like the TeX input processor, have their own
sections in the configuration object, labeled by the component name, sections in the configuration object labeled by the component name,
and using an object as its value. That object is itself and using an object as its value. That object is itself
a configuration object made up of name-value pairs that give the a configuration object made up of `name:value` pairs that give the
configuration options for the component. configuration options for the component.
For example, For example,
@ -81,6 +81,7 @@ are categorized by the component they affect.
The AsciiMath input processor options <AsciiMath> The AsciiMath input processor options <AsciiMath>
The HTML-CSS output processor options <HTML-CSS> The HTML-CSS output processor options <HTML-CSS>
The NativeMML output processor options <NativeMML> The NativeMML output processor options <NativeMML>
The SVG output processor options <SVG>
The MMLorHTML configuration options <MMLorHTML> The MMLorHTML configuration options <MMLorHTML>
.. toctree:: .. toctree::
@ -88,6 +89,7 @@ are categorized by the component they affect.
The MathMenu options <MathMenu> The MathMenu options <MathMenu>
The MathZoom options <MathZoom> The MathZoom options <MathZoom>
The MathEvents options <MathEvents>
The FontWarnings options <FontWarnings> The FontWarnings options <FontWarnings>

View File

@ -56,6 +56,21 @@ preprocessor.
the browser before MathJax has the chance to run. You can only the browser before MathJax has the chance to run. You can only
include text, not tags, as your math delimiters. include text, not tags, as your math delimiters.
.. describe:: balanceBraces: true,
This value determines whether `tex2jax` requires braces to be
balanced within math delimiters (which allows for nested dollar
signs). Set to ``false`` to get pre-v2.0 compatibility. When
``true``,
.. code-block:: latex
$y = x^2 \hbox{ when $x > 2$}$.
will be properly handled as a single expression. When ``false``,
it would be interpreted as two searpate expressions, each with
improperly balanced braces.
.. describe:: processEscapes: false .. describe:: processEscapes: false
When set to ``true``, you may use ``\$`` to represent a literal When set to ``true``, you may use ``\$`` to represent a literal
@ -116,11 +131,11 @@ preprocessor.
special characters. The pattern is inserted into one that special characters. The pattern is inserted into one that
requires your pattern to match a complete word, so setting requires your pattern to match a complete word, so setting
``ignoreClass: "class2"`` would cause it to match an element with ``ignoreClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"``. Note that you can assign ``class="class1 class2 class3"`` but not ``class="myclass2"``.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(``|``). For instance, with ``ignoreClass: "class1|class2"`` vertical line character (``|``). For instance, with
any element assigned a class of either ``class1`` or ``class2`` ``ignoreClass: "class1|class2"`` any element assigned a class of
will be skipped. either ``class1`` or ``class2`` will be skipped.
.. describe:: processClass: "tex2jax_process" .. describe:: processClass: "tex2jax_process"
@ -133,8 +148,8 @@ preprocessor.
`regexp` special characters. The pattern is inserted into one `regexp` special characters. The pattern is inserted into one
that requires your pattern to match a complete word, so setting that requires your pattern to match a complete word, so setting
``processClass: "class2"`` would cause it to match an element with ``processClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"``. Note that you can assign ``class="class1 class2 class3"`` but not ``class="myclass2"``.
several classes by separating them by the vertical line character Note that you can assign several classes by separating them by the
(``|``). For instance, with ``processClass: "class1|class2"`` any vertical line character (``|``). For instance, with
element assigned a class of either ``class1`` or ``class2`` will ``processClass: "class1|class2"`` any element assigned a class of
have its contents processed. either ``class1`` or ``class2`` will have its contents processed.

View File

@ -32,7 +32,7 @@ the `jax` array of your MathJax configuration. For example
would specify TeX input and HTML-with-CSS output for the mathematics would specify TeX input and HTML-with-CSS output for the mathematics
in your document. in your document.
The HTML-CSS output processor produces high-quality output in all The **HTML-CSS output processor** produces high-quality output in all
major browsers, with results that are consistent across browsers and major browsers, with results that are consistent across browsers and
operating systems. This is MathJax's primary output mode. Its major operating systems. This is MathJax's primary output mode. Its major
advantage is its quality and consistency; its drawback is that it is advantage is its quality and consistency; its drawback is that it is
@ -46,7 +46,7 @@ fonts so that users don't have to have math fonts installed on their
computers; but this does introduce some printing issues in some computers; but this does introduce some printing issues in some
browsers. browsers.
The SVG output processor is new in MathJax version 2.0, and it uses The **SVG output processor** is new in MathJax version 2.0, and it uses
`Scalable Vector Graphics` to render the mathematics on the page. SVG `Scalable Vector Graphics` to render the mathematics on the page. SVG
is supported in all the major browsers and most mobile devices; note, is supported in all the major browsers and most mobile devices; note,
however, that Internet Explorer prior to IE9 does not support SVG, and however, that Internet Explorer prior to IE9 does not support SVG, and
@ -63,7 +63,7 @@ once they are typeset, and don't rescale if the window size changes
variable-width tables, that means equation numbers may not stay at the variable-width tables, that means equation numbers may not stay at the
edge of the window if it is resized. edge of the window if it is resized.
The NativeMML output processor uses the browser's internal MathML The **NativeMML output processor** uses the browser's internal MathML
support (if any) to render the mathematics. Currently, Firefox has support (if any) to render the mathematics. Currently, Firefox has
native support for MathML, and IE has the `MathPlayer plugin native support for MathML, and IE has the `MathPlayer plugin
<http://www.dessci.com/en/products/mathplayer/>`_ for rendering <http://www.dessci.com/en/products/mathplayer/>`_ for rendering
@ -179,3 +179,32 @@ possible. That can be accomplished by adding
at the top of the ``<head>`` section of your HTML documents. Note at the top of the ``<head>`` section of your HTML documents. Note
that this line must come at the beginning of the ``<head>``, before that this line must come at the beginning of the ``<head>``, before
any stylesheets, scripts, or other content are loaded. any stylesheets, scripts, or other content are loaded.
.. _html-css-extensions:
HTML-CSS Extensions
===================
The HTML-CSS output jax uses elements with width set to 100% when it
typesets displayed equations. If there are floating elements on the
left or right, this can mean that displayed mathematics isn't properly
centered, and can cause equation numbers to overlap the floating
content. To avoid this, you can specify the `handle-floats` extension
in the `extensions` array of your `HTML-CSS` configuration block.
.. code-block:: javascript
"HTML-CSS": {
extensions: ["handle-floats.js"]
}
This will use CSS that puts the displayed equations into elements that
work like tabel cells, and won't overlap the floaring content.
Because this is somewhat of a misuse of CSS, it is not used by
default, but it has proved successful in most situations, so you may
consider using it in pages that include material that floats to the
left or right of text containing displayed mathematics, especially
when equation numbers or tags are used.
See the :ref:`HTML-CSS configuration options <configure-HTML-CSS>` for
other options of the HTML-CSS output jax.