liuup/dsh-latex-tools 预览 preview

liuup/dsh-latex-tools

Plugin插件 Native原生 ⭐ 10 MIT Vision & Media视觉与多媒体

♾️ 复制并导出 DeepSeek Harness 中的 LaTeX 悬停于任意 LaTeX 公式上即可复制 TeX 源码或导出为独立的 SVG 文件

Project Overview项目介绍

dsh-latex-tools is a DSH-native plugin built exclusively for adding LaTeX formula utilities to DeepSeek Harness’s web interface. It enables two core features: copying the raw TeX source code of any formula directly to your system clipboard, and exporting any inline or block formula as a standalone self-contained SVG file. To install the plugin, you only need to run the official DSH npm command npx @deepseek-ai/dsh plugin --profile web add dsh-latex-tools after you have Node.js installed on your machine. Once installed, it loads automatically when you start the DSH Web UI and requires no extra configuration from users.

This plugin is designed for any DSH user that works with LaTeX formulas, especially those creating academic content, presentations, or web pages that require extracting formulas for reuse. The typical workflow is straightforward: when you are viewing or editing content that includes LaTeX formulas in DSH’s web interface, just hover your cursor over the target formula. The plugin will display a small floating toolbar with buttons for copying LaTeX and exporting SVG. Clicking the desired button will complete the action immediately, no extra steps needed.

The plugin works 100% offline, because all MathJax scripts needed for SVG rendering are bundled with the plugin, so no external CDN dependencies are required. The MathJax bundle (around 2.1MB in size) is only loaded on demand when you first export an SVG, and it will be cached by your browser after the first load. The plugin is open source under the permissive MIT license. Since it has no user-configurable options, it will not appear in the plugin list under DSH’s settings page.

dsh-latex-tools 是专为 DeepSeek Harness (DSH) 开发的原生插件,用于在 DSH 的 Web 界面中处理 LaTeX 公式。它的核心功能是支持用户悬停任意行内或块级 LaTeX 公式,即可复制 TeX 源码,或将公式导出为不依赖外部资源的独立 SVG 文件。插件可通过 DSH 官方 npm 命令一键安装,安装完成后无需额外配置。

这款插件面向需要在 DSH 中处理 LaTeX 公式的用户,尤其适合撰写学术论文、制作演示文稿或网页内容时需要提取公式的场景。标准使用流程为:用户在 DSH Web 界面浏览或编辑带公式的内容时,将鼠标悬停到目标公式上,插件会自动弹出带复制和导出选项的工具条,点击对应按钮即可完成操作。

该插件运行依赖用户系统中预先安装 Node.js,功能完全离线可用,SVG 渲染所需的 MathJax 脚本由插件自身托管,仅在首次导出时按需加载,之后由浏览器缓存,不依赖任何外部 CDN 服务。它采用 MIT 许可证开源,由于无配置项,因此不会出现在 DSH 设置的插件列表中。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 10 stars - an early-stage project星标 10,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

npx @deepseek-ai/dsh plugin --profile web add dsh-latex-tools

把 liuup/dsh-latex-tools 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-latex-tools

English | 中文

♾️ Copy and export the LaTeX in DeepSeek Harness 悬停任意 LaTeX 公式,即可复制 TeX 源码或导出为独立的 SVG 文件

🐳 All the code are proundly generated by DeepSeek V4 Flash 0731

dsh-latex-tools 悬停公式显示复制/导出工具条

功能

  • 复制 LaTeX:鼠标悬停公式(行内或块级),点击「复制 LaTeX」,TeX 源码即进入剪贴板。
  • 导出 SVG:点击「导出 SVG」,公式经 MathJax 渲染为自包含的矢量图(字形轮廓内嵌为 path,无外部字体/样式依赖),下载为 formula-<slug>.svg,可用于论文、PPT、网页。
  • 完全离线可用:MathJax 脚本由插件自身的 host half 提供,首次导出时才按需加载,之后浏览器缓存;不依赖任何 CDN。
  • 支持行内与块级公式(块级按 display 模式导出)。

安装

要求:安装 Node.js,然后直接用官方 npm 方式运行(无需全局安装):

npx @deepseek-ai/dsh web

插件装进 profile 后随 Web UI 启动自动加载,无需手动启用;Settings → Plugins 列表只显示有配置项的插件,本插件没有配置项,不会出现在那里。

一键 npm 安装

npx @deepseek-ai/dsh plugin --profile web add dsh-latex-tools

安装的是预构建产物,无需本地构建、无需任何额外配置,装完重启 Web UI 即可。

验证安装

npx @deepseek-ai/dsh --profile web --dump-config   # 应看到 "# == dsh-latex-tools" 层
# 浏览器检查:
#   /plugins/dsh-latex-tools/client.js   —— browser half 的 bundle
#   /dsh-latex-tools/mathjax/es5/tex-svg.js  —— SVG 导出用的 MathJax(约 2.1 MB)

dsh-latex-tools plugin list

卸载

npx @deepseek-ai/dsh plugin --profile web remove dsh-latex-tools

从 web profile 移除插件依赖与配置层,重启 Web UI 后生效。

开发(构建、测试、GitHub/源码安装,点击展开)
pnpm install
pnpm typecheck   # tsc --noEmit
pnpm test        # vitest(jsdom:工具条显隐 / 复制 / SVG 导出)
pnpm build       # tsdown:lib/index.js(host half)+ lib/client.js(browser half)

从 GitHub 安装(无需本地构建)

npx @deepseek-ai/dsh plugin --profile web add github:liuup/dsh-latex-tools

git 安装拉取的是源码,pnpm 会自动执行包内的 prepare 脚本完成构建。pnpm ≥10 默认拒绝运行 git 依赖的 prepare,首次 add 会失败——dsh 会打印指引:按提示把对应条目加入 profile 的 pnpm-workspace.yaml(allowBuilds 段),然后重跑上面的命令。生产使用建议 pin 提交:github:liuup/dsh-latex-tools#<commit-sha>。

本地源码安装(开发/自用)

git clone https://github.com/liuup/dsh-latex-tools.git
cd dsh-latex-tools
pnpm install && pnpm build          # 构建出 lib/(产物已被 gitignore,必须本地构建)
npx @deepseek-ai/dsh plugin --profile web add link:/absolute/path/to/dsh-latex-tools
npx @deepseek-ai/dsh web            # 启动 Web UI

License

MIT

← 上一个 Prev dsh-ocgo-lite 下一个 Next dsh-prompt-manager →