KaTeX renders TeX formulae directly inside normal Paw pages, so math-heavy docs and dashboards can stay in the same composition model as everything else.
paw.KaTeXAPI 接口 |
Description 说明 |
|---|---|
KaTeX |
Renders a TeX expression with optional font-size control. 渲染 TeX 表达式,并可选地控制字号。 |
Set TeX to the expression you want to render. Size is optional.
paw.KaTeX{
TeX: `E = mc^2`,
Size: 28,
}
KaTeX can sit alongside normal prose and other Paw widgets without any extra template work.
paw.KaTeX{
TeX: `\int_0^\infty e^{-x^2}\,dx=\frac{\sqrt{\pi}}{2}`,
Size: 30,
}
KaTeX expects TeX input, not already-rendered HTML.
Size is in pixels and is optional; leave it at zero to use the default sizing from the bundled template.