Math

MathJax

MathJax can be used to render Math formulas. For example, \(a^2 + b ^ 2 = c\).

To enable it, add the following to page.headHtml of YAML configuration or Markdown frontmatter.

page:
  headHtml: |
    <snippet var="js.mathjax" />

Demo

When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

KaTeX

KaTeX can be used as an alternative to MathJax. Just like MathJax, it renders math specified between dollar signs.

To enable it:

page:
  headHtml: |
    <snippet var="js.katex" />
Links to this page