Skip to content

Commit 45ea6b2

Browse files
committed
#33, #1919 Possible missing template fix, bump MathJax to 3.0
1 parent d340552 commit 45ea6b2

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

_includes/head/custom.html

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,9 @@
2424
<meta name="theme-color" content="#ffffff">
2525
<link rel="stylesheet" href="{{ base_path }}/assets/css/academicons.css"/>
2626

27-
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "all" } } }); </script>
28-
<script type="text/x-mathjax-config">
29-
MathJax.Hub.Config({
30-
tex2jax: {
31-
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
32-
processEscapes: true
33-
}
34-
});
35-
</script>
36-
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/latest.js?config=TeX-MML-AM_CHTML' async></script>
27+
28+
<!-- Support for MatJax -->
29+
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
30+
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
3731

3832
<!-- end custom head snippets -->

_pages/markdown.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ redirect_from:
3333

3434
## Resources
3535
* [Liquid syntax guide](https://shopify.github.io/liquid/tags/control-flow/)
36+
* [MathJax Documentation](https://docs.mathjax.org/en/latest/)
37+
38+
## MathJax
39+
40+
Support for MathJax Version 3.0 is included in the template:
41+
42+
$$
43+
\displaylines{
44+
\nabla \cdot E= \frac{\rho}{\epsilon_0} \\\
45+
\nabla \cdot B=0 \\\
46+
\nabla \times E= -\partial_tB \\\
47+
\nabla \times B = \mu_0 \left(J + \varepsilon_0 \partial_t E \right)
48+
}
49+
$$
50+
51+
The default delimiters of `$$...$$` and `\\[...\\]` are supported for displayed mathematics, while `\\(...\\)` should be used for in-line mathematics (ex., \\(a^2 + b^2 = c^2\\))
52+
53+
**Note** that since Academic Pages uses Markdown which cases some interference with MathJax and LaTeX for escaping characters and new lines, although [some workarounds exist](https://math.codidact.com/posts/278763/278772#answer-278772).
3654

3755
## Markdown guide
3856

@@ -65,7 +83,8 @@ Single line blockquote:
6583
| Header1 | Header2 | Header3 |
6684
|:--------|:-------:|--------:|
6785
| cell1 | cell2 | cell3 |
68-
| cell4 | cell5 | cell6 |
86+
| cell4 | ce
87+
ll5 | cell6 |
6988
|-----------------------------|
7089
| cell1 | cell2 | cell3 |
7190
| cell4 | cell5 | cell6 |

0 commit comments

Comments
 (0)