Question

Like, when I have my piece of Math in my div, it would look like this, where I have set the padding of my div to 0:

Even when I set the padding of my wrapper div to zero.

So, is there a way to change the value of the padding of the math?

Was it helpful?

Solution

Found from here (and to believe I answered this question, and forgot about it):

MathJax.Hub.Config({
    jax: ["input/TeX","output/HTML-CSS"],
    displayIndent: "2em"
});

OTHER TIPS

The simplest way to customize this would be call MathJax.Hub.Config(...) before you load the MathJax config file in your header. For example:

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    "HTML-CSS": {
        styles: {
            ".MathJax nobr": {
                padding: "0.2em 0.2em"
            },
        }
    }
});
</script>
<script type="text/javascript" src="/path/to/MathJax.js?config=TeX-AMS_HTML" charset="utf-8"></script>

Where you change the path to your MathJax installation.

Alternatively, you can either modify an existing config file or setup your own config via the method outlined here: http://docs.mathjax.org/en/latest/configuration.html#config-files

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top