I want to build a Template:MathJax page that will automatically add the following script call to any page/article that has this template included.
<script type="text/javascript" src="https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
This script call needs to be placed as a header in an HTML based page according to the sources as its purpose is to render Latex/Tex or MathML inputs into something viewable to the browser. I want to get this same result in Mediawiki 1.17. I am aware that I can install Extension:MathJax but that will require constant maintaining & updating as this is a somewhat active system. It just seems to me that a template is a better way to do this. I am open to suggestions or ideas. I figure this is a tag thing but do not have enough experience to do this quickly. Thanks! frosty
On Thu, Dec 8, 2011 at 8:44 AM, John W. Foster jfoster81747@gmail.comwrote:
I want to build a Template:MathJax page that will automatically add the following script call to any page/article that has this template included.
<script type="text/javascript" src=" https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML "> </script>
You would need to either:
* write an extension to add the actual HTML, and use that from your template
or
* write some JavaScript in your MediaWiki:Common.js to detect your template and load the MathJax JS
This should be fairly straightforward, something like:
if ($('.mathjax-template').length > 0) { mw.loader.load(' https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-A... '); }
where your template has a <span class="mathjax-template"> in it or such.
-- brion
/me loves Brion Vibber
-- View this message in context: http://wikimedia.7.n6.nabble.com/Template-design-question-tp1345971p2286783.... Sent from the WikiMedia General mailing list archive at Nabble.com.
mediawiki-l@lists.wikimedia.org