This document records some of the technical caveats of using the Hugo framework for blogging and site building
MathJax Fixes
- for math always use $\ast$ (
$\ast$
) rather than$*$
, otherwise you run into rendering trouble - never use
$\mathbf{u}_i$
e.g., mathbf with subscript; this wouldn’t work in many cases. It is better to use tensor convention instead, e.g.,$\underline{u}_i$
, rendered as $\underline{u}_i$ for rank-1 tensor. - the
$$\begin{aligned} end{aligned}$$
needs major adjustments to work with MathJax on Github Pages! For multiline equations, need to:- escape the newline!
\\\
instead of\\
in align and aligned, where there should be NO space before and after\\\
. - The
$$
and\begin{aligned}
should be on the same line, same for\end{aligned}
- escape the newline!
$$\begin{aligned} & x = a\\ & y = b\\ & z = c \end{aligned}$$
is written verbatim as:
$$\begin{aligned}
& x = a\\\
& y = b\\\
& z = c
\end{aligned}$$
- The subscript notation is the most annoying part 😢, you have to use
$$x\_{a}$$
for writing equations (e.g., in align and aligned), to escape the special character_
, and you write standard$x_a$
when inline! e.g., $x_a$ inline, and
$$ x_{a} = 3 \text{ in equation} $$
in equation, written vertatim as:
x\_{a} = 3 \text{ in equation}