cjlee112 / spnet

selected papers network web engine
http://thinking.bioinformatics.ucla.edu/2011/07/02/open-peer-review-by-a-selected-papers-network/
GNU General Public License v2.0
40 stars 11 forks source link

MathJax support #24

Closed fgdorais closed 11 years ago

fgdorais commented 11 years ago

Please enable MathJax everywhere it makes sense!

sir-deenicus commented 11 years ago

@cjlee112 - Something like MathJax.Hub.Queue(["Typeset",MathJax.Hub]); ?

pkra commented 11 years ago

@cjlee112 what @sir-deenicus wrote. See our docs at http://docs.mathjax.org/en/latest/typeset.html

nilesjohnson commented 11 years ago

On Mac OS, the "treat $ as inline math" button is working in Firefox and Safari, but not Chrome! In Chrome (for me) the button correctly toggles $ to ( ), but doesn't compile the math. Even when I visit a page where SPnet already thinks $ should be used for inline math, Chrome just shows ( and ). For example this abstract:

https://selectedpapers.net/arxiv/0809.0838

nilesjohnson commented 11 years ago

I tried this on a local install of spnet, and Chrome does render the math there. Checking the Chrome console, I read the following error:

The page at https://selectedpapers.net/arxiv/0809.0838 ran insecure content from http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML,Safe

The difference must be that the local site is served over http, while the live site is served over https. Googling around, I discovered the following in MathJax FAQ:

http://www.mathjax.org/resources/faqs/#problem-https

It says that getting content from the CDN over https is not available from the default address, but is available from the less-memorable but equally-functional alternate

https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js

cjlee112 commented 11 years ago

Great catch, Niles! I guess I'll switch to the https CDN address.

cjlee112 commented 11 years ago

switched to https CDN. Please test that this fixes the Chrome problem you observed. Thanks!

nilesjohnson commented 11 years ago

Indeed the problem I observed is resolved; Chrome console shows no errors.