pankan
pankan

Reputation: 47

deploy mathjax in google app engine

I am building a simple website with google app engine. I am trying to write mathematical expressions in a html document by using mathjax. The code in the html document is:

<html>
<head>
<title> Home page </title>
<link rel="stylesheet" type="text/css" href="/stylesheets/style.css">
<script type="text/javascript"
  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body>
$$x^2 = \frac{1}{2}$$
</body>
</html>

When I use the same html code outside of the GAE the expression is displayed normally. When I run it through GAE the expression is displayed as $$x^2 = \frac{1}{2}$$. My app.yaml is:

runtime: python27
api_version: 1
threadsafe: true

handlers:

- url: /.*
  script: main.app

Do i have to change something in app.yaml? Can anyone help me?

Upvotes: 1

Views: 75

Answers (2)

pankan
pankan

Reputation: 47

thanks a lot, I also added the follow script between the head tag and over the other script and it worked fine:

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>

Upvotes: 0

snakecharmerb
snakecharmerb

Reputation: 55679

If you view the content of the the source url in your document http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML you'll see that it's a script that displays a console warning:

console.warn('WARNING: cdn.mathjax.org has been retired. Check https://www.mathjax.org/cdn-shutting-down/ for migration tips.')

The page referenced in the warning message provides alternative cdn urls that you can use instead of the retired url.

Upvotes: 1

Related Questions