LaTeX Troubleshooting MathJax.js Load Error on PF Website

  • Thread starter Thread starter KenJackson
  • Start date Start date
  • Tags Tags
    latex mathjax
AI Thread Summary
The discussion centers around issues with loading a MathJax script from cdnjs.cloudflare.com, which is necessary for rendering LaTeX on web pages. A user encountered a connection error when trying to fetch the script, leading to questions about whether others were experiencing similar issues. It was confirmed that LaTeX was rendering properly for some users, indicating that the problem was not widespread. The original poster later identified that the issue stemmed from a previous entry in their /etc/hosts file, which redirected requests for cdnjs.cloudflare.com to 127.0.0.1 due to an annoying ad. After removing this entry, the script loaded correctly, resolving the rendering issue.
KenJackson
Messages
63
Reaction score
10
The web pages at PF include this script, which won't load, so latex is not rendered:
https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js

When I try to fetch it with curl, I get an error:
"Failed to connect to cdnjs.cloudfare.com port 443: Connection refused"

Am I the only one? Is latex being rendered for anyone right now? If it is, why can you access the script, but I can't?
 
Physics news on Phys.org
The .js is loading fine for me, and Latex is rendering properly.
 
Works perfectly here.
 
Solved the problem. It was only on my PCs.

Over the years, I've been annoyed by various online ads, some that even seem to get through adblock plus. So I find the offending URL and define it to 127.0.0.1 in /etc/hosts. As it turned out, cdnjs.cloudflare.com must have hosted an annoying ad at some point because I had it in /etc/hosts.

I removed it and now everything is fine.
 
  • Like
Likes Greg Bernhardt and Tom.G

Similar threads

Back
Top