<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEX = MathJax.InputJax.TeX,
MML = MathJax.ElementJax.mml;
TEX.Definitions.macros.middle = "myMiddle";
TEX.Parse.Augment({
myMiddle: function (name) {
var delim = this.GetDelimiter(name);
this.Push(MML.mo(delim).With({stretchy: true}));
}
});
});
</script>
before the <script> that loads MathJax.js in order to implement it
yourself. (You can also make your own configuration file that
contains the startup hook and load that along with your main
configuration file if that is more convenient).
Davide