octopress / docs

Source for the octopress.org documentation website
24 stars 30 forks source link

Cannot get MathJax to work on Github, but works in preview #51

Closed robertsawko closed 9 years ago

robertsawko commented 9 years ago

Hi,

I'm just starting my website based on octopress. I really like it so far. The installation was very easy, but I got seriously stuck with MathJax rendering. I already went through several different solutions including kramdown and rdiscount, but none of it works for me. My problem is that equations do not display on the github webpage even though they appear on the preview run locally.

Currently I include

 <script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
      inlineMath: [ ['$', '$'] ],
      displayMath: [ ['$$', '$$']],
      processEscapes: true,
      skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    },
    messageStyle: "none",
    "HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"] }
  });
  </script>
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script>

in my source/_includes/head.html and I surround my equations with dollars or double dollars for display mode. I went through other code snippets for MathJax configuration and I had my configuration in default.html for sometime, but that didn't change anything. I "googled" really hard for this, everyone seems to have a happy relationship with MathJax and github pages and couldn't find anyone with a similar issue which makes me think I may be missing something obvious.

Please let me know if you have any ideas.

robertsawko commented 9 years ago

I need to add one comment to this. I just opened my github website from Firefox but on a different machine and the equations display okay. That's really strange, but it seems that the problem may be in firefox configuration on my laptop.

robertsawko commented 9 years ago

Right, it all boiled down to http secure access. There's a passage in MathJax documentation. Now it all works.