How MathJax works?

72 views
Skip to first unread message

wangzhi...@gmail.com

unread,
May 21, 2013, 2:36:20 PM5/21/13
to mathja...@googlegroups.com
Hello alI,

I am new to MathJax. I am trying to develop a stand alone local MathJax rendering component for Qt. With Phantomjs and QScriptEngine, I could get the screen shot of the html page. However, there is a problem, the MathJax rendering is not there. I tried to open the HTML page with chrome browser, and MathJax works fine. To eliminate the possibility of Phatmomjs failing to execute in page javascript, I added a small testing javascript. The result is, in page testing javascript was executed, but the MathJax javascript failed as before. The attached png is the screenshot result from phantomjs. Does anyone have a clue?
google.png

Davide P. Cervone

unread,
May 21, 2013, 6:58:24 PM5/21/13
to mathja...@googlegroups.com
Since MathJax runs after the page is loaded, you need to make sure you give it time to do its work.  I suspect you are taking the snapshot too soon, and so MathJax hasn't run yet.  You need to synchronize your snapshot with MathJax.

See the code sample at


as this does handle the synchronization with phantom.js.  Perhaps you can use a similar approach in your situation.  Otherwise, you may need to give the actual code you are working with, since we really have nothing to go on here.

Davide


On May 21, 2013, at 2:36 PM, <wangzhi...@gmail.com> <wangzhi...@gmail.com> wrote:

Hello alI,

I am new to MathJax. I am trying to develop a stand alone local MathJax rendering component for Qt. With Phantomjs and QScriptEngine, I could get the screen shot of the html page. However, there is a problem, the MathJax rendering is not there. I tried to open the HTML page with chrome browser, and MathJax works fine. To eliminate the possibility of Phatmomjs failing to execute in page javascript, I added a small testing javascript. The result is, in page testing javascript was executed, but the MathJax javascript failed as before. The attached png is the screenshot result from phantomjs. Does anyone have a clue?

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
<google.png>

Bill Wang

unread,
May 21, 2013, 7:38:48 PM5/21/13
to mathja...@googlegroups.com
Thank you very much. I got what I need from the discussion you pointed me to.


--
You received this message because you are subscribed to a topic in the Google Groups "MathJax Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mathjax-users/93lfq7vUyrE/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to mathjax-user...@googlegroups.com.

Davide P. Cervone

unread,
May 21, 2013, 7:42:56 PM5/21/13
to mathja...@googlegroups.com
> Thank you very much. I got what I need from the discussion you pointed me to.

Great! Let us know what you come up with in the end.

Davide

Reply all
Reply to author
Forward
0 new messages