Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrieleT0 committed Sep 20, 2023
1 parent 9a53a36 commit ddd82b9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ plugins:
relative_links:
enabled: true
collections: true
usemathjax: true
include:
- index.md
usemathjax: true
- index.md
24 changes: 24 additions & 0 deletions docs/_includes/_mathjax_support.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: {
autoNumber: "AMS"
}
},
tex2jax: {
inlineMath: [ ['$', '$'] ],
displayMath: [ ['$$', '$$'] ],
processEscapes: true,
}
});
MathJax.Hub.Register.MessageHook("Math Processing Error",function (message) {
alert("Math Processing Error: "+message[1]);
});
MathJax.Hub.Register.MessageHook("TeX Jax - parse error",function (message) {
alert("Math Processing Error: "+message[1]);
});
</script>
<script type="text/javascript" async
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>

6 changes: 2 additions & 4 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<head>
{% if page.usemathjax %}
<script type="text/javascript" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
</script>
{% if page.use_math %}
{% include mathjax_support.html %}
{% endif %}
</head>

0 comments on commit ddd82b9

Please sign in to comment.