Search code examples
latexmathjax

Mathjax Latex symbol square and triangle size


I have an application that uses MathJax to display some latex. It displays most things just fine, however when I want to display a square with the command \square.

I'm trying this latex code as a test: \triangle \Box \square \bigtriangleup \blacksquare

It generates this: Mathjax squares and triangles

But when I generate the same commands on the mathjax site I get this: MathJax symbols as it should be

I have included the AMSsymbols library like this:

MathJax.Hub.Config({
    TeX: {
        extensions: ['AMSsymbols.js']
    },
    'HTML-CSS': {
        styles: {
            '.MathJax_Display': {
                margin: '3px 0px'
            }
        }
    }
});

Can anyone tell me what I'm doing wrong?


Solution

  • Thanks to Davide Cervone I found how to fix this. I forced my application to use the CommonHTML output renderer by adding to my config.

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