mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-21 07:46:30 -05:00
add mathjax support
This commit is contained in:
parent
c2c9e42456
commit
3fcbe790af
2 changed files with 22 additions and 0 deletions
|
@ -5,6 +5,9 @@
|
|||
using the <a href="https://github.com/koirand/pulp/">pulp</a> theme.
|
||||
</p>
|
||||
</footer>
|
||||
{{ if .Params.mathjax }}
|
||||
{{ partial "mathjax_support.html" . }}
|
||||
{{ end }}
|
||||
{{- range .Site.Params.custom_js -}}
|
||||
<script src="{{ . }}"></script>
|
||||
{{ end }}
|
||||
|
|
19
layouts/partials/mathjax_support.html
Normal file
19
layouts/partials/mathjax_support.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||
<script id="MathJax-script" async
|
||||
src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js">
|
||||
</script>
|
||||
<script>
|
||||
MathJax.Hub.Config({
|
||||
tex2jax: {
|
||||
inlineMath: [['$','$'], ['\\(','\\)']],
|
||||
displayMath: [['$$','$$'], ['\[','\]']],
|
||||
processEscapes: true,
|
||||
processEnvironments: true,
|
||||
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre','code'],
|
||||
TeX: {
|
||||
equationNumbers: { autoNumber: "AMS" },
|
||||
extensions: ["AMSmath.js", "AMSsymbols.js"]
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Reference in a new issue