diff --git a/docs/source/options/HTML-CSS.rst b/docs/source/options/HTML-CSS.rst index 8029422f5..6dc40c86a 100644 --- a/docs/source/options/HTML-CSS.rst +++ b/docs/source/options/HTML-CSS.rst @@ -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 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"] This is a list of the fonts to look for on a user's computer in diff --git a/docs/source/options/MathMenu.rst b/docs/source/options/MathMenu.rst index 18da45fb3..67abacdb5 100644 --- a/docs/source/options/MathMenu.rst +++ b/docs/source/options/MathMenu.rst @@ -20,7 +20,7 @@ options, include a ``MathMenu`` section in your 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 submenus in the contextual menu: when the mouse is over a submenu diff --git a/docs/source/options/TeX.rst b/docs/source/options/TeX.rst index 1d2ecbdee..38793247a 100644 --- a/docs/source/options/TeX.rst +++ b/docs/source/options/TeX.rst @@ -65,3 +65,17 @@ to be defined within the TeX input processor. would ask the TeX processor to define two new macros: ``\RR``, which produces a bold-face "R", and ``\bold{...}``, which takes one 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. \ No newline at end of file diff --git a/docs/source/options/hub.rst b/docs/source/options/hub.rst index 043f3f605..364a749e2 100644 --- a/docs/source/options/hub.rst +++ b/docs/source/options/hub.rst @@ -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 expect to be doing additional configuration on the page, however, 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 ` for more + details. .. describe:: skipStartupTypeset: false @@ -207,3 +211,10 @@ behavior of MathJax. They are given with their default values. on :ref:`CSS style objects ` for details on 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. \ No newline at end of file diff --git a/docs/source/options/index.rst b/docs/source/options/index.rst new file mode 100644 index 000000000..d41ff1cfb --- /dev/null +++ b/docs/source/options/index.rst @@ -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 + +.. toctree:: + :maxdepth: 1 + + The tex2jax preprocessor options + The mml2jax preprocessor options + The jsMath2jax preprocessor options + +.. toctree:: + :maxdepth: 1 + + The TeX input processor options + The MathML input processor options + The HTML-CSS output processor options + The NativeMML output processor options + The MMLorHTML configuration options + +.. toctree:: + :maxdepth: 1 + + The MathMenu options + The MathZoom options + The FontWarnings options + +