Math Rendering by Jekyll and MathJax
There are several bazzar bugs of math rendering encountered when writing the math equations in Jekyll, which is the static site generator used by my website, with MathJax. Here are some of them.
Inline Math
-
Absolute value: to render $\lvert x\rvert$, use
\lvert
and\rvert
instead of|
. - Curly brackets: to render $\{x\}$, instead of
{x}
, use-
\\{
and\\}
instead of{
and}
(You have to escape the backslash because there seems to be 2 levels of interpretation: jekyll and then mathjax); or -
\lbrace
and\rbrace
instead of{
and}
.
-
- Subscript problem: to render the subscript of something that is not a single alphabet/number, use
\_
instead of_
. For example,- $(A_n)_{n\in \mathbb{N}}$ (
$(A_n)\_{n\in \mathbb{N}}$
) - $\mathcal{X}_n$ (
$\mathcal{X}\_n$
)
- $(A_n)_{n\in \mathbb{N}}$ (
Enjoy Reading This Article?
Here are some more articles you might like to read next: