Update configuraiton options for the various components
This commit is contained in:
parent
56c1f43297
commit
a903e2e5dc
|
@ -30,6 +30,12 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
|
||||||
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.
|
||||||
|
|
||||||
|
.. describe:: minScaleAdjust: 50
|
||||||
|
|
||||||
|
This gives a minimum scale (as a percent) for the scaling used my
|
||||||
|
MathJax to match the equation to the surrounding text. This will
|
||||||
|
prevent MathJax from making the mathematics too small.
|
||||||
|
|
||||||
.. describe:: availableFonts: ["STIX","TeX"]
|
.. describe:: availableFonts: ["STIX","TeX"]
|
||||||
|
|
||||||
This is a list of the fonts to look for on a user's computer in
|
This is a list of the fonts to look for on a user's computer in
|
||||||
|
|
|
@ -20,7 +20,7 @@ options, include a ``MathMenu`` section in your
|
||||||
|
|
||||||
would set the ``delay`` option to 600 milliseconds.
|
would set the ``delay`` option to 600 milliseconds.
|
||||||
|
|
||||||
.. describe:: delay: 400
|
.. describe:: delay: 150
|
||||||
|
|
||||||
This is the hover delay for the display (in milliseconds) for
|
This is the hover delay for the display (in milliseconds) for
|
||||||
submenus in the contextual menu: when the mouse is over a submenu
|
submenus in the contextual menu: when the mouse is over a submenu
|
||||||
|
|
|
@ -65,3 +65,17 @@ to be defined within the TeX input processor.
|
||||||
would ask the TeX processor to define two new macros: ``\RR``,
|
would ask the TeX processor to define two new macros: ``\RR``,
|
||||||
which produces a bold-face "R", and ``\bold{...}``, which takes one
|
which produces a bold-face "R", and ``\bold{...}``, which takes one
|
||||||
parameter and set it in the bold-face font.
|
parameter and set it in the bold-face font.
|
||||||
|
|
||||||
|
.. describe:: MAXMACROS: 10000
|
||||||
|
|
||||||
|
Because a definition of the form ``\def\x{\x} \x`` would cause MathJax
|
||||||
|
to loop infinitely, the `MAXMACROS` constant will limit the nuber of
|
||||||
|
macro substitutions allowed in any expression processed by MathJax.
|
||||||
|
|
||||||
|
.. describe:: MAXBUFFER: 5*1024
|
||||||
|
|
||||||
|
Because a definition of the form ``\def\x{\x aaa} \x`` would loop
|
||||||
|
infinitely, and at the same time stack up lots of a's in MathJax's
|
||||||
|
equation buffer, the `MAXBUFFER` constant is used to limit the size of
|
||||||
|
the string being processed by MathJax. It is set to 5KB, which should
|
||||||
|
be sufficient for any reasonable equation.
|
|
@ -132,7 +132,11 @@ behavior of MathJax. They are given with their default values.
|
||||||
configuration, styles, jax, and so on) as soon as it can. If you
|
configuration, styles, jax, and so on) as soon as it can. If you
|
||||||
expect to be doing additional configuration on the page, however,
|
expect to be doing additional configuration on the page, however,
|
||||||
you may want to have it wait until the page's onload hander is
|
you may want to have it wait until the page's onload hander is
|
||||||
called. If so, set this to ``"onload"``.
|
called. If so, set this to ``"onload"``. You can also set this to
|
||||||
|
``"configured"``, in which case, MathJax will delay its startup until
|
||||||
|
you explicitly call :meth:`MathJax.Hub.Configured()`. See
|
||||||
|
:ref:`Configuring MathJax after it is loaded <delayStartupUntil>` for more
|
||||||
|
details.
|
||||||
|
|
||||||
.. describe:: skipStartupTypeset: false
|
.. describe:: skipStartupTypeset: false
|
||||||
|
|
||||||
|
@ -207,3 +211,10 @@ behavior of MathJax. They are given with their default values.
|
||||||
on :ref:`CSS style objects <css-style-objects>` for details on
|
on :ref:`CSS style objects <css-style-objects>` for details on
|
||||||
how these are specified in JavaScript.
|
how these are specified in JavaScript.
|
||||||
|
|
||||||
|
.. describe:: v1.0-compatible: true
|
||||||
|
|
||||||
|
This controls whether MathJax issues the warning about not having an
|
||||||
|
explicit configuration in the event that the `jax` array is empty
|
||||||
|
after configuration is complete. If you really intend that array to
|
||||||
|
be empty, set this flag to ``false``. Note that setting this to false
|
||||||
|
does **not** cause a default configuration file to be loaded.
|
91
docs/source/options/index.rst
Normal file
91
docs/source/options/index.rst
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
.. _configuration:
|
||||||
|
|
||||||
|
*********************
|
||||||
|
Configuration Objects
|
||||||
|
*********************
|
||||||
|
|
||||||
|
The various components of MathJax, including its input and output
|
||||||
|
processors, its preprocessors, its extensions, and the MathJax core,
|
||||||
|
all can be configured through the ``config/default.js`` file, or via a
|
||||||
|
:meth:`MathJax.Hub.Config()` call (indeed, if you look closely, you
|
||||||
|
will see that ``config/default.js`` is itself one big call to
|
||||||
|
:meth:`MathJax.Hub.Config()`). Anything that is in
|
||||||
|
``config/default.js`` can be included in-line to configure MathJax.
|
||||||
|
|
||||||
|
The structure that you pass to :meth:`MathJax.Hub.Config()` is a
|
||||||
|
JavaScript object that includes name-value pairs giving the names of
|
||||||
|
parameters and their values, with pairs separated by commas. Be
|
||||||
|
careful not to include a comma after the last value, however, as some
|
||||||
|
browsers (namely Internet Explorer) will fail to process the
|
||||||
|
configuration if you do.
|
||||||
|
|
||||||
|
The MathJax components, like the TeX input processor, have their own
|
||||||
|
sections in the configuration object, labeled by the component name,
|
||||||
|
and using a configuration object as its value. The object is itself
|
||||||
|
a configuration object made up of name-value pairs that give the
|
||||||
|
configuration options for the component.
|
||||||
|
|
||||||
|
For example,
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
|
||||||
|
MathJax.Hub.Config({
|
||||||
|
showProcessingMessages: false,
|
||||||
|
jax: ["input/TeX", "output/HTML-CSS"],
|
||||||
|
TeX: {
|
||||||
|
TagSide: "left",
|
||||||
|
Macros: {
|
||||||
|
RR: '{\\bf R}',
|
||||||
|
bold: ['{\\bf #1}',1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
is a configuration that includes two settings for the MathJax Hub (one
|
||||||
|
for `showProcessingMessages` and one of the `jax` array), and a
|
||||||
|
configuration object for the TeX input processor. The latter includes
|
||||||
|
a setting for the TeX input processor's `TagSide` option (to set tags
|
||||||
|
on the left rather than the right) and a setting for `Macros`, which
|
||||||
|
defines new TeX macros (in this case, two macros, one called ``\RR``
|
||||||
|
that produces a bold "R", and one called ``\bold`` that puts is
|
||||||
|
argument in bold face).
|
||||||
|
|
||||||
|
The ``config/MathJax.js`` file is another example that shows nearly
|
||||||
|
all the configuration options for all of MathJax's components.
|
||||||
|
|
||||||
|
|
||||||
|
Configuration Options by Component
|
||||||
|
==================================
|
||||||
|
|
||||||
|
The individual options are explained in the following sections, which
|
||||||
|
are categorized by the component they affect.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
The core options <hub>
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
The tex2jax preprocessor options <tex2jax>
|
||||||
|
The mml2jax preprocessor options <mml2jax>
|
||||||
|
The jsMath2jax preprocessor options <jsMath2jax>
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
The TeX input processor options <TeX>
|
||||||
|
The MathML input processor options <MathML>
|
||||||
|
The HTML-CSS output processor options <HTML-CSS>
|
||||||
|
The NativeMML output processor options <NativeMML>
|
||||||
|
The MMLorHTML configuration options <MMLorHTML>
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
The MathMenu options <MathMenu>
|
||||||
|
The MathZoom options <MathZoom>
|
||||||
|
The FontWarnings options <FontWarnings>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user