Skip to content

Commit

Permalink
#33, #1919 Possible missing template fix, bump MathJax to 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzupkoii committed Feb 17, 2024
1 parent d340552 commit 45ea6b2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
14 changes: 4 additions & 10 deletions _includes/head/custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="{{ base_path }}/assets/css/academicons.css"/>

<script type="text/x-mathjax-config"> MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "all" } } }); </script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true
}
});
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/latest.js?config=TeX-MML-AM_CHTML' async></script>

<!-- Support for MatJax -->
<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/es5/tex-mml-chtml.js"></script>

<!-- end custom head snippets -->
21 changes: 20 additions & 1 deletion _pages/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@ redirect_from:

## Resources
* [Liquid syntax guide](https://shopify.github.io/liquid/tags/control-flow/)
* [MathJax Documentation](https://docs.mathjax.org/en/latest/)

## MathJax

Support for MathJax Version 3.0 is included in the template:

$$
\displaylines{
\nabla \cdot E= \frac{\rho}{\epsilon_0} \\\
\nabla \cdot B=0 \\\
\nabla \times E= -\partial_tB \\\
\nabla \times B = \mu_0 \left(J + \varepsilon_0 \partial_t E \right)
}
$$

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\\))

**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).

## Markdown guide

Expand Down Expand Up @@ -65,7 +83,8 @@ Single line blockquote:
| Header1 | Header2 | Header3 |
|:--------|:-------:|--------:|
| cell1 | cell2 | cell3 |
| cell4 | cell5 | cell6 |
| cell4 | ce
ll5 | cell6 |
|-----------------------------|
| cell1 | cell2 | cell3 |
| cell4 | cell5 | cell6 |
Expand Down

0 comments on commit 45ea6b2

Please sign in to comment.