Proof
a Jekyll Theme for Mathematical Writings

Typesetting Math with KaTeX\KaTeX

Proof supports the typesetting mathematics using KaTeX\KaTeX. You can use $ .. $ to write formulas following the LaTeX\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: ν:RP1P3. \nu: \R\PP^{1} \to \PP^{3}.

Multiple math formats work:

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

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

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

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

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

AaBbcCdD\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.

a=b+c=e+f\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\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\LaTeX itself, D.R.Wilkins’ Primer is a decent place to start.