MathJax support

Iara Authors
· 1 min read

Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.

Usage

To use MathJax all you need to do is set mathjax to true in Front Matter.

Yaml

1
2
3
4
title: MathJax support
date: 2020-09-01
description: A brief guide to setup MathJax
mathjax: true

TOML

1
2
3
4
title = "MathJax support"
date = "2020-09-01"
description = "A brief guide on MathJax"
mathjax = true

Examples

Inline Math

1
2
3
{{< math.inline >}}
\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
{{</ math.inline >}}
\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)

Block Math

1
2
3
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } 
$$

$$ \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } $$