#dioxus #katex #math

dioxus-katex

Render math with KaTeX in Dioxus!

5 releases

0.2.2 Jun 9, 2022
0.2.1 Jun 9, 2022
0.2.0 Mar 7, 2022
0.1.1 Mar 7, 2022
0.1.0 Mar 7, 2022

#1461 in Math

MPL-2.0 license

280KB
413 lines

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_display hook to prepare context.
  • Call compile to get math expression node.
use dioxus_katex::use_katex_display;

let katex = use_katex_display(&cx);
let math = katex.compile(text);

Dependencies

~8MB
~160K SLoC