rp-katex
v1.1.1
Published
KaTeX plugin for Liqvid
Readme
rp-katex
Usage
import {KTX} from "rp-katex";
function Quadratic() {
return (
<div>
The value of <KTX>x</KTX> is given by the quadratic formula
<KTX display>{String.raw`x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}`}</KTX>
</div>
);
}Macros
For convenience, this module supports loading macro definitions from a file. Simply include a <script type="math/tex"> tag in the <head> of your html, pointing to a tex file containing \newcommands.
<!-- this has to go in <head> -->
<script src="./macros.tex" type="math/tex"></script>% macros.tex
\newcommand{\C}{\mathbb C}