htmljekyllmathjaxjekyll-bootstrap

Mathjax equations displaying 3 times (Jekyll)


I created a website using Jekyll and added MathJax support like so:

<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>
<script type="text/javascript"
        src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

in the _layouts/default.html file.

and I have a *.md file in _posts with

---
layout: post
title: 1st post
---
<div class="Math">
  $$y=x^2$$
</div>
Hello

The equation appears 3 times when I view it in Chrome on my laptop, but it only appears once on Chrome for Android. The site can be seen here: http://texasflood.github.io/

How can I make the equation appear only once?

EDIT:

OK, the problem suddenly disappeared - I don't know why. The strange thing is when I reverted to older commits where the problem was originally not present, the equations were still appearing multiple times, so I don't think it's my actual code. Could anyone shed some light onto this?


Solution

  • A new version (2.5.1) of MathJax was released this morning, and there was a glitch with the file transfer, so the CDN was temporarily left with mixed versions, which caused the tripling of mathematics in some configurations. Your code is not at fault. The issue should be resolved at this point, so if you are still having the problem, try clearing your browser cache and restart the browser. If the problem persists, please report it on the MathJax Issue tracker. There is already an issue there that you could use.