: How to configure Mathjax in Mediawiki? I want to render latex on a mediawiki installation that I don't have shell access to. I've tried and failed to use the Math installation, so I'd like
I want to render latex on a mediawiki installation that I don't have shell access to.
I've tried and failed to use the Math installation, so I'd like to include the equivalent of these two scripts in my mediawiki header, so that the scripts are used on all skins. Where can I include the scripts?
<script type='text/x-mathjax-config'>
MathJax.Hub.Config({ TeX: { equationNumbers: {autoNumber: 'all'} } });
</script>
<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&ver=3.5.1'>
</script>
I tried including the second script by editing in the browser ..wiki/index.php/Mediawiki:Common.js and ..wiki/index.php/Mediawiki:Mobile.js, adding
mw.loader.load( 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&ver=3.5.1' )
Where can I add the MathJax.Hub.Config script?
More posts by @Caterina187
1 Comments
Sorted by latest first Latest Oldest Best
I deleted everything in Mediawiki:Common.js and put it all in wiki/includes/OutputPage,php
i.e. I changed
$ret .= $this->buildCssLinks();
$ret .= $this->getHeadScripts() . "n";
to
$ret .= $this->buildCssLinks();
$ret .= "
<script type='text/x-mathjax-config'>
MathJax.Hub.Config({ TeX: { equationNumbers: {autoNumber: 'all'} } });
</script>
<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&ver=3.5.1'></script> n";
$ret .= $this->getHeadScripts() . "n";
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.