I have tried loading MathJax through a Google Sites HTML Box. But I can't get the JS to load.

Does anyone have another solution for getting the JS to load or LaTeX into Google Sites?

  • Google Sites does not allow us to load raw JavaScript. Jacob's answer might be the solution to create formula's and equations. – Ifan Iqbal Feb 27 '13 at 23:55

My first attempt to Google on this topic yielded in a first hit: search result LATEX Google Sites.

On the following two websites, it is explained how to show the LATEX on Google Sites:

  1. Use LaTeX on Google Site
  2. Google's LaTeX

See snapshot of last reference:

enter image description here

  • Seems hackish, but you have no choice since Google does not allow you to load raw JS in Google Sites (only allowed in Blogger). – Hydra Feb 24 '13 at 1:55

Google sites seems to be displaying typeset math from Jupyter notebook saved as html now (March 22, 2020):

I saved a Jupyter notebook as html today. I opened my Google sites in New mode (not classic I believe) and selected (by double tapping white space on the open page in edit mode) "embed" (think that was it, not too many options, e.g., text, image and insert html which was labelled "embed" I think). I had an option to link to some online code or insert the html directly, which latter option I selected.

I opened the saved html file of my notebook from Jupyter in another browser window (a Firefox browser actually, I was working in Chrome on sites), selected "see source" and then copied that html source and pasted it into the Google sites insert window/box. It took it and I expanded the insert window somewhat (was a little small default).

I then previewed it and was amazed to see all the LaTex (Jupyter version, MathJax really) in the html file displaying typeset math perfectly. I though, ok, this must be Chrome using my local Mathjax support, so I published the site, closed the browsers, cleared caches and went back online to look at the page url without being signed in.

It displayed typeset MathJax perfectly: MSW graphing code

I note that the first link in the accepted answer no longer is active, i.e., Use Latex on Google Site now responds with a 404 error.

I looked at the html that the Jupyter notebook produced and discovered that it loads js in the head and then loads MathJax from a cloud source. I won't reproduce all that here, but if you go to my MSW graphing code link above and view page source you can obtain the js and MathJax loader, may be more interesting to many than the process by which I arrived at the successful display.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.