LaTeX Formula
$\KaTeX$ is used to render LaTeX math expressions. Enable this by setting math
to true
in frontmatter
.
Markdown
---
title: "My Page with LaTeX"
math: true
---
When enabled, scripts, stylesheets and fonts from KaTeX will be automatically included in your website. This allows you to use LaTeX math expressions in Markdown content.
Example
Markdown content supports LaTeX math expressions inline and in separate paragraphs.
Inline
page.md
This $\sigma(z) = \frac{1}{1 + e^{-z}}$ is inline.
This $\sigma(z) = \frac{1}{1 + e^{-z}}$ is inline.
Independent paragraphs
page.md
$$F(\omega) = \int_{-\infty}^{\infty} f(t) e^{-j\omega t} \, dt$$
Will be rendered as:
$$F(\omega) = \int_{-\infty}^{\infty} f(t) e^{-j\omega t} , dt$$
Supported features
For a list of supported symbols, go to Formulas supported by KaTeX.
Chemical expressions
Chemical expressions are supported by mhchem.
Inline: $\ce{H2O}$ is water.
Independent paragraphs:
page.md
$$\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}$$
$$\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}$$