-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add mathjax to index.html #10
Comments
I have tried to add the following code to index.html inside body block. However it does not work. <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML&delayStartupUntil=configured" type="text/javascript"></script>
<script>
var slideshow = remark.create();
MathJax.Hub.Config({
tex2jax: {
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
}
});
MathJax.Hub.Queue(function() {
$(MathJax.Hub.getAllJax()).map(function(index, elem) {
return(elem.SourceElement());
}).parent().addClass('has-jax');
});
MathJax.Hub.Configured();
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"],["\[","\]"]]},
});
</script> |
See #5 |
Thanks very much. The problem is that rendering MathJax is really slow than directly using remarkjs |
It seems the math will be rendered randomly... Sometime it even does not work! |
Not really a backslide related issue then. It's maybe your network, since MathJax loads a bunch of files, is quite heavy and cannot be inlined to work offline. You should try KaTeX. |
Thanks very much. KaTex is much faster indeed. |
I'll close the issue then, thanks for the feedback. |
as titled.
The text was updated successfully, but these errors were encountered: