Created
December 4, 2017 14:51
-
-
Save gaoxiaoliangz/49f2bb0a05585974b8272b8def08919a to your computer and use it in GitHub Desktop.
mathjax example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="initial-scale=1, viewport-fit=cover"> | |
<script type="text/x-mathjax-config"> | |
MathJax.Hub.Config({ | |
showProcessingMessages: false, | |
tex2jax: { | |
inlineMath: [['$', '$'], ['\\(', '\\)']], | |
displayMath: [['$$', '$$'], ['\\[', '\\]']], | |
processEscapes: true | |
}, | |
TeX: { | |
equationNumbers: { autoNumber: 'AMS' } | |
}, | |
}); | |
</script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> | |
</head> | |
<body id="root" data-document> | |
$$J(\theta_0, \theta_1) = \dfrac{1}{2m} \displaystyle | |
\sum_{i=1}^m \left (\hat{y}_{i}- y_{i} \right)^2 = \dfrac {1}{2m} \displaystyle \sum_{i=1}^m \left (h_\theta (x_{i}) - y_{i} \right)^2$$ | |
</body> | |
<script src="main.js"></script> | |
<script> | |
const update = () => { | |
MathJax.Hub.Queue( | |
['Typeset', MathJax.Hub, this.buffer], | |
['resetEquationNumbers', MathJax.InputJax.TeX], | |
) | |
} | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment