Crate dioxus_katex
source · [−]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
Read https://katex.org/docs/options.html for more information.
A hook which keeping the context of KaTeX formula.