Expand description
§KaTeX for Dioxus
Render math with KaTeX in Dioxus!
§How to use
- First you need to import css cdn:
<link rel="stylesheet" href="https://unpkg.com/katex@0.12.0/dist/katex.min.css">- Call
use_katex_displayhook to prepare context. - Call
compileto get math expression node.
use dioxus_katex::use_katex_display;
let katex = use_katex_display(&cx);
let math = katex.compile(text);Structs§
- KaTeX
Options - Read https://katex.org/docs/options.html for more information.
- UseKatex
- A hook which keeping the context of KaTeX formula.
Functions§
- use_
katex - A builder for a
UseKatexhook. - use_
katex_ display - A builder for a
UseKatexhook in display mode. - use_
katex_ inline - A builder for a
UseKatexhook in inline mode.