Rewrite GPT-style LaTeX math delimiters (\(...\), \[...\]) into Obsidian-friendly $...$ and $$...$$ in Markdown notes, skipping code blocks and regex examples.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Mach1ne333/dsh-latex-delimiter-fixer
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
Fix math delimiters pasted from ChatGPT (or any MathJax-default renderer) so they
render in Obsidian (and other $-only Markdown renderers).
\( ... \) → $ ... $ · \[ ... \] → $$ ... $$

Why
ChatGPT and MathJax-default sites accept \(...\) / \[...\]. Obsidian's MathJax
only registers $...$ and $$...$$, so GPT-generated notes show raw \( noise
instead of formulas. This plugin rewrites them in place.
| Input | Output |
|---|---|
\(g\) |
$g$ |
\($P_s$\) (nested) |
$P_s$ |
\[\Delta x\] alone on a line |
three-line $$ block |
multi-line \[ ... \] display block |
$$ ... $$ display block |
\(2\,\mathrm{m/s}\) |
$2\,\mathrm{m/s}$ |
Left untouched on purpose: fenced code, inline code, YAML front matter, Chinese
parentheses such as (具体应该输出什么动作), and regex examples such as
5. \(xy\) : 匹配字符为xy, \[\^0-9 \]\+. mode: "all" converts everything.
Install
- Open the DSH plugin market, search for LaTeX delimiter fixer, install and enable it.
- Or install this repository's folder as a local bundle from the plugin manager. No build step and no runtime dependencies are required.
The plugin activates immediately: the tool and the slash command appear in the running session without a restart.
Usage
- Tool
fix_latex_delimiters— parameters{ path?, mode?: "auto" | "all", dry_run?: boolean }. Withoutpath, the session working directory is scanned recursively. - Command
/fixlatex [path ...] [--dry] [--all]— runs inside the host process and never creates a model message, so it costs no tokens. Add--dryto preview, drop it to write.
Example:
/fixlatex /home/me/Notes --dry
/fixlatex "/home/me/Notes/秋招/LLM驱动的机器人决策范式.md"
/fixlatex ~/Notes
Directories are walked recursively; .git, .obsidian, .trash, node_modules,
and .dsh are skipped. Unreadable directories are skipped instead of aborting.
Every changed file is reported with a couple of sample replacements.
中文说明
ChatGPT 粘贴出来的公式用 \(...\)、\[...\],Obsidian 只认 $...$、$$...$$。
这个插件把两者就地改写:
- 斜杠命令
/fixlatex 路径 [--dry] [--all]:在宿主进程里跑,不产生模型消息,不花 token; - 工具
fix_latex_delimiters:让 agent 调用,适合批量整理; - 代码块、行内代码、front matter、中文括号、正则示例默认不动。
Layout
index.js— Cordis plugin: registers the tool and the slash command, no imports.lib/transform.js— dependency-free Markdown state machine (transformMarkdown,runFix,summarize).cordis.patch.yml— bundle patch that inserts the plugin.locale/— bundle title and description for the plugin manager.assets/— screenshots shown here and in the market.
License
MIT
Links
More in this category
tt-a1i/archify#integrations/deepseek-harness★ 97127
Generate validated, self-contained interactive architecture, workflow, sequence, data-flow, and lifecycle diagrams from repositories or system descriptions.
dream-num/dsh-univer-office★ 728
Give DeepSeek Harness a real office environment. Univer Office Plugin brings spreadsheets, docs, slides, canvases, relational tables, and more into one runtime — with connected data, validation, versioned changes, and isolated worktrees for multi-agent collaboration.
Roland0511/dsh-marktext★ 702
WYSIWYG Markdown editor in the DSH right sidebar, built on MarkText's muya engine: open a .md file, edit it as a rendered document, and save back through ctx.fs with a version guard.
ECNU/EduWork#dsh-knowledge-studio★ 370
A workspace-based Studio for source-grounded reports, slides, tables, mind maps, quizzes, flashcards, audio and video, using DSH models and shared artifact services. Office generation requires Python 3.12+ with its dependencies and DSH_OFFICE_PYTHON configured; media rendering requires Chromium, and local ASR additionally requires whisper.cpp and a model.
PerryLink/dsh-industry-research★ 219
Deterministic industry research reports for DeepSeek Harness — company and industry research flows produce structured, verifiable reports from staged evidence.
joeseesun/qiaomu-ui-learn-dsh★ 85
Browse UI design references and interaction examples, take design quizzes, and export learning notes as Markdown.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.