Skip to content

Commit 0f46e19

Browse files
authored
Add MathJax support (#43)
Signed-off-by: Harry Mellor <[email protected]>
1 parent 4d264ee commit 0f46e19

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

Diff for: README.md

+16
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ To add a new blogpost, please refer to `_posts/2023-06-20-vllm.md` as an example
1515

1616
The blog is automatically built and deployed by GitHub Actions when `main` is pushed to.
1717

18+
## LaTeX Math
19+
20+
The blog supports LaTeX math via [MathJax](https://docs.mathjax.org/en/latest/index.html).
21+
22+
It can be enabled by adding `math: true` to the document frontmatter. It has been configured to support the standard LaTeX style math notation, i.e.:
23+
24+
```latex
25+
$ inline math $
26+
```
27+
28+
```latex
29+
$$
30+
math block
31+
$$
32+
```
33+
1834
## Theme customization
1935

2036
The theme we are using is [Minima](https://github.com/jekyll/minima). If you need to customise anything from this theme, see [Overriding theme defaults](https://jekyllrb.com/docs/themes/#overriding-theme-defaults).

Diff for: _includes/custom-head.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% if page.math %}
2+
<script>
3+
MathJax = {
4+
tex: {
5+
inlineMath: [['$', '$'], ['\\(', '\\)']],
6+
displayMath: [['$$', '$$'], ['\\[', '\\]']]
7+
}
8+
};
9+
</script>
10+
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
11+
</script>
12+
{% endif %}

0 commit comments

Comments
 (0)