Best way to customize the MathJax settings in Askbot

The MathJax/config/default.js file is used for customize the MathJax settings. To use it i modify this original code in bottom_scripts.html

{% if settings.ENABLE_MATHJAX %}
    <script type='text/javascript' src="{{settings.MATHJAX_BASE_URL}}/MathJax.js">
        MathJax.Hub.Config({
            extensions: ["tex2jax.js"],
            jax: ["input/TeX","output/HTML-CSS"],
            tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
        });
    </script>
{% endif %}

in this other code

{% if settings.ENABLE_MATHJAX %}
    <script type='text/javascript' src="{{settings.MATHJAX_BASE_URL}}/MathJax.js?config=default">
        MathJax.Hub.Config({
            extensions: ["tex2jax.js"],
            jax: ["input/TeX","output/HTML-CSS"],
            tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
        });
    </script>
{% endif %}

With this change i can customize the MathJax settings through MathJax/config/default.js. Can this change compromise some askbot functionality?

Remark. Also i notice that changing the original code in this more simply code

{% if settings.ENABLE_MATHJAX %}
    <script type='text/javascript' src="{{settings.MATHJAX_BASE_URL}}/MathJax.js?config=default">
    </script>
{% endif %}

the body of the question is rendered by MathJax but the title not!

Thanks in advance.

Near the soul's avatar
25
Near the soul
asked 2012-03-14 08:08:04 -0600, updated 2012-03-14 08:10:16 -0600
edit flag offensive 0 remove flag close merge delete

Comments

Sorry I don't have the bandwidth now to look into this issue deeply. I don't see how the "default" parameter would be picked up here by mathjax. Is the default.js evaulated at all?

Evgeny's avatar Evgeny (2012-03-14 16:51:35 -0600) edit

With the original code the default.js is not loaded. Hence, actually, no customization is possible to mathjax (equationnumbering, user defined command, etc) except editing the django template file

Katy23's avatar Katy23 (2012-03-15 14:44:13 -0600) edit
add a comment see more comments