Best way to customize the MathJax settings in Askbot

asked 2012-03-14 08:08:04 -0500

Near the soul gravatar image

updated 2012-03-14 08:10:16 -0500

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.

edit retag flag offensive 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 gravatar imageEvgeny ( 2012-03-14 16:51:35 -0500 )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 gravatar imageKaty23 ( 2012-03-15 14:44:13 -0500 )edit