Proof
a Jekyll Theme for Mathematical Writings

Typesetting Math with $\KaTeX$

Proof supports the typesetting mathematics using $\KaTeX$. You can use $ .. $ to write formulas following the $\LaTeX$ math syntax:

The function $\nu$ is written inline, but can also be in a block:
\\[ \nu: \mathbb{P}^{1} \to \mathbb{P}^{3} \\]

The function $\nu$ is written inline, but can also be in a block: \[ \nu: \R\PP^{1} \to \PP^{3}. \]

Multiple math formats work:

  • \\(5\times 5\\) gives \(5\times 5.\)
  • $5\times 5$ gives $5\times 5.$
  • \\[5\times 5.\\] gives: \[5\times 5.\]
  • $$5\times 5$$ (on a separate line) gives
$$ 5\times 5. $$

Note: while $$ 5\times 5 $$ works, it will enclose the math in a separate block, which is undesirable.

$\KaTeX$ supports a long list of fonts and functions, but you can also add $\LaTeX$ macros in <script> tags. For instance:

<script>
macros["\\f"] = "\\mathscr{F}"
</script>
$$ 0\to\Gamma_Y(X,\f')\to\Gamma_Y(X,\f)\to\Gamma_Y(X,\f'')\to 0. $$

$\KaTeX$ even has support for commutative diagrams, though for now only using the amscd syntax, which does not allow diagonal arrows for instance.

\begin{CD} A @>{a}>> B \\ @V{b}VV @VV{c}V \\ C @>{d}>> D \end{CD}

So do numbered equations, in equation, align, and gather.

\begin{equation} \begin{split} a &=b+c\\ &=e+f \end{split} \end{equation}

To use either of these, your input needs to be excluded from Markdown processing like this:

<div markdown=0>
\begin{CD}
...
\end{CD}
</div>

If you are not familiar with writing mathematics in $\LaTeX$, I highly recommend reading and bookmarking this Wikibooks reference and using it to typeset problem sets or exercises to practice. Another great reference is this “short” guide by the AMS. To learn more about $\LaTeX$ itself, D.R.Wilkins’ Primer is a decent place to start.