Preface¶
When viewing mathematical content in the DeepSeek Harness (DSH) Web UI, users often encounter a specific need: to quickly obtain the TeX source code of an inline or block formula, or to export a formula as a standalone file for use in papers, presentations, or web pages.
DSH operates on the philosophy of “everything is a plugin.” The community directory is an independent site and is not officially affiliated with DeepSeek or幻方 (Huánfāng). It should not be interpreted as an official app store. dsh-latex-tools is a plugin designed for the DSH Web UI: it allows users to hover over any LaTeX formula to copy its TeX source code or export it as an independent SVG file.
What Is This¶
dsh-latex-tools is an MIT-licensed DSH Web UI plugin maintained by liuup. It addresses a straightforward problem: when viewing LaTeX formulas in the DSH Web UI, it provides two operations: “Copy LaTeX” and “Export SVG.”
Core Features¶
The following are the verified features:
-
Copy LaTeX
When you hover over an inline or block LaTeX formula, you can click “Copy LaTeX” to copy the TeX source code to the clipboard. -
Export SVG
You can click “Export SVG,” and the formula will be rendered by MathJax as a self-contained vector graphic, then downloaded asformula-<slug>.svg. This file can be used in papers, presentations, web pages, and other scenarios. -
Offline Usable
The MathJax script is provided by the plugin’s own host half. It loads on demand during the first export and is subsequently cached by the browser, with no dependency on any CDN. -
Supports Inline and Block Formulas
The plugin supports both inline and block formulas; block formulas are exported in display mode.
Installation and Enabling¶
Before installation, you must have Node.js installed in your environment. DSH plugins run via the official npm method and do not require global installation.
First, start the Web UI:
npx @deepseek-ai/dsh web
Install dsh-latex-tools:
npx @deepseek-ai/dsh plugin --profile web add dsh-latex-tools
Once the plugin is installed into the web profile, it will automatically load when the Web UI starts, with no manual enabling required.
This plugin has no configuration options, so it will not appear in the Settings → Plugins list. That list displays plugins with configuration options; plugins without them will not show up there.
What gets installed are pre-built artifacts. After installation, simply restart the Web UI to take effect.
Verifying Installation¶
You can run the following command to check if the plugin layer is present:
npx @deepseek-ai/dsh --profile web --dump-config
In the output, you should see:
# == dsh-latex-tools
You can also check in the browser whether the following paths exist:
/plugins/dsh-latex-tools/client.js
/dsh-latex-tools/mathjax/es5/tex-svg.js
Where:
/plugins/dsh-latex-tools/client.jsis the bundle for the browser half./dsh-latex-tools/mathjax/es5/tex-svg.jsis the MathJax used for SVG export.
Typical Usage¶
Here are reproducible usage steps:
- Hover over a formula, either inline or block.
- Click “Copy LaTeX,” and the TeX source code will be copied to the clipboard.
- If you need to export the file, click “Export SVG.”
- The formula is rendered by MathJax as a self-contained vector graphic and downloaded as
formula-<slug>.svg. - This SVG file can be used in papers, presentations, web pages, and other scenarios.
After the plugin is installed into the profile, it automatically loads when the Web UI starts, with no manual enabling required. Once the pre-built artifacts are installed, restart the Web UI to make it effective.
GitHub Installation and Source Installation¶
If you need to install from GitHub, you can use:
npx @deepseek-ai/dsh plugin --profile web add github:liuup/dsh-latex-tools
This method fetches the source code. pnpm will automatically run the prepare script inside the package to complete the build. Note that pnpm ≥10 defaults to refusing to run prepare scripts for git dependencies, so the first add might fail.
If this happens, follow the instructions printed by dsh to add the corresponding entry to the allowBuilds section in the profile’s pnpm-workspace.yaml, then rerun the installation command.
For production use, it is recommended to pin to a specific commit:
npx @deepseek-ai/dsh plugin --profile web add github:liuup/dsh-latex-tools#<commit-sha>
If you choose local source installation, you need to build locally first. The lib/ directory is gitignored, so you cannot skip the build and install directly. Follow these steps:
git clone https://github.com/liuup/dsh-latex-tools.git
cd dsh-latex-tools
pnpm install && pnpm build
npx @deepseek-ai/dsh plugin --profile web add link:/absolute/path/to/dsh-latex-tools
npx @deepseek-ai/dsh web
Uninstallation¶
Remove the plugin from the web profile:
npx @deepseek-ai/dsh plugin --profile web remove dsh-latex-tools
Restart the Web UI for the change to take effect.
Use Cases and Considerations¶
This plugin is suitable for users who frequently view, copy, or export LaTeX formulas in the DSH Web UI. Typical use cases include:
- Copying formula TeX source code to an editor or notes.
- Exporting formulas as standalone SVGs for use in papers, presentations, or web pages.
- Completing formula export in environments without external CDN dependencies.
Before installing third-party plugins, it is recommended to check the source code and license. The license for dsh-latex-tools is MIT.
Special note: The plugin runs with the permissions of the current dsh process. Before installation, please ensure you trust the source and code of this plugin.
Conclusion¶
dsh-latex-tools solves a specific problem: after hovering over a LaTeX formula in the DSH Web UI, you can copy its TeX source code or export it as an independent SVG. It has no configuration options and automatically loads with the Web UI after installation, making it suitable for developers who need to handle mathematical formula content.
GitHub Repository:
https://github.com/liuup/dsh-latex-tools