Reputation: 16865
I am using MathJax 1.1 in my web site. I need to place some html before and after every math encountered by the processor (tex2jax in my case).
How can I do this?
Should I register a callback?
Should I use some options in configuration?
Upvotes: 0
Views: 151
Reputation: 17333
If all your elements are in one parent element, you maybe could try this:
parent_element * {
width: auto;
}
It worked for me.
Upvotes: 0
Reputation: 12260
This issue was discussed on the MathJax user's forum. You could try something like
<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEX = MathJax.InputJax.TeX;
var PREFILTER = TEX.prefilterMath;
TEX.Augment({
prefilterMath: function (math,displaymode,script) {
math = "\\displaystyle{"+math+"}";
return PREFILTER.call(TEX,math,displaymode,script);
}
});
});
</script>
to add \displastyle{
before and }
after the mathematics. You should put this script before the script that loads MathJax.js
.
Upvotes: 1