I'm trying to implement PageDown and MathJax in my Django application. I followed insctructions here.
My code is working properly and Mathjax is running as it should, except that it doesn't render inline equations.
I've added all required files(Markdown Converter, Markdown Sanitizer, Markdown Editor, Mathjax and Mathjax editing - as described in tutorial)
I'm initializing plugins with code:
var converter1 = Markdown.getSanitizingConverter();
converter1.hooks.chain("preBlockGamut", function (text, rbg) {
return text.replace(/^ {0,3}""" *\n((?:.*?\n)+?) {0,3}""" *$/gm, function (whole, inner) {
return "<blockquote>" + rbg(inner) + "</blockquote>\n";
});
});
var editor1 = new Markdown.Editor(converter1);
var postfix = "";
euni.mathjaxEditing.prepareWmdForMathJax(editor1, postfix, [["$", "$"], ["\\\\(","\\\\)"]]);
editor1.run();
How can i get Mathjax to render inline equations?
As mentioned above, thing like $$2x+5$$ work as expected?
You have to enable inline equations:
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true
}
});
See this older post: https://tex.stackexchange.com/questions/27633/mathjax-inline-mode-not-rendering
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With