dsh-latex-delimiter-fixer
Manifest validFix GPT-style LaTeX delimiters for Obsidian in Markdown notes.
LaTeX delimiter fixer
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
Comments
Loading…
Similar plugins
by Bob-Bo1
Obsidian-style Markdown workbench for DSH: browse, edit, preview, create, move, and delete notes inside the selected local vault.
★ 3
MIT
JavaScript
Aug 18, 2026
dsh plugin --profile web add obsidian-workbenchby revive123456
Obsidian-style notes panel in the DSH right sidebar: a tree over a local folder, Markdown preview with line numbers, edit and save, Obsidian callouts, tables and wikilinks, screenshot paste into the v
★ 2
MIT
JavaScript
Nov 12, 2026
dsh plugin --profile web add dsh-obsidian-notesby Red-Rayux
Markdown to .docx with native Word equations (OMML), plus a PDF pass that verifies every formula renders.
★ 0
MIT
Python
Nov 8, 2026
dsh plugin --profile web add dsh-formula-docxby maple110011
面向数学笔记的 DeepSeek Harness 助手,驻留在 Obsidian 右侧栏。可直接读写数学笔记,维护分层长期记忆(画像、主题、类型化记录、原始证据),按 Rethlas 风格证明工作流工作,内置个人定理索引与问题模板库,并能把关键想法捕捉到备忘录、主动提醒打磨。
★ 9
↓ 203/wk
MIT
JavaScript
Oct 18, 2026
dsh plugin --profile web add dsh-math-memoryby omdsh-dev
DSH Markdown 工具插件:HTML↔Markdown 转换、GFM 表格规范化、目录生成,零依赖轻量解析器,注册 markdown 工具
★ 4
MIT
TypeScript
Sep 10, 2026
dsh plugin --profile web add @deepseek-ai/dsh-tool-markdownby sevenhsu7
Codex-like Markdown editing for the DSH right Sidebar: a rendered document you edit in place, including table cells.
★ 0
MIT
JavaScript
Oct 13, 2026
dsh plugin --profile web add dsh-codex-like-markdown