跳到主要内容

dsh-math-render

已验证

@ch4acko3/dsh-math-render · v0.1.1 · MIT · Web 界面

KaTeX MathML rendering service for DeepSeek Harness Web plugins

安装

dsh plugin add @ch4acko3/dsh-math-render

dsh --profile default --dump-config 确认 layer 已生效 —— 参见安装指南

源码

发布到 npm 但没有公开仓库。安装前请检查包内容。

标签

说明文档

@ch4acko3/dsh-math-render

A browser-side Cordis service that renders TeX expressions as native MathML with KaTeX.

export const inject = ['mathRenderer']

export function apply(ctx) {
  const result = ctx.mathRenderer.render({
    source: String.raw`e^{i\pi} + 1 = 0`,
    displayMode: true,
  })
  console.log(result.html)
}

KaTeX runs with trusted commands disabled and emits native MathML, so consumers do not need a stylesheet or bundled font files. The service provides rendering only and does not ship an editor or ChatView card.