Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
This theme supports KaTeX.
- When using a
math
code block orkatex
shortcode, KaTeX is activated automatically. - To manually enable KaTeX globally set the parameter
math
totrue
in a project’s configuration file. - To enable KaTeX on a per page basis include the parameter
math: true
in the frontmatter of the content files.
Note: Use the online reference of Supported TeX Functions
Examples
Inline
Such as \\(\KaTeX\\)
() and $\LaTeX$
().
Block
Math code block(recommended)
The probability of getting heads when flipping coins is:
Comments