LearnFN — Fun, Future‑Ready Digital Skills
May 7, 2025

Math Typesetting

Posted on May 7, 2025  •  One minute  • 133 words
Table of contents

The theme now supports server side rendering of math equations via hugo’s built-in KaTeX rendering engine. No manual activation is needed, you can start using LaTeX math expressions in your Markdown content right away.

Prerequisites

Please enable and configure the passthrough extension in the Hugo configuration file:

markup:
  goldmark:
    extensions:
      passthrough:
        delimiters:
          block: [['\[', '\]'], ['$$', '$$']]
          inline: [['\(', '\)']]
        enable: true

Examples

Both inline and separate paragraph LaTeX math expressions are supported in the Markdown content.

Inline math

Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)

will be rendered as:

Inline math: φ=1+52=1.6180339887\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…

Block math

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

will be rendered as:

φ=1+11+11+11+\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }

Supported functions

Note: Use the online reference of Supported TeX Functions and the support table for reference.

Follow us

Get the latest bite‑sized FN tips and updates