This document records some of the technical caveats of using the Hugo framework for blogging and site building

MathJax Fixes

  1. for math always use $\ast$ ($\ast$) rather than $*$, otherwise you run into rendering trouble
  2. 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.
  3. the $$\begin{aligned} end{aligned}$$ needs major adjustments to work with MathJax on Github Pages! For multiline equations, need to:
    1. escape the newline! \\\ instead of \\ in align and aligned, where there should be NO space before and after \\\.
    2. The $$ and \begin{aligned} should be on the same line, same for \end{aligned}

$$\begin{aligned} & x = a\\ & y = b\\ & z = c \end{aligned}$$

is written verbatim as:

$$\begin{aligned}
& x = a\\\
& y = b\\\
& z = c
\end{aligned}$$
  1. 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}