pagedown - Weird timing issue with Mathjax -


i'm using mathjax pagedown in pretty straight forward way.

initmathjax(converter);  var html = converter.makehtml(text); var $pagetext = ...; $pagetext.html(html); 

this works of time when run site locally, , never works when run in production. result can vary between each reload, think there kind of race condition based on how long takes various scripts load , run.
i've tried doing mathjax.hub.reprocess() , such, don't seem help. doing mathjax.hub.queue(["typeset", mathjax.hub, $pagetext.get(0)]); 100ms after above code seems have fixed issue. feels patch, , font looks off in production. (looks mathjax generated html ends in <span class="mathjax_preview">, rather <span class="mathjax">).
want understand issue can fix it. thanks!


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -