Skip to main content

KaTeX

The @liqvid/katex package helps with using KaTeX in Liqvid videos.

Examples

Revealing equations

  • Refresh

Fading equations

  • Refresh

Exports

<KTX>

Component for including math; contents will be rendered using KaTeX.

Props

This component accepts the following props. Any additional attributes will be forwarded to the underlying <span> element.

  • display?: boolean = false
    Whether to render in displaystyle.

  • obstruct?: string = "canplay canplaythrough"
    Player events to obstruct.

  • reparse?: boolean = false
    Whether to reparse the tree.

Properties

Refs attached to this component have the following properties:

  • domElement: HTMLSpanElement
    Underlying <span> element.

  • ready: Promise<void>
    A Promise that will resolve once the element has finished typesetting.

<RenderGroup>

Container for if you need to use .ready or .reparse on multiple <KTX> elements at once.

Props

This component accepts the following props:

  • reparse?: boolean = false
    Whether to reparse the tree once all <KTX> descendants are ready.

Properties

Refs attached to this component have the following properties:

  • ready: Promise<void>
    A Promise that resolves once all <KTX> descendants are ready.

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}