Google sites embedd

38 views
Skip to first unread message

jon Norberg

unread,
Feb 2, 2011, 4:07:28 AM2/2/11
to MathJax Users
Hi,

I have tried getting mathjax to work with the somewhat cumbersome code-
wrapper gadget in google sites but can't get it to work.

as far as I understand there needs to be 1) the javascript to the
mathjax install (I borrow the official one here) and 2) the equation
somewhere in the text.

so I put <script type="text/javascript" src="http://mathjax.org/
mathjax/MathJax.js"></script>
into the codewrapper gadget and then the example $$x = {-b \pm
\sqrt{b^2-4ac} \over 2a}.$$ into the text.

won't work...

anyone know how to make it work?

Thanks, Jon

lexeii

unread,
Feb 3, 2011, 6:56:21 PM2/3/11
to MathJax Users
Jon, please read this: http://www.mathjax.org/resources/docs/?/installation.html#notes-about-shared-installations

Its not an answer how to make it work, but some thoughts why it don't
works.
Message has been deleted

Davide P. Cervone

unread,
Feb 10, 2011, 1:19:36 PM2/10/11
to mathja...@googlegroups.com
I don't think you are going to be able to get this to work. Google
Sites inserts gadgets on the page using a separate iframe for each
gadget, and the contents of that iframe can't access the contents of
the surrounding window. This is because the iframe contents comes
from a different domain than the window that contains it, so the
browser's same-origin security policy prevents the iframe from
accessing the containing window. From the looks of things, Google
Sites has done this on purpose to isolate the gadget from the rest of
the page, preventing it from affecting the site outside of the frame
that it is given when you add it to the page.

I don't see any way around this in Google Sites. if you come up with
one, I'd be very interested in hearing about it.

Davide

varman...@gmail.com

unread,
May 24, 2013, 2:31:35 AM5/24/13
to mathja...@googlegroups.com

I too tried it several ways but failed.  It disappointed me as my entire site (a math website) includes math equations.  I am able to do it very easily on a website hosted elsewhere.  The above is an except from my other website.  It would be nice if google provides this facility with google sites.

Thanks
Reply all
Reply to author
Forward
0 new messages