Forked from masterdezign/gist:5eb03e834299b8b67750
Last active
March 29, 2021 06:12
-
-
Save pinbo/e9dfe5f60ded913d0e94d1c8516a4149 to your computer and use it in GitHub Desktop.
Remark.js+MathJax essentials
This file contains 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> | |
<title>My Presentation</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<style type="text/css"> | |
.red { color: red } | |
</style> | |
</head> | |
<body> | |
<textarea id="source"> | |
name: Introduction | |
# {{ name }} | |
The name of the slide is {{ name }}. The math is $\alpha+\beta$. | |
Another inline formula is `\(\int_a^bf(x)dx\)`. | |
A formual block is here: | |
$$\bar{X}=\frac{1}{n}\sum_{i=1}^nX_i$$ | |
--- | |
# Shared title | |
.footnote[.red[*] Important footnote] | |
`\(\int_a^bf(x)dx\)` | |
-- | |
1. Intro | |
-- | |
2. Test | |
```python | |
>>> import antigravity | |
``` | |
</textarea> | |
<script src="http://gnab.github.io/remark/downloads/remark-latest.min.js" type="text/javascript"></script> | |
<script src='https://cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML' type="text/javascript"></script> | |
<script type="text/javascript"> | |
var slideshow = remark.create(); | |
// Setup MathJax | |
MathJax.Hub.Config({ | |
tex2jax: { | |
inlineMath: [['$','$'], ['\\(','\\)']], | |
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> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment