I would like to call a javascript Print()
function when the js library MathJax finishes to process the visited web page.
At the moment the Print()
function is triggered using onload
but it seems to stop the Processing Math task of MathJax (demo here); users need to dismiss the browser's Print pop-up to lets MathJax finishes its processing.
I would like to be able to call Print()
just when Processing Math in MathJax reaches 100%.
Any ideas?
Push the Print command onto the MathJax processing queue so that it will be called after MathJax finishes typesetting the page. E.g.,
MathJax.Hub.Queue(Print);
or
MathJax.Hub.Queue(function () {
// do stuff here
Print();
});
See the documentation at
http://www.mathjax.org/resources/docs/?queues.html#the-mathjax-processing-queue
for more details.
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