##// END OF EJS Templates
correct environment rendering
Aron Ahmadia -
Show More
@@ -17,8 +17,7 b' IPython.mathjaxutils = (function (IPython) {'
17 if (window.MathJax) {
17 if (window.MathJax) {
18 // MathJax loaded
18 // MathJax loaded
19 MathJax.Hub.Config({
19 MathJax.Hub.Config({
20 TeX: { equationNumbers: { autoNumber: "AMS", useLabelIds: true },
20 TeX: { equationNumbers: { autoNumber: "AMS", useLabelIds: true } },
21 extensions: ["autoload-all.js"] },
22 tex2jax: {
21 tex2jax: {
23 inlineMath: [ ['$','$'], ["\\(","\\)"] ],
22 inlineMath: [ ['$','$'], ["\\(","\\)"] ],
24 displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
23 displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
@@ -220,11 +219,21 b' IPython.mathjaxutils = (function (IPython) {'
220 return text;
219 return text;
221 }
220 }
222
221
222 function queueRender() {
223 // see https://groups.google.com/forum/?fromgroups=#!topic/mathjax-users/cpwy5eCH1ZQ
224 MathJax.Hub.Queue(
225 ["resetEquationNumbers",MathJax.InputJax.TeX],
226 ["PreProcess",MathJax.Hub],
227 ["Reprocess",MathJax.Hub]
228 );
229 }
230
223 return {
231 return {
224 init : init,
232 init : init,
225 processMath : processMath,
233 processMath : processMath,
226 removeMath : removeMath,
234 removeMath : removeMath,
227 replaceMath : replaceMath,
235 replaceMath : replaceMath,
236 queueRender : queueRender
228 };
237 };
229
238
230 }(IPython)); No newline at end of file
239 }(IPython));
@@ -250,6 +250,8 b' var IPython = (function (IPython) {'
250
250
251 return '<code class="prettyprint">' + code + '</code>';
251 return '<code class="prettyprint">' + code + '</code>';
252 });
252 });
253
254 IPython.mathjaxutils.queueRender()
253 this.rendered = true;
255 this.rendered = true;
254 }
256 }
255 };
257 };
General Comments 0
You need to be logged in to leave comments. Login now