commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Brisard <sebastien.bris...@m4x.org>
Subject Re: [all] xdoc vs. apt
Date Tue, 18 Sep 2012 11:04:56 GMT
Hi,

>
> Having something compatible with Mathjax would be a tremendous step forward
> for [math]. I would really love to see this happen!
>

We can in fact make it happen now! In the site.xml file, we just need
to add (in the <body></body> section)

<head>
<script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js'
        type='text/javascript'>
    MathJax.Hub.Config({
        extensions: ["tex2jax.js",
                     "TeX/AmsMath.js",
                     "TeX/AMSsymbols.js"],
        jax: ["input/TeX",
              "output/HTML-CSS"],
        tex2jax: {
            inlineMath: [ ['$','$'] ],
            displayMath: [ ['$$','$$'] ],
            processEscapes: true,
        },
        "HTML-CSS": { availableFonts: ["TeX"] }
    });
</script>
</head>

Any expression in $...$ will be interpreted as inline math, while
$$...$$ will be interpreted as displayed equation. I've just tried it
in an xdoc file, and it works. As allways with MathJax, though, it
makes the page a bit longer to load.

Best,
S├ębastien


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message