Skip to content

Commit

Permalink
Make plain JS configuration a separate section
Browse files Browse the repository at this point in the history
Fixes #95
  • Loading branch information
pkra committed Mar 11, 2015
1 parent 62d2276 commit d123fbb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,14 @@ in this example:
<script type="text/javascript" src="path-to-MathJax/MathJax.js?config=TeX-AMS_HTML">
</script>


.. _plainjs-config:

Using plain JavaScript
======================

Starting with MathJax version 2.3, it is possible to set ``window.MathJax`` to
a configuration object in any Javascript code before MathJax's startup.
a configuration object in any JavaScript code before MathJax's startup.
MathJax will then use that object for its initial configuration. For instance
the previous example becomes:

Expand All @@ -412,9 +418,9 @@ the previous example becomes:
<script type="text/javascript" src="path-to-MathJax/MathJax.js?config=TeX-AMS_HTML">
</script>

Similarly to ``text/x-mathjax-config``, you can enter arbitrary code to execute
during the configuration phase. You just need to put that code in an
``AuthorInit`` function:
Similarly to scripts with the custom type ``text/x-mathjax-config``, you can
enter arbitrary code to execute during the configuration phase. You just
need to put that code in an ``AuthorInit`` function:

.. code-block:: html

Expand Down

0 comments on commit d123fbb

Please sign in to comment.