Color Your World

More KaTeX

The extensions mhchem and copy-tex are also included (along the necessary auto-render).

The mhchem extension allows chemistry notation, like \(\ce{H2O}\) or:

$$ \ce{x Na(NH4)HPO4 ->[\Delta] (NaPO3)_x + x NH3 ^ + x H2O} $$

While copy-tex allows users to copy the rendered KaTeX and paste it in its native format.

It’s worth noting, though, that copy-tex has some known issues.

About how to load the extensions, here’s a quick example:

---
title           : "More KaTeX"
katex           : true
katexExtensions : [ mhchem, copy-tex ]
---

...

Fences

Another tweak here is that KaTeX blocks are accessible via keyboard and long expressions can be scrolled:

$$ \text{Damage} = \text{Skill Level} * \lfloor A * (1 - B) * (1 - C) * (1 - D) * (1 - E) * F * G \lfloor \frac{H * 0.7 * \text{INT} * \text{INT} * \text{VIT}}{(\text{INT} + \text{VIT})} \rfloor \rfloor $$

Pretty much like code blocks:

$$
  \text{Damage} = \text{Skill Level} * \lfloor A * (1 - B) * (1 - C) * (1 - D) * (1 - E) * F * G \lfloor \frac{H * 0.7 * \text{INT} * \text{INT} * \text{VIT}}{(\text{INT} + \text{VIT})} \rfloor \rfloor
$$