Am new to javascript.Am trying to render a html page that contains both latex and mathml.I am able to render when any one of the latex or mathml is present in html.But am unable to when both of them are present at same time.Used below link for configuration.
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?
config=default">
Could anyone help regarding this.
Here is a sample document that does both:
<!DOCTYPE html>
<html>
<head>
<title>TeX and MathML in one file</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/MathJax.js?config=TeX-MML-AM_CHTML"></script>
</head>
<body>
Both \(1+x\) and <math><mi>x</mi><mo>+</mo><mn>1</mn></math> are the same.
</body>
</html>
Your problem is that you are not using the correct configuration file. The default
configuration is for when you run MathJax from your own server and can eat the default configuration. You can't do the from the CDN, so load one of the pre-defined configurations that processes both TeX and MathML.