Math
数学

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.

KaTeX 可以直接在普通 Paw 页面中渲染 TeX 公式,因此数学内容较重的文档和仪表盘也能保持同一套组合模型。
paw.KaTeX
Covered APIs
涵盖 API
API
接口
Description
说明
KaTeX
Renders a TeX expression with optional font-size control.
渲染 TeX 表达式,并可选地控制字号。
Minimal Example: Render a formula
最小示例:渲染单个公式

Set TeX to the expression you want to render. Size is optional.

把 TeX 字段设置为待渲染表达式即可,Size 可选。

paw.KaTeX{
	TeX:  `E = mc^2`,
	Size: 28,
}
Advanced Example: Use larger display formulas when the page calls for it
进阶示例:按需使用更大的展示公式

KaTeX can sit alongside normal prose and other Paw widgets without any extra template work.

KaTeX 可以和普通文案及其他 Paw 组件自然共存,而不需要额外模板工作。


paw.KaTeX{
	TeX:  `\int_0^\infty e^{-x^2}\,dx=\frac{\sqrt{\pi}}{2}`,
	Size: 30,
}
Notes and Related Docs
说明与相关文档

Notes

说明

KaTeX expects TeX input, not already-rendered HTML.

KaTeX 期望接收 TeX 输入,而不是已经渲染好的 HTML。

Size is in pixels and is optional; leave it at zero to use the default sizing from the bundled template.

Size 以像素为单位且为可选项;保持为 0 时会使用内置模板默认字号。

Related Pages

相关页面
Core Primitives
核心原语
The low-level building blocks for composing escaped text, raw HTML, inline code, and headings.
用于组合转义文本、原始 HTML、内联代码和标题的底层构件。
Charts
图表
Build time-series and categorical charts with shared data formatting helpers.
借助通用数据格式化能力构建时序图和分类图表。
Source and References
源码与参考资料