MathJAX on Google Sites

3,676 views
Skip to first unread message

Peter

unread,
Aug 28, 2011, 2:49:29 PM8/28/11
to MathJax Users
I know this has been hashed out on several other forums, but I was
wondering if anyone had a successful use of MathJAX on their google
site, or any thoughts on making it work.

Davide P. Cervone

unread,
Aug 29, 2011, 2:23:38 PM8/29/11
to mathja...@googlegroups.com
Because of the way that Google Sites isolates any imported content
(like widgets), I do not think that it is possible to get MathJax to
work with Google Sites. (It didn't seem to be the last time I tried
it.) If anyone has figured out a way, I would be happy to hear it.

Davide

Marc Grober

unread,
Aug 29, 2011, 4:41:00 PM8/29/11
to mathja...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I was wondering whether this would be possible once Google made
scripts available, but I don't have ready access to a google apps
domain with scripting. There is a greasemonkey solution for gmail,
but that won't work with google docs.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOW/lbAAoJEMCi9wxDaNqEvBEH+gIDNBNCc16njAc8Yl+1vo5A
HLg8y+qI0OKwX3UNt/sTaKPCno06Gxh/SQp8w5drI1415z5eeEwgqm8st8BMcqcv
UkVr8dOb3W3K7XHdDEXmBvtDZdhXBP6cqjkcCmeEFPze006S6JIwmslbSDfHJF95
VNGYvyTAwvJzaIb5SiF60hJiYwjJTVDIN6kTI457ZmBsoBzh9fTiN2xFr+kqvYQO
oA4qR06a/5JRhwPgBRdLir+7n7MCJOhzbcS3DcufYaTpvcpQGzDFWejR3Br1LK52
rfeNR99g1ADmQAycnTqiFsIpN8H/gkBYie1eErbZVo0RhjOYcKTU+pCbOnkFiJ0=
=8uDH
-----END PGP SIGNATURE-----

Davide P. Cervone

unread,
Aug 29, 2011, 6:18:55 PM8/29/11
to mathja...@googlegroups.com
My understanding is that you can only add javascript to a Google Site
through a Gadget, and the last time I looked into it, each gadget runs
in its own iframe in order to isolate it from the site as a whole.
The iframe source location is set up specifically so that it can't
interact with the outside window, and so even if you loaded MathJax,
it would only be in the iframe, and it could not get to the rest of
the page. This is deliberate on the part of Google for security
reasons, and as far as I can tell, there is no way to insert custom
javascript into the page itself. And if we found a way, they would
more than likely modify their code to block it, as it is a design
decision to not allow javascript in a Google Site.

I'm afraid that makes using MathJax in a Google Site pretty much
impossible. I would be happy if someone would correct me on this, but
that is my reading of the documentation, and the conclusion I reached
by experiments with Google Apps Scripts.

Davide

Bas Braams

unread,
Mar 6, 2012, 4:02:44 PM3/6/12
to mathja...@googlegroups.com
Recently (possibly as recent as today, 2012-03-06), css and javascript were added to Google Sites as described in the Help page [1]. Would that make it possible to use MathJax in Google Sites? Can we have instructions if it is indeed possible? Google Sites had no mathematics capability at all beyond text subscripts and superscripts, so it changes things materially if it is now possible to use MathJax.

[1] Insert custom HTML, CSS, and Javascript

Christian Perfect

unread,
Mar 6, 2012, 4:38:43 PM3/6/12
to mathja...@googlegroups.com
I've just spent 15 minutes or so trying to load MathJax from the CDN
in Google Sites, following the instructions on mathjax.org. I can't
get it to work.

I also tried my insertion-via-javascript method which works on other
sites (see http://checkmyworking.com/2012/01/how-to-get-beautifully-typeset-maths-on-your-blog/)
and that fails with a lot of mysterious errors.

I think google's Caja security thing
(http://code.google.com/p/google-caja/) is preventing MathJax from
doing the clever things it does.

cp

Davide P. Cervone

unread,
Mar 6, 2012, 4:45:36 PM3/6/12
to mathja...@googlegroups.com
I spent a little bit longer than that, and am convinced that it will
not be possible. Their Caja security thing is trying its best to
prevent us from doing what we need for this. I suspect that even if
we figured out a way to do it, they would quickly shut that down. So
I think the answer is still "no". :-(

Davide

Bas Braams

unread,
Mar 7, 2012, 3:27:22 PM3/7/12
to mathja...@googlegroups.com
Thank you Christian and Davide. I just added a comment to an earlier conversation on the Google Sites forum [1]. Google Sites has no specialized mathematics capability at all, so for them enabling MathJax should be all gain, no pain. There is no legacy TeX/LaTeX interface that needs to be broken and no issue of compatibility with any history.

[1] Re: Mathjax in google sites


On Tuesday, March 6, 2012 10:45:36 PM UTC+1, Davide Cervone wrote:

Antonio Vandré Pedrosa Furtunato Gomes

unread,
Apr 4, 2022, 7:19:02 AM4/4/22
to MathJax Users

Debasish Chatterjee

unread,
Jun 6, 2022, 1:11:30 PM6/6/22
to MathJax Users
Thank you, but any idea about the procedure?

Niklas Pirnay

unread,
Aug 7, 2022, 3:51:29 PM8/7/22
to MathJax Users
How did you get it to work?

Fred Hickernell

unread,
Dec 12, 2022, 6:41:53 PM12/12/22
to MathJax Users
Yes, I would like to know as well.
Message has been deleted

R-Squared Mathematics

unread,
Oct 30, 2023, 8:39:05 PM10/30/23
to MathJax Users
I did it, I used the Mathjax library and made a great website on Google Sites. 
Check Out - https://www.rsquaredmathematics.in/practice-questions-mathematics-for-net-iit-jam-gate
I used full embedding of the pages to do so. 
Reply all
Reply to author
Forward
0 new messages